Fix refactor mistakes where some dependencies files accidentally had the type suffix '_t' appended in a previous commit.
Re-execute the dependencies script, refreshing all existing dependencies.
Begin adding a new parameter to specific a specific fakefile.
This part is incomplete.
Begin updating how the settings parameter works in regards to how the path to the fakefile is handled.
This part is incomplete.
Add example custom fakefile for the bzip-1.0.8 source.
Fix problems observed while trying to make these changes:
- The build process needs to store stage files per settings file so that multiple different settings may be built.
- The wrong path was accidentally used for loading the fakefile.
- The fake fakefile needs to use 'indexer' now instead of 'linker'.
Note: the fakefile stage files should also behave the same way as the build stage files, but this isn't implemented just yet.
build_indexer ar
build_language c
build_libraries -lc
-build_libraries-individual
+build_libraries-individual -lf_memory
build_sources_library account.c
build_sources_program
build_sources_headers account.h
# fss-0000
f_type
-f_status_t
+f_status
f_memory
-f_string_t
+f_string
f_utf
-f_file_t
+f_file
build_indexer ar
build_language c
build_libraries -lc
-build_libraries-individual -lfl_color -lfl_directory -lf_print -lf_file -lf_directory -lf_memory
+build_libraries-individual -lfl_directory -lf_path -lf_utf -lfl_color -lf_print -lf_file -lf_directory -lf_memory
build_sources_library file.c private-file.c
build_sources_program
build_sources_headers file.h
printf("%c", f_string_eol[0]);
fll_program_print_help_option(context, fake_short_define, fake_long_define, f_console_symbol_short_enable, f_console_symbol_long_enable, " Override defines from settings file with this define.");
+ fll_program_print_help_option(context, fake_short_fakefile, fake_long_fakefile, f_console_symbol_short_enable, f_console_symbol_long_enable, "Use this fakefile.");
fll_program_print_help_option(context, fake_short_mode, fake_long_mode, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use this mode when processing the build settings.");
fll_program_print_help_option(context, fake_short_process, fake_long_process, f_console_symbol_short_enable, f_console_symbol_long_enable, " Process name for storing build states.");
- fll_program_print_help_option(context, fake_short_settings, fake_long_settings, f_console_symbol_short_enable, f_console_symbol_long_enable, "Use this settings file, from within the data build directory.");
+ fll_program_print_help_option(context, fake_short_settings, fake_long_settings, f_console_symbol_short_enable, f_console_symbol_long_enable, "Use this settings file.");
printf("%c", f_string_eol[0]);
printf("%c%c", f_string_eol[0], f_string_eol[0]);
+ printf(" When specifying the ");
+ fl_color_print(f_type_output, context.notable, context.reset, "%s", fake_long_fakefile);
+ printf(" or the ");
+ fl_color_print(f_type_output, context.notable, context.reset, "%s", fake_long_settings);
+ printf(" parameters, the filenames are relative to the data build directory, unless a path is used.");
+ printf("%c", f_string_eol[0]);
+
+ printf(" For example, with '");
+ fl_color_print(f_type_output, context.notable, context.reset, "%s%s my_fakefile", f_console_symbol_long_enable, fake_long_fakefile);
+ printf("' the fakefile at '");
+ fl_color_print(f_type_output, context.notable, context.reset, "./%s%smy_fakefile", fake_default_path_data, fake_default_path_build);
+ printf(" would be used, however with '");
+ fl_color_print(f_type_output, context.notable, context.reset, "%s%s ./my_fakefile", f_console_symbol_long_enable, fake_long_fakefile);
+ printf("' the fakefile at '");
+ fl_color_print(f_type_output, context.notable, context.reset, "./my_fakefile", fake_default_path_data, fake_default_path_build);
+ printf(" would be used.");
+
+ printf("%c%c", f_string_eol[0], f_string_eol[0]);
+
return F_none;
}
#endif // _di_fake_print_help_
};
#define fake_short_define "d"
+ #define fake_short_fakefile "f"
#define fake_short_mode "m"
#define fake_short_process "p"
#define fake_short_settings "s"
#define fake_short_define_length 1
+ #define fake_short_fakefile_length 1
#define fake_short_mode_length 1
#define fake_short_process_length 1
#define fake_short_settings_length 1
#define fake_short_path_work_length 1
#define fake_long_define "define"
+ #define fake_long_fakefile "fakefile"
#define fake_long_mode "mode"
#define fake_long_process "process"
#define fake_long_settings "settings"
#define fake_long_define_length 6
+ #define fake_long_fakefile_length 8
#define fake_long_mode_length 4
#define fake_long_process_length 7
#define fake_long_settings_length 8
fake_parameter_version,
fake_parameter_define,
+ fake_parameter_fakefile,
fake_parameter_mode,
fake_parameter_process,
fake_parameter_settings,
f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \
f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \
f_console_parameter_t_initialize(fake_short_define, fake_long_define, 0, 1, f_console_type_normal), \
+ f_console_parameter_t_initialize(fake_short_fakefile, fake_long_fakefile, 0, 1, f_console_type_normal), \
f_console_parameter_t_initialize(fake_short_mode, fake_long_mode, 0, 1, f_console_type_normal), \
f_console_parameter_t_initialize(fake_short_process, fake_long_process, 0, 1, f_console_type_normal), \
f_console_parameter_t_initialize(fake_short_settings, fake_long_settings, 0, 1, f_console_type_normal), \
f_console_parameter_t_initialize(0, 0, fake_other_operation_skeleton, 0, f_console_type_other), \
}
- #define fake_total_parameters 26
+ #define fake_total_parameters 27
#endif // _di_fake_defines_
#ifndef _di_fake_data_t_
#endif // _di_fake_build_load_setting_defaults_
#ifndef _di_fake_build_load_stage_
- void fake_build_load_stage(const fake_data_t data, fake_build_stage_t *stage, f_status_t *status) {
+ void fake_build_load_stage(const fake_data_t data, const f_string_static_t settings_file, fake_build_stage_t *stage, f_status_t *status) {
if (F_status_is_error(*status)) return;
const f_string_t names[] = {
*status = F_none;
+ f_string_dynamic_t settings_file_base = f_string_dynamic_t_initialize;
+
+ if (settings_file.used) {
+ *status = f_file_name_base(settings_file.string, settings_file.used, &settings_file_base);
+ }
+ else {
+ *status = f_file_name_base(data.file_data_build_settings.string, data.file_data_build_settings.used, &settings_file_base);
+ }
+
+ if (F_status_is_error(*status)) {
+ fake_print_error(data, F_status_set_fine(*status), "f_file_name_base", F_true);
+ return;
+ }
+
for (uint8_t i = 0; i < fake_build_stage_total; i++) {
+
*status = fl_string_dynamic_append_nulless(data.path_build_stage, values[i]);
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fl_string_dynamic_append_nulless", F_true);
break;
}
- *status = fl_string_append(fake_build_parameter_stage_separator, fake_build_parameter_stage_separator_length, values[i]);
+ *status = fl_string_append(fake_build_stage_separate, fake_build_stage_separate_length, values[i]);
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fl_string_append", F_true);
break;
break;
}
+ *status = fl_string_append(fake_build_stage_separate, fake_build_stage_separate_length, values[i]);
+ if (F_status_is_error(*status)) {
+ fake_print_error(data, F_status_set_fine(*status), "fl_string_append", F_true);
+ break;
+ }
+
+ *status = fl_string_dynamic_append(settings_file_base, values[i]);
+ if (F_status_is_error(*status)) {
+ fake_print_error(data, F_status_set_fine(*status), "fl_string_dynamic_append", F_true);
+ break;
+ }
+
+ *status = fl_string_append(fake_build_stage_built, fake_build_stage_built_length, values[i]);
+ if (F_status_is_error(*status)) {
+ fake_print_error(data, F_status_set_fine(*status), "fl_string_append", F_true);
+ break;
+ }
+
*status = fl_string_dynamic_terminate_after(values[i]);
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true);
break;
}
} // for
+
+ f_macro_string_dynamic_t_delete_simple(settings_file_base);
}
#endif // _di_fake_build_load_stage_
fake_build_load_setting(data, setting_file, &data_build.setting, &status);
- fake_build_load_stage(data, &stage, &status);
+ fake_build_load_stage(data, setting_file, &stage, &status);
fake_build_load_environment(data, data_build, &data_build.environment, &status);
f_macro_string_dynamic_t_delete_simple(stage.file_sources_script) \
f_macro_string_dynamic_t_delete_simple(stage.file_sources_settings)
- #define fake_build_stage_libraries_script "libraries_script.built"
- #define fake_build_stage_libraries_shared "libraries_shared.built"
- #define fake_build_stage_libraries_static "libraries_static.built"
- #define fake_build_stage_objects_static "objects_static.built"
- #define fake_build_stage_process_post "process_post.built"
- #define fake_build_stage_process_pre "process_pre.built"
- #define fake_build_stage_programs_script "programs_script.built"
- #define fake_build_stage_programs_shared "programs_shared.built"
- #define fake_build_stage_programs_static "programs_static.built"
- #define fake_build_stage_skeleton "skeleton.built"
- #define fake_build_stage_sources_headers "sources_headers.built"
- #define fake_build_stage_sources_script "sources_script.built"
- #define fake_build_stage_sources_settings "sources_settings.built"
-
- #define fake_build_stage_libraries_script_length 22
- #define fake_build_stage_libraries_shared_length 22
- #define fake_build_stage_libraries_static_length 22
- #define fake_build_stage_objects_static_length 20
- #define fake_build_stage_process_post_length 18
- #define fake_build_stage_process_pre_length 17
- #define fake_build_stage_programs_script_length 21
- #define fake_build_stage_programs_shared_length 21
- #define fake_build_stage_programs_static_length 21
- #define fake_build_stage_skeleton_length 14
- #define fake_build_stage_sources_headers_length 21
- #define fake_build_stage_sources_script_length 20
- #define fake_build_stage_sources_settings_length 22
+ #define fake_build_stage_built ".built"
+ #define fake_build_stage_libraries_script "libraries_script"
+ #define fake_build_stage_libraries_shared "libraries_shared"
+ #define fake_build_stage_libraries_static "libraries_static"
+ #define fake_build_stage_objects_static "objects_static"
+ #define fake_build_stage_process_post "process_post"
+ #define fake_build_stage_process_pre "process_pre"
+ #define fake_build_stage_programs_script "programs_script"
+ #define fake_build_stage_programs_shared "programs_shared"
+ #define fake_build_stage_programs_static "programs_static"
+ #define fake_build_stage_separate "-"
+ #define fake_build_stage_skeleton "skeleton"
+ #define fake_build_stage_sources_headers "sources_headers"
+ #define fake_build_stage_sources_script "sources_script"
+ #define fake_build_stage_sources_settings "sources_settings"
+
+ #define fake_build_stage_built_length 6
+ #define fake_build_stage_libraries_script_length 16
+ #define fake_build_stage_libraries_shared_length 16
+ #define fake_build_stage_libraries_static_length 16
+ #define fake_build_stage_objects_static_length 14
+ #define fake_build_stage_process_post_length 12
+ #define fake_build_stage_process_pre_length 11
+ #define fake_build_stage_programs_script_length 15
+ #define fake_build_stage_programs_shared_length 15
+ #define fake_build_stage_programs_static_length 15
+ #define fake_build_stage_separate_length 1
+ #define fake_build_stage_skeleton_length 8
+ #define fake_build_stage_sources_headers_length 15
+ #define fake_build_stage_sources_script_length 14
+ #define fake_build_stage_sources_settings_length 16
#endif // _di_fake_build_stage_t_
#ifndef _di_fake_build_data_t_
#define fake_build_parameter_object_link_arguments "rcs"
#define fake_build_parameter_object_link_arguments_length 3
-
- #define fake_build_parameter_stage_separator "-"
-
- #define fake_build_parameter_stage_separator_length 1
#endif // _di_fake_build_parameter_
/**
*
* @param data
* The program data.
+ * @param settings_file
+ * The path to the settings file.
* @param stage
* All stage file paths.
* @param status
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_load_stage_
- extern void fake_build_load_stage(const fake_data_t data, fake_build_stage_t *stage, f_status_t *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_load_stage(const fake_data_t data, const f_string_static_t settings_file, fake_build_stage_t *stage, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_load_stage_
/**
f_string_t name_function = "f_file_exists";
f_status_t status = F_none;
- status = f_file_exists(data.file_data_build_settings.string);
+ status = f_file_exists(path_file);
if (status == F_true) {
{
}
}
+ // @todo use fakefile and settings file if a custom path is provided by the command line instead of the default.
+
{
f_string_dynamic_t *parameters_value[] = {
&data->path_build_documents,
# fss-0000
f_type
-f_status_t
+f_status
f_memory
-f_string_t
+f_string
f_utf
f_account
-f_color_t
+f_color
f_console
f_conversion
f_directory
f_environment
f_fss
-f_file_t
+f_file
f_iki
f_path
f_print
fl_utf
fll_fss
fll_execute
+fll_file
fll_path
fll_program
fail exit
compiler gcc
- linker ar
+ indexer ar
environment
--- /dev/null
+# fss-0005 iki-0002
+#
+# This is designed for bzip2-1.0.8 as an example for compiling bzip2.
+#
+# To use this example do the following:
+# 1) download and extract bzip2-1.0.8.
+# 2) change into the extracted bzip2-1.0.8 directory.
+# 3) create the directory path "data/build/" within this bzip2-1.0.8 directory.
+# 4) copy the files fakefile-example-bzip2, settings-example-bzip2, and settings-example-bzip2recover) into the created directory path "data/build/".
+# 5) use the featureless make build operation to make, such as: "fake make".
+
+settings:
+ load_build no
+ fail exit
+
+ compiler gcc
+ indexer ar
+
+main:
+ print
+ print Building settings-example-bzip2.
+ build settings-example-bzip2
+
+ print
+ print Building settings-example-bzip2recover.
+ build settings-example-bzip2recover
build_indexer ar
build_language c
build_libraries -lc
-build_libraries-individual -lfll_program -lfll_path -lfll_execute -lfl_environment -lfll_fss -lfl_utf -lfl_string -lfl_status -lfl_iki -lfl_fss -lfl_directory -lfl_conversion -lfl_console -lfl_color -lf_account -lf_print -lf_path -lf_iki -lf_file -lf_fss -lf_environment -lf_directory -lf_conversion -lf_console -lf_utf -lf_memory
+build_libraries-individual -lfll_program -lfll_path -lfll_file -lfll_execute -lfl_environment -lfll_fss -lfl_utf -lfl_string -lfl_status -lfl_iki -lfl_fss -lfl_directory -lfl_conversion -lfl_console -lfl_color -lf_print -lf_path -lf_iki -lf_file -lf_fss -lf_environment -lf_directory -lf_conversion -lf_console -lf_account -lf_utf -lf_memory
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
build_sources_library fake.c private-fake.c private-clean.c private-build.c private-make.c private-print.c private-skeleton.c
build_indexer ar
build_language c
build_libraries -lc
-build_libraries-individual -lfll_program -lfll_fss -lfll_file -lfll_execute -lfl_environment -lf_path -lfl_string -lfl_status -lfl_print -lfl_fss -lfl_conversion -lfl_console -lf_conversion -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_console -lf_utf -lf_memory
+build_libraries-individual -lfll_program -lfll_fss -lfll_file -lfl_directory -lfll_execute -lfl_environment -lf_path -lfl_string -lfl_status -lfl_print -lfl_fss -lfl_conversion -lfl_console -lf_conversion -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_console -lf_utf -lf_memory
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
build_sources_library fss_basic_list_read.c private-fss_basic_list_read.c
build_indexer ar
build_language c
build_libraries -lc
-build_libraries-individual -lfll_program -lfll_fss -lfll_file -lfll_execute -lfl_environment -lf_path -lfl_string -lfl_status -lfl_fss -lfl_conversion -lfl_console -lf_conversion -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_console -lf_utf -lf_memory
+build_libraries-individual -lfll_program -lfll_fss -lfll_file -lfl_directory -lfll_execute -lfl_environment -lf_path -lfl_string -lfl_status -lfl_fss -lfl_conversion -lfl_console -lf_conversion -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_console -lf_utf -lf_memory
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
build_sources_library fss_basic_list_write.c
build_indexer ar
build_language c
build_libraries -lc
-build_libraries-individual -lfll_program -lfll_fss -lfll_file -lfll_execute -lfl_environment -lf_path -lfl_string -lfl_status -lfl_print -lfl_fss -lfl_conversion -lfl_console -lf_conversion -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_console -lf_utf -lf_memory
+build_libraries-individual -lfll_program -lfll_fss -lfll_file -lfl_directory -lfll_execute -lfl_environment -lf_path -lfl_string -lfl_status -lfl_print -lfl_fss -lfl_conversion -lfl_console -lf_conversion -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_console -lf_utf -lf_memory
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
build_sources_library fss_basic_read.c private-fss_basic_read.c
build_indexer ar
build_language c
build_libraries -lc
-build_libraries-individual -lfll_program -lfll_fss -lfll_file -lfll_execute -lfl_environment -lf_path -lfl_string -lfl_status -lfl_fss -lfl_conversion -lfl_console -lf_conversion -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_console -lf_utf -lf_memory
+build_libraries-individual -lfll_program -lfll_fss -lfll_file -lfl_directory -lfll_execute -lfl_environment -lf_path -lfl_string -lfl_status -lfl_fss -lfl_conversion -lfl_console -lf_conversion -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_console -lf_utf -lf_memory
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
build_sources_library fss_basic_write.c
build_indexer ar
build_language c
build_libraries -lc
-build_libraries-individual -lfll_program -lfll_fss -lfll_file -lfll_execute -lfl_environment -lf_path -lfl_string -lfl_status -lfl_print -lfl_fss -lfl_conversion -lfl_console -lf_conversion -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_console -lf_utf -lf_memory
+build_libraries-individual -lfll_program -lfll_fss -lfll_file -lfl_directory -lfll_execute -lfl_environment -lf_path -lfl_string -lfl_status -lfl_print -lfl_fss -lfl_conversion -lfl_console -lf_conversion -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_console -lf_utf -lf_memory
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
build_sources_library fss_extended_list_read.c private-fss_extended_list_read.c
build_indexer ar
build_language c
build_libraries -lc
-build_libraries-individual -lfll_program -lfll_fss -lfll_file -lfll_execute -lfl_environment -lf_path -lfl_string -lfl_status -lfl_print -lfl_fss -lfl_console -lfl_conversion -lf_conversion -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_console -lf_utf -lf_memory
+build_libraries-individual -lfll_program -lfll_fss -lfll_file -lfl_directory -lfll_execute -lfl_environment -lf_path -lfl_string -lfl_status -lfl_print -lfl_fss -lfl_console -lfl_conversion -lf_conversion -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_console -lf_utf -lf_memory
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
build_sources_library fss_extended_read.c private-fss_extended_read.c
build_indexer ar
build_language c
build_libraries -lc
-build_libraries-individual -lfll_program -lfll_fss -lfll_file -lfll_execute -lfl_environment -lf_path -lfl_string -lfl_status -lfl_fss -lfl_conversion -lf_conversion -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_console -lf_utf -lf_memory
+build_libraries-individual -lfll_program -lfll_fss -lfll_file -lfl_directory -lfll_execute -lfl_environment -lf_path -lfl_string -lfl_status -lfl_fss -lfl_conversion -lf_conversion -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_console -lf_utf -lf_memory
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
build_sources_library fss_extended_write.c
build_indexer ar
build_language c
build_libraries -lc
-build_libraries-individual -lfll_status -lfll_program -lfll_fss -lfll_file -lfll_execute -lfl_environment -lf_path -lfl_utf -lfl_string -lfl_status -lfl_fss -lfl_conversion -lfl_console -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_conversion -lf_console -lf_utf -lf_memory
+build_libraries-individual -lfll_status -lfll_program -lfll_fss -lfll_file -lfl_directory -lfll_execute -lfl_environment -lf_path -lfl_utf -lfl_string -lfl_status -lfl_fss -lfl_conversion -lfl_console -lfl_color -lf_print -lf_pipe -lf_fss -lf_file -lf_environment -lf_directory -lf_conversion -lf_console -lf_utf -lf_memory
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
build_sources_library fss_status_code.c private-fss_status_code.c
# fss-0000
f_type
-f_status_t
+f_status
f_memory
-f_string_t
+f_string
f_utf
-f_color_t
+f_color
f_console
f_conversion
-f_file_t
+f_file
f_iki
f_pipe
f_print
build_indexer ar
build_language c
build_libraries -lc
-build_libraries-individual -lfll_program -lfll_file -lfl_utf -lfl_string -lfl_iki -lfl_conversion -lfl_console -lfl_color -lf_print -lf_pipe -lf_iki -lf_file -lf_conversion -lf_console -lf_utf -lf_memory
+build_libraries-individual -lfll_program -lfll_file -lfl_directory -lf_path -lf_directory -lfl_utf -lfl_string -lfl_iki -lfl_conversion -lfl_console -lfl_color -lf_print -lf_pipe -lf_iki -lf_file -lf_conversion -lf_console -lf_utf -lf_memory
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
build_sources_library iki_read.c private-iki_read.c