From bd14ce4aea13be91597fefab2c472d95739f119b Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 22 Sep 2024 21:08:03 -0500 Subject: [PATCH] Feature: Fake settings specification updates and enable simple golang support. The Featureless Make is intended to not be language specific since its inception. I did not know how the languages were to work, so I mostly built this to guarantee C/C++ support. I found that the `golang` supports some command line based compilation. This adds support for `golang` in the most basic way. This support is not well tested. An `example_go` project is added. I have only tested the basic build and I have not done anything advanced. This relaxes some of the requirements. The `bash` is changed to `shell` to encourage more types of scripts. The `custom` is added and used as a fallback if `build_language_path` is not used. I found that there needs to be some additional settings in the `settings` specification. This updates the specification and adds: - build_compiler_arguments - build_compiler_arguments_shared - build_compiler_arguments_static - build_compiler_arguments_library - build_compiler_arguments_library_shared - build_compiler_arguments_library_static - build_compiler_arguments_object - build_compiler_arguments_object_shared - build_compiler_arguments_object_static - build_compiler_arguments_program - build_compiler_arguments_program_shared - build_compiler_arguments_program_static - build_language_path This also fixes some mistakes in the language of the specification. --- build/stand_alone/fake.settings | 2 +- level_3/fake/c/main/build.c | 109 ++-- level_3/fake/c/main/build/enumeration.h | 14 +- level_3/fake/c/main/build/library.c | 357 ++++++++----- level_3/fake/c/main/build/load.c | 198 ++++--- level_3/fake/c/main/build/object.c | 38 +- level_3/fake/c/main/build/print/warning.c | 27 - level_3/fake/c/main/build/print/warning.h | 28 - level_3/fake/c/main/build/program.c | 184 ++++--- level_3/fake/c/main/build/string.c | 64 ++- level_3/fake/c/main/build/string.h | 575 +++++++++++---------- level_3/fake/c/main/clean.c | 10 +- level_3/fake/c/main/common/string.c | 1 + level_3/fake/c/main/common/string.h | 3 + level_3/fake/c/main/common/type.c | 14 + level_3/fake/c/main/common/type.h | 236 +++++---- level_3/fake/c/main/fake.h | 1 + level_3/fake/c/main/make/operate.c | 3 +- level_3/fake/c/main/print/debug.c | 21 + level_3/fake/c/main/print/debug.h | 47 ++ level_3/fake/c/main/skeleton.c | 20 +- level_3/fake/data/build/settings | 4 +- .../data/projects/go/example_go/data/build/defines | 2 + .../projects/go/example_go/data/build/dependencies | 2 + .../projects/go/example_go/data/build/fakefile | 7 + .../go/example_go/data/build/process_post.sh | 2 + .../go/example_go/data/build/process_pre.sh | 2 + .../projects/go/example_go/data/build/settings | 34 ++ .../data/projects/go/example_go/documents/readme | 0 .../projects/go/example_go/sources/golang/main.go | 7 + level_3/fake/documents/settings.txt | 86 ++- level_3/fake/specifications/settings.txt | 18 +- 32 files changed, 1337 insertions(+), 779 deletions(-) create mode 100644 level_3/fake/c/main/print/debug.c create mode 100644 level_3/fake/c/main/print/debug.h create mode 100644 level_3/fake/data/projects/go/example_go/data/build/defines create mode 100644 level_3/fake/data/projects/go/example_go/data/build/dependencies create mode 100644 level_3/fake/data/projects/go/example_go/data/build/fakefile create mode 100755 level_3/fake/data/projects/go/example_go/data/build/process_post.sh create mode 100755 level_3/fake/data/projects/go/example_go/data/build/process_pre.sh create mode 100644 level_3/fake/data/projects/go/example_go/data/build/settings create mode 100644 level_3/fake/data/projects/go/example_go/documents/readme create mode 100644 level_3/fake/data/projects/go/example_go/sources/golang/main.go diff --git a/build/stand_alone/fake.settings b/build/stand_alone/fake.settings index e972469..9cb0170 100644 --- a/build/stand_alone/fake.settings +++ b/build/stand_alone/fake.settings @@ -84,7 +84,7 @@ build_sources_program fll/level_2/fss.c fll/level_2/fss/basic.c fll/level_2/fss/ build_sources_program fll/level_2/print.c build_sources_program fll/level_2/program.c fll/level_2/program/common.c fll/level_2/program/print.c fll/level_2/private-program.c -build_sources_program program/fake/main/build.c program/fake/main/clean.c program/fake/main/common.c program/fake/main/fake.c program/fake/main/make.c program/fake/main/print/common.c program/fake/main/print/context.c program/fake/main/print/error.c program/fake/main/print/message.c program/fake/main/print/operation.c program/fake/main/print/warning.c program/fake/main/print/verbose.c program/fake/main/signal.c program/fake/main/skeleton.c program/fake/main/thread.c +build_sources_program program/fake/main/build.c program/fake/main/clean.c program/fake/main/common.c program/fake/main/fake.c program/fake/main/make.c program/fake/main/print/common.c program/fake/main/print/context.c program/fake/main/print/debug.c program/fake/main/print/error.c program/fake/main/print/message.c program/fake/main/print/operation.c program/fake/main/print/warning.c program/fake/main/print/verbose.c program/fake/main/signal.c program/fake/main/skeleton.c program/fake/main/thread.c build_sources_program program/fake/main/build/enumeration.c program/fake/main/build/library.c program/fake/main/build/load.c program/fake/main/build/object.c program/fake/main/build/print/compile.c program/fake/main/build/print/error.c program/fake/main/build/print/message.c program/fake/main/build/print/verbose.c program/fake/main/build/print/warning.c program/fake/main/build/program.c program/fake/main/build/skeleton.c program/fake/main/build/string.c build_sources_program program/fake/main/common/define.c program/fake/main/common/enumeration.c program/fake/main/common/print.c program/fake/main/common/string.c program/fake/main/common/type.c build_sources_program program/fake/main/fake/path_generate.c program/fake/main/fake/do.c diff --git a/level_3/fake/c/main/build.c b/level_3/fake/c/main/build.c index 7125457..c221d75 100644 --- a/level_3/fake/c/main/build.c +++ b/level_3/fake/c/main/build.c @@ -10,73 +10,91 @@ extern "C" { if (!data || !data->main || !data_build) return; if (F_status_is_error(data->main->setting.state.status)) return; + // Only C/C++ is supported here. + if (!(data_build->setting.language == fake_build_language_c_e || data_build->setting.language == fake_build_language_cpp_e)) return; + fake_main_t * const main = data->main; fake_string_dynamic_reset(&main->cache_argument); main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_link_path_s, &main->cache_argument); - if (F_status_is_error(main->setting.state.status)) return; - main->setting.state.status = f_string_dynamic_append_nulless(is_shared ? data->path_build_libraries_shared : data->path_build_libraries_static, &main->cache_argument); - if (F_status_is_error(main->setting.state.status)) return; + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = f_string_dynamic_append_nulless(is_shared ? data->path_build_libraries_shared : data->path_build_libraries_static, &main->cache_argument); + } if (main->cache_argument.used) { - main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); - if (F_status_is_error(main->setting.state.status)) return; + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); + } } - fake_string_dynamic_reset(&main->cache_argument); + if (F_status_is_error_not(main->setting.state.status)) { + fake_string_dynamic_reset(&main->cache_argument); + } - main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_include_s, &main->cache_argument); - if (F_status_is_error(main->setting.state.status)) return; + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_include_s, &main->cache_argument); + } - main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_includes, &main->cache_argument); - if (F_status_is_error(main->setting.state.status)) return; + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_includes, &main->cache_argument); + } if (main->cache_argument.used) { - main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); - if (F_status_is_error(main->setting.state.status)) return; + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); + } } - if (main->setting.work.used) { + if (F_status_is_error_not(main->setting.state.status) && main->setting.work.used) { fake_string_dynamic_reset(&main->cache_argument); main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_include_s, &main->cache_argument); - if (F_status_is_error(main->setting.state.status)) return; - main->setting.state.status = f_string_dynamic_append_nulless(data->path_work_includes, &main->cache_argument); - if (F_status_is_error(main->setting.state.status)) return; + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = f_string_dynamic_append_nulless(data->path_work_includes, &main->cache_argument); + } - main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); - if (F_status_is_error(main->setting.state.status)) return; + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); + } if (data_build->setting.search_shared && (is_shared || !data_build->setting.search_exclusive)) { fake_string_dynamic_reset(&main->cache_argument); - main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_link_path_s, &main->cache_argument); - if (F_status_is_error(main->setting.state.status)) return; + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_link_path_s, &main->cache_argument); + } - main->setting.state.status = f_string_dynamic_append_nulless(data->path_work_libraries_shared, &main->cache_argument); - if (F_status_is_error(main->setting.state.status)) return; + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = f_string_dynamic_append_nulless(data->path_work_libraries_shared, &main->cache_argument); + } - main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); - if (F_status_is_error(main->setting.state.status)) return; + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); + } } if (data_build->setting.search_static && (!is_shared || !data_build->setting.search_exclusive)) { fake_string_dynamic_reset(&main->cache_argument); - main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_link_path_s, &main->cache_argument); - if (F_status_is_error(main->setting.state.status)) return; + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_link_path_s, &main->cache_argument); + } - main->setting.state.status = f_string_dynamic_append_nulless(data->path_work_libraries_static, &main->cache_argument); - if (F_status_is_error(main->setting.state.status)) return; + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = f_string_dynamic_append_nulless(data->path_work_libraries_static, &main->cache_argument); + } - main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); - if (F_status_is_error(main->setting.state.status)) return; + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); + } } } + if (F_status_is_error(main->setting.state.status)) return; + { f_string_statics_t empty = f_string_statics_t_initialize; @@ -633,7 +651,7 @@ extern "C" { fake_build_copy(data, mode, fake_build_setting_files_s, data->path_data_settings, data->path_build_settings, data_build.setting.build_sources_setting, stage.file_sources_settings, 0); - if (data_build.setting.build_language == fake_build_language_bash_e) { + if (data_build.setting.language == fake_build_language_shell_e) { fake_build_object_script(data, &data_build, mode, stage.file_object_script); fake_build_library_script(data, &data_build, mode, stage.file_library_script); @@ -694,7 +712,7 @@ extern "C" { if (data_build.setting.build_static) { main->program.child = fake_build_object(data, &data_build, mode, stage.file_object_static, F_false); - main->program.child = fake_build_library_static_object(data, &data_build, mode, stage.file_library_static_object); + main->program.child = fake_build_library_static_object(data, &data_build, mode, stage.file_library_static_object); // @todo main->program.child = fake_build_library_static(data, &data_build, mode, stage.file_library_static); @@ -737,18 +755,35 @@ extern "C" { main->setting.state.status = f_string_dynamic_append_nulless(*setting_path_source, source); if (F_status_is_error_not(main->setting.state.status) && data_build->setting.has_path_standard) { - if (data_build->setting.build_language == fake_build_language_c_e) { + if (data_build->setting.build_language_path.used) { + main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_language_path, source); + } + else if (data_build->setting.language == fake_build_language_c_e) { main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_c_s, source); } - else if (data_build->setting.build_language == fake_build_language_cpp_e) { + else if (data_build->setting.language == fake_build_language_cpp_e) { main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_cpp_s, source); } - else if (data_build->setting.build_language == fake_build_language_bash_e) { - main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_bash_s, source); + else if (data_build->setting.language == fake_build_language_custom_e) { + main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_custom_s, source); + } + else if (data_build->setting.language == fake_build_language_golang_e) { + main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_golang_s, source); + } + else if (data_build->setting.language == fake_build_language_shell_e) { + main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_shell_s, source); + } + else { + main->setting.state.status = F_skip; } if (F_status_is_error_not(main->setting.state.status)) { - main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, source); + if (main->setting.state.status == F_skip) { + main->setting.state.status = F_okay; + } + else { + main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, source); + } } } diff --git a/level_3/fake/c/main/build/enumeration.h b/level_3/fake/c/main/build/enumeration.h index d60f610..31d38a6 100644 --- a/level_3/fake/c/main/build/enumeration.h +++ b/level_3/fake/c/main/build/enumeration.h @@ -20,18 +20,20 @@ extern "C" { * The build language enumerations. * * fake_build_language_*_e: - * - bash: The GNU Bash language. - * - c: The C language. - * - cpp: The C++ language. - * - zsh: The ZSH language (Similar to and somewhat compatible with GNU Bash). + * - c: The C language. + * - cpp: The C++ language. + * - custom: A language that is not known. + * - golang: The Golang language. + * - shell: A shell scripting language such as GNU Bash or Zsh. */ #ifndef _di_fake_build_language_e_ enum { fake_build_language_none_e = 0, - fake_build_language_bash_e, fake_build_language_c_e, fake_build_language_cpp_e, - fake_build_language_zsh_e, + fake_build_language_custom_e, + fake_build_language_golang_e, + fake_build_language_shell_e, }; // enum #endif // _di_fake_build_language_e_ diff --git a/level_3/fake/c/main/build/library.c b/level_3/fake/c/main/build/library.c index f6ced8e..30a3be0 100644 --- a/level_3/fake/c/main/build/library.c +++ b/level_3/fake/c/main/build/library.c @@ -31,6 +31,35 @@ extern "C" { fake_string_dynamics_reset(&main->cache_arguments); + uint8_t i = 0; + + { + f_number_unsigned_t j = 0; + + f_string_statics_t * const values[] = { + &data_build->setting.build_compiler_arguments, + &data_build->setting.build_compiler_arguments_shared, + &data_build->setting.build_compiler_arguments_library, + &data_build->setting.build_compiler_arguments_library_shared, + }; + + for (i = 0; i < 4; ++i) { + + for (j = 0; j < values[i]->used; ++j) { + + if (!values[i]->array[j].used) continue; + + main->setting.state.status = fll_execute_arguments_add(values[i]->array[j], &main->cache_arguments); + + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); + + return 0; + } + } // for + } // for + } + fake_build_objects_add(data, data_build, &data->path_build_objects_shared, &data_build->setting.build_objects_library, &data_build->setting.build_objects_library_shared); if (F_status_is_error(main->setting.state.status)) { @@ -103,185 +132,189 @@ extern "C" { ¶meter_file_name_nano, }; - uint8_t i = 0; + for (i = 0; i < strings_length; ++i) { - { - for (; i < strings_length; ++i) { - - memcpy(strings[i]->string, fake_build_parameter_library_name_prefix_s.string, sizeof(f_char_t) * fake_build_parameter_library_name_prefix_s.used); - - strings[i]->used += fake_build_parameter_library_name_prefix_s.used; - } // for - - for (i = 0; i < strings_length; ++i) { + memcpy(strings[i]->string, fake_build_parameter_library_name_prefix_s.string, sizeof(f_char_t) * fake_build_parameter_library_name_prefix_s.used); - memcpy(strings[i]->string + strings[i]->used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used); - - strings[i]->used += data_build->setting.build_name.used; - } // for + strings[i]->used += fake_build_parameter_library_name_prefix_s.used; + } // for - for (i = 0; i < strings_length; ++i) { + for (i = 0; i < strings_length; ++i) { - memcpy(strings[i]->string + strings[i]->used, fake_build_parameter_library_name_suffix_shared_s.string, sizeof(f_char_t) * fake_build_parameter_library_name_suffix_shared_s.used); + memcpy(strings[i]->string + strings[i]->used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used); - strings[i]->used += fake_build_parameter_library_name_suffix_shared_s.used; - } // for + strings[i]->used += data_build->setting.build_name.used; + } // for - if (data_build->setting.version_major.used) { - if (data_build->setting.version_major_prefix.used) { - for (i = 1; i < strings_length; ++i) { + for (i = 0; i < strings_length; ++i) { - memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major_prefix.string, sizeof(f_char_t) * data_build->setting.version_major_prefix.used); + memcpy(strings[i]->string + strings[i]->used, fake_build_parameter_library_name_suffix_shared_s.string, sizeof(f_char_t) * fake_build_parameter_library_name_suffix_shared_s.used); - strings[i]->used += data_build->setting.version_major_prefix.used; - } // for - } + strings[i]->used += fake_build_parameter_library_name_suffix_shared_s.used; + } // for + if (data_build->setting.version_major.used) { + if (data_build->setting.version_major_prefix.used) { for (i = 1; i < strings_length; ++i) { - memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major.string, sizeof(f_char_t) * data_build->setting.version_major.used); + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major_prefix.string, sizeof(f_char_t) * data_build->setting.version_major_prefix.used); - strings[i]->used += data_build->setting.version_major.used; + strings[i]->used += data_build->setting.version_major_prefix.used; } // for + } - if (data_build->setting.version_minor.used) { - if (data_build->setting.version_minor_prefix.used) { - for (i = 2; i < strings_length; ++i) { + for (i = 1; i < strings_length; ++i) { - memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor_prefix.string, sizeof(f_char_t) * data_build->setting.version_minor_prefix.used); + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major.string, sizeof(f_char_t) * data_build->setting.version_major.used); - strings[i]->used += data_build->setting.version_minor_prefix.used; - } // for - } + strings[i]->used += data_build->setting.version_major.used; + } // for + if (data_build->setting.version_minor.used) { + if (data_build->setting.version_minor_prefix.used) { for (i = 2; i < strings_length; ++i) { - memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor.string, sizeof(f_char_t) * data_build->setting.version_minor.used); + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor_prefix.string, sizeof(f_char_t) * data_build->setting.version_minor_prefix.used); - strings[i]->used += data_build->setting.version_minor.used; + strings[i]->used += data_build->setting.version_minor_prefix.used; } // for + } - if (data_build->setting.version_micro.used) { - if (data_build->setting.version_micro_prefix.used) { - for (i = 3; i < strings_length; ++i) { + for (i = 2; i < strings_length; ++i) { - memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro_prefix.string, sizeof(f_char_t) * data_build->setting.version_micro_prefix.used); + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor.string, sizeof(f_char_t) * data_build->setting.version_minor.used); - strings[i]->used += data_build->setting.version_micro_prefix.used; - } // for - } + strings[i]->used += data_build->setting.version_minor.used; + } // for + if (data_build->setting.version_micro.used) { + if (data_build->setting.version_micro_prefix.used) { for (i = 3; i < strings_length; ++i) { - memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro.string, sizeof(f_char_t) * data_build->setting.version_micro.used); + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro_prefix.string, sizeof(f_char_t) * data_build->setting.version_micro_prefix.used); - strings[i]->used += data_build->setting.version_micro.used; + strings[i]->used += data_build->setting.version_micro_prefix.used; } // for + } - if (data_build->setting.version_nano.used) { - if (data_build->setting.version_nano_prefix.used) { - for (i = 4; i < strings_length; ++i) { + for (i = 3; i < strings_length; ++i) { - memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano_prefix.string, sizeof(f_char_t) * data_build->setting.version_nano_prefix.used); + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro.string, sizeof(f_char_t) * data_build->setting.version_micro.used); - strings[i]->used += data_build->setting.version_nano_prefix.used; - } // for - } + strings[i]->used += data_build->setting.version_micro.used; + } // for + if (data_build->setting.version_nano.used) { + if (data_build->setting.version_nano_prefix.used) { for (i = 4; i < strings_length; ++i) { - memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano.string, sizeof(f_char_t) * data_build->setting.version_nano.used); + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano_prefix.string, sizeof(f_char_t) * data_build->setting.version_nano_prefix.used); - strings[i]->used += data_build->setting.version_nano.used; + strings[i]->used += data_build->setting.version_nano_prefix.used; } // for } + + for (i = 4; i < strings_length; ++i) { + + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano.string, sizeof(f_char_t) * data_build->setting.version_nano.used); + + strings[i]->used += data_build->setting.version_nano.used; + } // for } } } + } + + parameter_file_name_string[parameter_file_name.used] = 0; + parameter_file_name_major_string[parameter_file_name_major.used] = 0; + parameter_file_name_minor_string[parameter_file_name_minor.used] = 0; + parameter_file_name_micro_string[parameter_file_name_micro.used] = 0; + parameter_file_name_nano_string[parameter_file_name_nano.used] = 0; + + main->setting.state.status = fll_execute_arguments_add(fake_build_parameter_library_shared_s, &main->cache_arguments); - parameter_file_name_string[parameter_file_name.used] = 0; - parameter_file_name_major_string[parameter_file_name_major.used] = 0; - parameter_file_name_minor_string[parameter_file_name_minor.used] = 0; - parameter_file_name_micro_string[parameter_file_name_micro.used] = 0; - parameter_file_name_nano_string[parameter_file_name_nano.used] = 0; + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); + + return 0; } - { - main->setting.state.status = fll_execute_arguments_add(fake_build_parameter_library_shared_s, &main->cache_arguments); + fake_string_dynamic_reset(&main->cache_argument); - if (F_status_is_error(main->setting.state.status)) { - fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); + main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_shared_prefix_s, &main->cache_argument); - return 0; + if (F_status_is_error_not(main->setting.state.status)) { + if (data_build->setting.version_target == fake_build_version_major_e) { + main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_major, &main->cache_argument); + } + else if (data_build->setting.version_target == fake_build_version_minor_e) { + main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_minor, &main->cache_argument); + } + else if (data_build->setting.version_target == fake_build_version_micro_e) { + main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_micro, &main->cache_argument); + } + else if (data_build->setting.version_target == fake_build_version_nano_e) { + main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_nano, &main->cache_argument); } + } - fake_string_dynamic_reset(&main->cache_argument); + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless)); - main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_shared_prefix_s, &main->cache_argument); + return 0; + } - if (F_status_is_error_not(main->setting.state.status)) { - if (data_build->setting.version_target == fake_build_version_major_e) { - main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_major, &main->cache_argument); - } - else if (data_build->setting.version_target == fake_build_version_minor_e) { - main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_minor, &main->cache_argument); - } - else if (data_build->setting.version_target == fake_build_version_micro_e) { - main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_micro, &main->cache_argument); - } - else if (data_build->setting.version_target == fake_build_version_nano_e) { - main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_nano, &main->cache_argument); - } - } + main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); - if (F_status_is_error(main->setting.state.status)) { - fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless)); + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = fll_execute_arguments_add(fake_build_parameter_library_output_s, &main->cache_arguments); + } - return 0; - } + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); - main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); + return 0; + } - if (F_status_is_error_not(main->setting.state.status)) { - main->setting.state.status = fll_execute_arguments_add(fake_build_parameter_library_output_s, &main->cache_arguments); - } + fake_string_dynamic_reset(&main->cache_argument); - if (F_status_is_error(main->setting.state.status)) { - fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); + main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_libraries_shared, &main->cache_argument); - return 0; + if (F_status_is_error_not(main->setting.state.status)) { + if (data_build->setting.version_file == fake_build_version_major_e) { + main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_major, &main->cache_argument); + } + else if (data_build->setting.version_file == fake_build_version_minor_e) { + main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_minor, &main->cache_argument); + } + else if (data_build->setting.version_file == fake_build_version_micro_e) { + main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_micro, &main->cache_argument); + } + else if (data_build->setting.version_file == fake_build_version_nano_e) { + main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_nano, &main->cache_argument); } + } - fake_string_dynamic_reset(&main->cache_argument); + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless)); - main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_libraries_shared, &main->cache_argument); + return 0; + } - if (F_status_is_error_not(main->setting.state.status)) { - if (data_build->setting.version_file == fake_build_version_major_e) { - main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_major, &main->cache_argument); - } - else if (data_build->setting.version_file == fake_build_version_minor_e) { - main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_minor, &main->cache_argument); - } - else if (data_build->setting.version_file == fake_build_version_micro_e) { - main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_micro, &main->cache_argument); - } - else if (data_build->setting.version_file == fake_build_version_nano_e) { - main->setting.state.status = f_string_dynamic_append_nulless(parameter_file_name_nano, &main->cache_argument); - } - } + main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); - main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); - if (F_status_is_error_not(main->setting.state.status)) { - fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_library_e); - } + return 0; + } - if (F_status_is_error(main->setting.state.status)) { - fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); + fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_library_e); - return 0; - } + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(fake_build_arguments_standard_add)); + + return 0; } { @@ -292,7 +325,7 @@ extern "C" { } { - bool dont_links[] = { + uint8_t dont_links[] = { !parameter_file_name_major.used, data_build->setting.version_file == fake_build_version_major_e || !parameter_file_name_major.used, data_build->setting.version_file == fake_build_version_minor_e || !parameter_file_name_minor.used, @@ -372,6 +405,32 @@ extern "C" { fake_string_dynamics_reset(&main->cache_arguments); f_number_unsigned_t i = 0; + f_number_unsigned_t j = 0; + + { + f_string_statics_t * const values[] = { + &data_build->setting.build_compiler_arguments, + &data_build->setting.build_compiler_arguments_static, + &data_build->setting.build_compiler_arguments_library, + &data_build->setting.build_compiler_arguments_library_static, + }; + + for (i = 0; i < 4; ++i) { + + for (j = 0; j < values[i]->used; ++j) { + + if (!values[i]->array[j].used) continue; + + main->setting.state.status = fll_execute_arguments_add(values[i]->array[j], &main->cache_arguments); + + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); + + return 0; + } + } // for + } // for + } for (; i < data_build->setting.build_indexer_arguments.used; ++i) { @@ -422,8 +481,6 @@ extern "C" { } if (F_status_is_error_not(main->setting.state.status)) { - f_number_unsigned_t j = 0; - const f_string_dynamics_t *sources[2] = { &data_build->setting.build_sources_library, &data_build->setting.build_sources_library_static, @@ -536,6 +593,34 @@ extern "C" { fake_string_dynamics_reset(&main->cache_arguments); + uint8_t i = 0; + f_number_unsigned_t j = 0; + + { + f_string_statics_t * const values[] = { + &data_build->setting.build_compiler_arguments, + &data_build->setting.build_compiler_arguments_static, + &data_build->setting.build_compiler_arguments_object, + &data_build->setting.build_compiler_arguments_object_static, + }; + + for (i = 0; i < 4; ++i) { + + for (j = 0; j < values[i]->used; ++j) { + + if (!values[i]->array[j].used) continue; + + main->setting.state.status = fll_execute_arguments_add(values[i]->array[j], &main->cache_arguments); + + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); + + return 0; + } + } // for + } // for + } + int result = main->program.child; const f_string_dynamics_t *sources[2] = { @@ -543,8 +628,6 @@ extern "C" { &data_build->setting.build_sources_library_static, }; - f_number_unsigned_t i = 0; - f_number_unsigned_t j = 0; uint8_t k = 0; for (i = 0; i < 2; ++i) { @@ -657,28 +740,30 @@ extern "C" { return 0; } - const f_string_static_t values[] = { - main->cache_1, - fake_build_parameter_object_compile_s, - fake_build_parameter_object_static_s, - fake_build_parameter_object_output_s, - main->cache_argument, - }; + { + const f_string_static_t values[] = { + main->cache_1, + fake_build_parameter_object_compile_s, + fake_build_parameter_object_static_s, + fake_build_parameter_object_output_s, + main->cache_argument, + }; - for (k = 0; k < 5; ++k) { + for (k = 0; k < 5; ++k) { - if (!values[k].used) continue; + if (!values[k].used) continue; - main->setting.state.status = fll_execute_arguments_add(values[k], &main->cache_arguments); - if (F_status_is_error(main->setting.state.status)) break; - } // for + main->setting.state.status = fll_execute_arguments_add(values[k], &main->cache_arguments); + if (F_status_is_error(main->setting.state.status)) break; + } // for - fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_object_e); + fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_object_e); - if (F_status_is_error(main->setting.state.status)) { - fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); - break; + break; + } } result = fake_execute(data, data_build->environment, data_build->setting.build_compiler); diff --git a/level_3/fake/c/main/build/load.c b/level_3/fake/c/main/build/load.c index 22234e4..9dd27ff 100644 --- a/level_3/fake/c/main/build/load.c +++ b/level_3/fake/c/main/build/load.c @@ -218,6 +218,7 @@ extern "C" { f_string_dynamics_t build_compiler = f_string_dynamics_t_initialize; f_string_dynamics_t build_indexer = f_string_dynamics_t_initialize; f_string_dynamics_t build_language = f_string_dynamics_t_initialize; + f_string_dynamics_t build_language_path = f_string_dynamics_t_initialize; f_string_dynamics_t build_name = f_string_dynamics_t_initialize; f_string_dynamics_t build_script = f_string_dynamics_t_initialize; f_string_dynamics_t build_shared = f_string_dynamics_t_initialize; @@ -225,6 +226,7 @@ extern "C" { f_string_dynamics_t has_path_standard = f_string_dynamics_t_initialize; f_string_dynamics_t path_headers = f_string_dynamics_t_initialize; f_string_dynamics_t path_language = f_string_dynamics_t_initialize; + f_string_dynamics_t path_language_path = f_string_dynamics_t_initialize; f_string_dynamics_t path_library_script = f_string_dynamics_t_initialize; f_string_dynamics_t path_library_shared = f_string_dynamics_t_initialize; f_string_dynamics_t path_library_static = f_string_dynamics_t_initialize; @@ -260,9 +262,22 @@ extern "C" { const f_string_static_t settings_name[] = { fake_build_setting_name_build_compiler_s, + fake_build_setting_name_build_compiler_arguments_s, + fake_build_setting_name_build_compiler_arguments_shared_s, + fake_build_setting_name_build_compiler_arguments_static_s, + fake_build_setting_name_build_compiler_arguments_library_s, + fake_build_setting_name_build_compiler_arguments_library_shared_s, + fake_build_setting_name_build_compiler_arguments_library_static_s, + fake_build_setting_name_build_compiler_arguments_object_s, + fake_build_setting_name_build_compiler_arguments_object_shared_s, + fake_build_setting_name_build_compiler_arguments_object_static_s, + fake_build_setting_name_build_compiler_arguments_program_s, + fake_build_setting_name_build_compiler_arguments_program_shared_s, + fake_build_setting_name_build_compiler_arguments_program_static_s, fake_build_setting_name_build_indexer_s, fake_build_setting_name_build_indexer_arguments_s, fake_build_setting_name_build_language_s, + fake_build_setting_name_build_language_path_s, fake_build_setting_name_build_libraries_s, fake_build_setting_name_build_libraries_shared_s, fake_build_setting_name_build_libraries_static_s, @@ -357,9 +372,22 @@ extern "C" { f_string_dynamics_t *settings_value[] = { &build_compiler, + &setting->build_compiler_arguments, + &setting->build_compiler_arguments_shared, + &setting->build_compiler_arguments_static, + &setting->build_compiler_arguments_library, + &setting->build_compiler_arguments_library_shared, + &setting->build_compiler_arguments_library_static, + &setting->build_compiler_arguments_object, + &setting->build_compiler_arguments_object_shared, + &setting->build_compiler_arguments_object_static, + &setting->build_compiler_arguments_program, + &setting->build_compiler_arguments_program_shared, + &setting->build_compiler_arguments_program_static, &build_indexer, &setting->build_indexer_arguments, &build_language, + &build_language_path, &setting->build_libraries, &setting->build_libraries_shared, &setting->build_libraries_static, @@ -454,9 +482,22 @@ extern "C" { bool settings_matches[] = { F_false, // build_compiler + F_false, // setting->build_compiler_arguments + F_false, // setting->build_compiler_arguments_shared + F_false, // setting->build_compiler_arguments_static + F_false, // setting->build_compiler_arguments_library + F_false, // setting->build_compiler_arguments_library_shared + F_false, // setting->build_compiler_arguments_library_static + F_false, // setting->build_compiler_arguments_object + F_false, // setting->build_compiler_arguments_object_shared + F_false, // setting->build_compiler_arguments_object_static + F_false, // setting->build_compiler_arguments_program + F_false, // setting->build_compiler_arguments_program_shared + F_false, // setting->build_compiler_arguments_program_static F_false, // build_indexer F_false, // setting->build_indexer_arguments F_false, // build_language + F_false, // build_language_path F_false, // setting->build_libraries F_false, // setting->build_libraries_shared F_false, // setting->build_libraries_static @@ -682,6 +723,7 @@ extern "C" { fake_build_setting_name_build_compiler_s, fake_build_setting_name_build_indexer_s, fake_build_setting_name_build_language_s, + fake_build_setting_name_build_language_path_s, fake_build_setting_name_build_name_s, fake_build_setting_name_build_script_s, fake_build_setting_name_build_shared_s, @@ -727,6 +769,7 @@ extern "C" { &build_compiler, &build_indexer, &build_language, + &build_language_path, &build_name, &build_script, &build_shared, @@ -772,6 +815,7 @@ extern "C" { 0, // build_compiler 0, // build_indexer 0, // build_language + 0, // build_language_path 0, // build_name &setting->build_script, // build_script &setting->build_shared, // build_shared @@ -806,7 +850,8 @@ extern "C" { f_string_dynamic_t *settings_single_destination[] = { &setting->build_compiler, // build_compiler &setting->build_indexer, // build_indexer - 0, // build_language + &setting->build_language, // build_language + &setting->build_language_path, // build_language_path &setting->build_name, // build_name 0, // build_script 0, // build_shared @@ -849,54 +894,56 @@ extern "C" { }; const bool settings_single_matches[] = { - settings_matches[0], // build_compiler - settings_matches[1], // build_indexer - settings_matches[3], // build_language - settings_matches[7], // build_name - settings_matches[14], // build_script - settings_matches[15], // build_shared - settings_matches[31], // build_static - settings_matches[57], // has_path_standard - settings_matches[60], // path_headers - settings_matches[61], // path_language - settings_matches[62], // path_library_script - settings_matches[63], // path_library_shared - settings_matches[64], // path_library_static - settings_matches[65], // path_object_script - settings_matches[66], // path_object_shared - settings_matches[67], // path_object_static - settings_matches[68], // path_program_script - settings_matches[69], // path_program_shared - settings_matches[70], // path_program_static - settings_matches[71], // path_sources - settings_matches[72], // path_sources_headers - settings_matches[73], // path_sources_library - settings_matches[74], // path_sources_object - settings_matches[75], // path_sources_program - settings_matches[76], // path_sources_script - settings_matches[77], // preserve_path_headers - settings_matches[78], // process_post - settings_matches[79], // process_pre - settings_matches[80], // search_exclusive - settings_matches[81], // search_shared - settings_matches[82], // search_static - settings_matches[83], // stage - settings_matches[84], // version_file - settings_matches[85], // version_major - settings_matches[86], // version_major_prefix - settings_matches[87], // version_micro - settings_matches[88], // version_micro_prefix - settings_matches[89], // version_minor - settings_matches[90], // version_minor_prefix - settings_matches[91], // version_nano - settings_matches[92], // version_nano_prefix - settings_matches[93], // version_target + settings_matches[0], // build_compiler + settings_matches[13], // build_indexer + settings_matches[15], // build_language + settings_matches[16], // build_language_path + settings_matches[20], // build_name + settings_matches[27], // build_script + settings_matches[28], // build_shared + settings_matches[44], // build_static + settings_matches[70], // has_path_standard + settings_matches[73], // path_headers + settings_matches[74], // path_language + settings_matches[75], // path_library_script + settings_matches[76], // path_library_shared + settings_matches[77], // path_library_static + settings_matches[78], // path_object_script + settings_matches[79], // path_object_shared + settings_matches[80], // path_object_static + settings_matches[81], // path_program_script + settings_matches[82], // path_program_shared + settings_matches[83], // path_program_static + settings_matches[84], // path_sources + settings_matches[85], // path_sources_headers + settings_matches[86], // path_sources_library + settings_matches[87], // path_sources_object + settings_matches[88], // path_sources_program + settings_matches[89], // path_sources_script + settings_matches[90], // preserve_path_headers + settings_matches[91], // process_post + settings_matches[92], // process_pre + settings_matches[93], // search_exclusive + settings_matches[94], // search_shared + settings_matches[95], // search_static + settings_matches[96], // stage + settings_matches[97], // version_file + settings_matches[98], // version_major + settings_matches[99], // version_major_prefix + settings_matches[100], // version_micro + settings_matches[101], // version_micro_prefix + settings_matches[102], // version_minor + settings_matches[103], // version_minor_prefix + settings_matches[104], // version_nano + settings_matches[105], // version_nano_prefix + settings_matches[106], // version_target }; const f_string_static_t settings_single_string_default[] = { fake_build_setting_default_gcc_s, // build_compiler fake_build_setting_default_ar_s, // build_indexer f_string_empty_s, // build_language + f_string_empty_s, // build_language_path f_string_empty_s, // build_name f_string_empty_s, // build_script f_string_empty_s, // build_shared @@ -941,13 +988,14 @@ extern "C" { uint8_t *settings_single_language[] = { 0, // build_compiler 0, // build_indexer - &setting->build_language, // build_language + &setting->language, // build_language (setting as code via language) }; uint8_t *settings_single_version[] = { 0, // build_compiler 0, // build_indexer 0, // build_language + 0, // build_language_path 0, // build_name 0, // build_script 0, // build_shared @@ -993,6 +1041,7 @@ extern "C" { 0, // build_compiler 0, // build_indexer 0, // build_language + 0, // build_language_path 0, // build_name 0, // build_script 0, // build_shared @@ -1038,6 +1087,7 @@ extern "C" { f_string_empty_s, // build_compiler f_string_empty_s, // build_indexer f_string_empty_s, // build_language + f_string_empty_s, // build_language_path f_string_empty_s, // build_name fake_common_setting_bool_yes_s, // build_script fake_common_setting_bool_yes_s, // build_shared @@ -1079,11 +1129,12 @@ extern "C" { fake_build_version_major_s, // version_target }; - // 1 = "yes" or "no", 2 = path/, 3 = literal, 4 = "bash", "c", or "c++", 5 = "major", "minor", "micro", or "nano", 6 = literal, no slash. + // 1 = "yes" or "no", 2 = path/, 3 = literal, 4 = language such as "c", 5 = "major", "minor", "micro", or "nano", 6 = literal, no slash. static const uint8_t settings_single_type[] = { 3, // build_compiler 3, // build_indexer 4, // build_language + 2, // build_language_path 6, // build_name 1, // build_script 1, // build_shared @@ -1127,7 +1178,7 @@ extern "C" { f_string_dynamic_t *single_source = 0; - for (i = 0; i < 42; ++i) { + for (i = 0; i < 43; ++i) { // Assign the default for literal and path types. if (!settings_single_matches[i] && settings_single_destination[i]) { @@ -1160,19 +1211,37 @@ extern "C" { } } else if (settings_single_type[i] == 4) { - if (f_compare_dynamic_trim(*single_source, fake_build_language_bash_s) == F_equal_to) { - *settings_single_language[i] = fake_build_language_bash_e; - } - else if (f_compare_dynamic_trim(*single_source, fake_build_language_c_s) == F_equal_to) { + if (f_compare_dynamic_trim(*single_source, fake_build_language_c_s) == F_equal_to) { + *settings_single_destination[i] = fake_build_language_c_s; *settings_single_language[i] = fake_build_language_c_e; } else if (f_compare_dynamic_trim(*single_source, fake_build_language_cpp_s) == F_equal_to) { + *settings_single_destination[i] = fake_build_language_cpp_s; *settings_single_language[i] = fake_build_language_cpp_e; } + else if (f_compare_dynamic_trim(*single_source, fake_build_language_golang_s) == F_equal_to) { + *settings_single_destination[i] = fake_build_language_golang_s; + *settings_single_language[i] = fake_build_language_golang_e; + } + else if (f_compare_dynamic_trim(*single_source, fake_build_language_shell_s) == F_equal_to) { + *settings_single_destination[i] = fake_build_language_shell_s; + *settings_single_language[i] = fake_build_language_shell_e; + } + else if (single_source->used) { + *settings_single_language[i] = fake_build_language_custom_e; + settings_single_destination[i]->used = 0; + + main->setting.state.status = f_string_dynamic_append(*single_source, settings_single_destination[i]); + + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append)); + + break; + } + } else { + *settings_single_destination[i] = fake_build_language_c_s; *settings_single_language[i] = fake_build_language_c_e; - - fake_build_print_warning_setting_language_may_only_be(&main->program.warning, settings_single_name[i], path_file, fake_build_language_c_s); } } else if (settings_single_type[i] == 5) { @@ -1250,36 +1319,36 @@ extern "C" { // Handle special defaults for path sources. if (F_status_is_error_not(main->setting.state.status)) { - // [72] path_sources_headers. - if (!settings_matches[72]) { + // [85] path_sources_headers. + if (!settings_matches[85]) { setting->path_sources_headers.used = 0; main->setting.state.status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_headers); } - // [73] path_sources_library. - if (!settings_matches[73] && F_status_is_error_not(main->setting.state.status)) { + // [86] path_sources_library. + if (!settings_matches[86] && F_status_is_error_not(main->setting.state.status)) { setting->path_sources_library.used = 0; main->setting.state.status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_library); } - // [74] path_sources_object. - if (!settings_matches[74] && F_status_is_error_not(main->setting.state.status)) { + // [87] path_sources_object. + if (!settings_matches[87] && F_status_is_error_not(main->setting.state.status)) { setting->path_sources_object.used = 0; main->setting.state.status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_object); } - // [75] path_sources_program. - if (!settings_matches[75] && F_status_is_error_not(main->setting.state.status)) { + // [88] path_sources_program. + if (!settings_matches[88] && F_status_is_error_not(main->setting.state.status)) { setting->path_sources_program.used = 0; main->setting.state.status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_program); } - // [76] path_sources_script. - if (!settings_matches[76] && F_status_is_error_not(main->setting.state.status)) { + // [89] path_sources_script. + if (!settings_matches[89] && F_status_is_error_not(main->setting.state.status)) { setting->path_sources_script.used = 0; main->setting.state.status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_script); @@ -1308,6 +1377,7 @@ extern "C" { f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_compiler.array, &build_compiler.used, &build_compiler.size, &f_string_dynamics_delete_callback); f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_indexer.array, &build_indexer.used, &build_indexer.size, &f_string_dynamics_delete_callback); f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_language.array, &build_language.used, &build_language.size, &f_string_dynamics_delete_callback); + f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_language_path.array, &build_language_path.used, &build_language_path.size, &f_string_dynamics_delete_callback); f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_name.array, &build_name.used, &build_name.size, &f_string_dynamics_delete_callback); f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_script.array, &build_script.used, &build_script.size, &f_string_dynamics_delete_callback); f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_shared.array, &build_shared.used, &build_shared.size, &f_string_dynamics_delete_callback); @@ -1418,9 +1488,9 @@ extern "C" { setting->search_static = F_true; } - if (setting->build_language == fake_build_language_c_e || setting->build_language == fake_build_language_cpp_e) { + if (setting->language == fake_build_language_c_e || setting->language == fake_build_language_cpp_e) { if (setting->build_shared == F_false && setting->build_static == F_false) { - fake_build_print_warning_setting_both_cannot_when_language(&main->program.warning, fake_build_setting_name_build_shared_s, fake_build_setting_name_build_static_s, setting->build_language == fake_build_language_c_e ? fake_build_language_c_s : fake_build_language_cpp_s); + fake_build_print_warning_setting_both_cannot_when_language(&main->program.warning, fake_build_setting_name_build_shared_s, fake_build_setting_name_build_static_s, setting->language == fake_build_language_c_e ? fake_build_language_c_s : fake_build_language_cpp_s); main->setting.state.status = F_status_set_error(F_failure); } diff --git a/level_3/fake/c/main/build/object.c b/level_3/fake/c/main/build/object.c index 484ac8e..1bbb77c 100644 --- a/level_3/fake/c/main/build/object.c +++ b/level_3/fake/c/main/build/object.c @@ -30,14 +30,42 @@ extern "C" { int result = 0; int result_final = 0; - f_number_unsigned_t i = 0; + uint8_t i = 0; f_number_unsigned_t j = 0; + { + f_string_statics_t * const values[] = { + &data_build->setting.build_compiler_arguments, + shared ? &data_build->setting.build_compiler_arguments_shared : &data_build->setting.build_compiler_arguments_static, + &data_build->setting.build_compiler_arguments_object, + shared ? &data_build->setting.build_compiler_arguments_object_shared : &data_build->setting.build_compiler_arguments_object_static, + }; + + for (i = 0; i < 4; ++i) { + + for (j = 0; j < values[i]->used; ++j) { + + if (!values[i]->array[j].used) continue; + + main->setting.state.status = fll_execute_arguments_add(values[i]->array[j], &main->cache_arguments); + if (F_status_is_error(main->setting.state.status)) break; + } // for + + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); + + break; + } + } // for + } + const f_string_dynamics_t *sources[2] = { &data_build->setting.build_sources_object, shared ? &data_build->setting.build_sources_object_shared : &data_build->setting.build_sources_object_static, }; + uint8_t k = 0; + if (shared) { fake_build_print_compile_object_shared(&main->program.message); } @@ -146,7 +174,7 @@ extern "C" { break; } - { + if (data_build->setting.language == fake_build_language_c_e || data_build->setting.language == fake_build_language_cpp_e) { const f_string_static_t values[] = { shared ? f_string_empty_s : fake_build_parameter_library_static_s, fake_build_parameter_object_compile_s, @@ -154,11 +182,11 @@ extern "C" { main->cache_argument, }; - for (uint8_t i = 0; i < 4; ++i) { + for (k = 0; k < 4; ++k) { - if (!values[i].used) continue; + if (!values[k].used) continue; - main->setting.state.status = fll_execute_arguments_add(values[i], &main->cache_arguments); + main->setting.state.status = fll_execute_arguments_add(values[k], &main->cache_arguments); if (F_status_is_error(main->setting.state.status)) break; } // for diff --git a/level_3/fake/c/main/build/print/warning.c b/level_3/fake/c/main/build/print/warning.c index b229a4b..ef402b9 100644 --- a/level_3/fake/c/main/build/print/warning.c +++ b/level_3/fake/c/main/build/print/warning.c @@ -51,33 +51,6 @@ extern "C" { } #endif // _di_fake_build_print_warning_setting_both_cannot_using_language_ -#ifndef _di_fake_build_print_warning_setting_language_may_only_be_ - f_status_t fake_build_print_warning_setting_language_may_only_be(fl_print_t * const print, const f_string_static_t name, const f_string_static_t path, const f_string_static_t default_to) { - - if (print->verbosity < f_console_verbosity_verbose_e) return F_output_not; - - f_file_stream_lock(print->to); - - fl_print_format("%[%QThe setting '%]", print->to, print->context, print->prefix, print->context); - fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, name, print->notable); - fl_print_format("%[' in the file '%]", print->to, print->context, print->context); - fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, path, print->notable); - fl_print_format("%[' may only be one of '%]", print->to, print->context, print->context); - fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, fake_build_language_bash_s, print->notable); - fl_print_format("%[', '%]", print->to, print->context, print->context); - fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, fake_build_language_c_s, print->notable); - fl_print_format("%[', or '%]", print->to, print->context, print->context); - fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, fake_build_language_cpp_s, print->notable); - fl_print_format("%[', defaulting to '%]", print->to, print->context, print->context); - fl_print_format(f_string_format_r_single_s.string, print->to, print->notable, default_to, print->notable); - fl_print_format("%['.%]%r", print->to, print->context, print->context, f_string_eol_s); - - f_file_stream_unlock(print->to); - - return F_okay; - } -#endif // _di_fake_build_print_warning_setting_language_may_only_be_ - #ifndef _di_fake_build_print_warning_setting_required_default_to_ f_status_t fake_build_print_warning_setting_required_default_to(fl_print_t * const print, const f_string_static_t name, const f_string_static_t path, const f_string_static_t default_to) { diff --git a/level_3/fake/c/main/build/print/warning.h b/level_3/fake/c/main/build/print/warning.h index 662197b..9ca09ff 100644 --- a/level_3/fake/c/main/build/print/warning.h +++ b/level_3/fake/c/main/build/print/warning.h @@ -109,34 +109,6 @@ extern "C" { #endif // _di_fake_build_print_error_settings_both_cannot_using_language_ /** - * Print warning message that the setting may only be from a specific set of allowed language values. - * - * @param print - * The output structure to print to. - * - * This requires print.custom to be fake_main_t. - * - * This does not alter print.custom.setting.state.status. - * @param name - * The name for the setting. - * @param path - * The path to the setting file. - * @param default_to - * The value being defaulted to. - * - * @return - * F_okay on success. - * F_output_not on success, but no printing is performed. - * - * @see f_file_stream_lock() - * @see f_file_stream_unlock() - * @see fl_print_format() - */ -#ifndef _di_fake_build_print_warning_setting_language_may_only_be_ - extern f_status_t fake_build_print_warning_setting_language_may_only_be(fl_print_t * const print, const f_string_static_t name, const f_string_static_t path, const f_string_static_t default_to); -#endif // _di_fake_build_print_warning_setting_language_may_only_be_ - -/** * Print warning message regarding two parameters being both false when using a given language. * * @param print diff --git a/level_3/fake/c/main/build/program.c b/level_3/fake/c/main/build/program.c index 56530d8..cd6c78e 100644 --- a/level_3/fake/c/main/build/program.c +++ b/level_3/fake/c/main/build/program.c @@ -31,6 +31,36 @@ extern "C" { fake_string_dynamics_reset(&main->cache_arguments); + uint8_t i = 0; + + { + f_number_unsigned_t j = 0; + + f_string_statics_t * const values[] = { + &data_build->setting.build_compiler_arguments, + &data_build->setting.build_compiler_arguments_shared, + &data_build->setting.build_compiler_arguments_program, + &data_build->setting.build_compiler_arguments_program_shared, + }; + + for (i = 0; i < 4; ++i) { + + for (j = 0; j < values[i]->used; ++j) { + + if (!values[i]->array[j].used) continue; + + main->setting.state.status = fll_execute_arguments_add(values[i]->array[j], &main->cache_arguments); + if (F_status_is_error(main->setting.state.status)) break; + } // for + + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); + + break; + } + } // for + } + fake_build_objects_add(data, data_build, &data->path_build_objects_shared, &data_build->setting.build_objects_program, &data_build->setting.build_objects_program_shared); if (F_status_is_error(main->setting.state.status)) { @@ -48,32 +78,34 @@ extern "C" { } if (F_status_is_error_not(main->setting.state.status)) { - fake_string_dynamic_reset(&main->cache_argument); + if (data_build->setting.language == fake_build_language_c_e || data_build->setting.language == fake_build_language_cpp_e) { + fake_string_dynamic_reset(&main->cache_argument); - main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_programs_shared, &main->cache_argument); + main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_programs_shared, &main->cache_argument); - if (F_status_is_error_not(main->setting.state.status)) { - main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &main->cache_argument); - } + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &main->cache_argument); + } - if (F_status_is_error(main->setting.state.status)) { - fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless)); + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless)); - return 0; - } + return 0; + } - const f_string_static_t values[] = { - fake_build_parameter_library_output_s, - main->cache_argument, - }; + const f_string_static_t values[] = { + fake_build_parameter_library_output_s, + main->cache_argument, + }; - for (uint8_t i = 0; i < 2; ++i) { + for (i = 0; i < 2; ++i) { - if (!values[i].used) continue; + if (!values[i].used) continue; - main->setting.state.status = fll_execute_arguments_add(values[i], &main->cache_arguments); - if (F_status_is_error(main->setting.state.status)) break; - } // for + main->setting.state.status = fll_execute_arguments_add(values[i], &main->cache_arguments); + if (F_status_is_error(main->setting.state.status)) break; + } // for + } } // If project-specific library sources exist, then the -lbuild_name needs to be added to the arguments. @@ -127,6 +159,34 @@ extern "C" { fake_string_dynamics_reset(&main->cache_arguments); + { + f_number_unsigned_t j = 0; + + f_string_statics_t * const values[] = { + &data_build->setting.build_compiler_arguments, + &data_build->setting.build_compiler_arguments_static, + &data_build->setting.build_compiler_arguments_program, + &data_build->setting.build_compiler_arguments_program_static, + }; + + for (uint8_t i = 0; i < 4; ++i) { + + for (j = 0; j < values[i]->used; ++j) { + + if (!values[i]->array[j].used) continue; + + main->setting.state.status = fll_execute_arguments_add(values[i]->array[j], &main->cache_arguments); + if (F_status_is_error(main->setting.state.status)) break; + } // for + + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); + + break; + } + } // for + } + fake_build_objects_add(data, data_build, &data->path_build_objects_static, &data_build->setting.build_objects_program, &data_build->setting.build_objects_program_static); if (F_status_is_error(main->setting.state.status)) { @@ -143,24 +203,60 @@ extern "C" { return 0; } - if (F_status_is_error_not(main->setting.state.status)) { + if (data_build->setting.language == fake_build_language_c_e || data_build->setting.language == fake_build_language_cpp_e) { + if (F_status_is_error_not(main->setting.state.status)) { - // Only include the library if there are sources that would result in it being built. - if (data_build->setting.build_sources_library.used || data_build->setting.build_sources_library_static.used) { - fake_string_dynamic_reset(&main->cache_argument); + // Only include the library if there are sources that would result in it being built. + if (data_build->setting.build_sources_library.used || data_build->setting.build_sources_library_static.used) { + fake_string_dynamic_reset(&main->cache_argument); - main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_libraries_static, &main->cache_argument); + main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_libraries_static, &main->cache_argument); - if (F_status_is_error_not(main->setting.state.status)) { - main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_name_prefix_s, &main->cache_argument); + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_name_prefix_s, &main->cache_argument); + } + + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &main->cache_argument); + } + + if (F_status_is_error_not(main->setting.state.status)) { + main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_name_suffix_static_s, &main->cache_argument); + } + + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless)); + + return 0; + } + + main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); + + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); + + return 0; + } } + main->setting.state.status = fll_execute_arguments_add(fake_build_parameter_library_static_s, &main->cache_arguments); + if (F_status_is_error_not(main->setting.state.status)) { - main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &main->cache_argument); + main->setting.state.status = fll_execute_arguments_add(fake_build_parameter_library_output_s, &main->cache_arguments); } + if (F_status_is_error(main->setting.state.status)) { + fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); + + return 0; + } + + fake_string_dynamic_reset(&main->cache_argument); + + main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_programs_static, &main->cache_argument); + if (F_status_is_error_not(main->setting.state.status)) { - main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_name_suffix_static_s, &main->cache_argument); + main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &main->cache_argument); } if (F_status_is_error(main->setting.state.status)) { @@ -177,40 +273,6 @@ extern "C" { return 0; } } - - main->setting.state.status = fll_execute_arguments_add(fake_build_parameter_library_static_s, &main->cache_arguments); - - if (F_status_is_error_not(main->setting.state.status)) { - main->setting.state.status = fll_execute_arguments_add(fake_build_parameter_library_output_s, &main->cache_arguments); - } - - if (F_status_is_error(main->setting.state.status)) { - fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); - - return 0; - } - - fake_string_dynamic_reset(&main->cache_argument); - - main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_programs_static, &main->cache_argument); - - if (F_status_is_error_not(main->setting.state.status)) { - main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &main->cache_argument); - } - - if (F_status_is_error(main->setting.state.status)) { - fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless)); - - return 0; - } - - main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments); - - if (F_status_is_error(main->setting.state.status)) { - fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add)); - - return 0; - } } // The cache_argument should be safe at this point to be reset and reused by this function. diff --git a/level_3/fake/c/main/build/string.c b/level_3/fake/c/main/build/string.c index 3295f7e..73bff40 100644 --- a/level_3/fake/c/main/build/string.c +++ b/level_3/fake/c/main/build/string.c @@ -14,18 +14,30 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static #endif // _di_fake_build_s_ #ifndef _di_fake_build_language_s_ - const f_string_static_t fake_build_language_bash_s = macro_f_string_static_t_initialize_1(FAKE_build_language_bash_s, 0, FAKE_build_language_bash_s_length); const f_string_static_t fake_build_language_c_s = macro_f_string_static_t_initialize_1(FAKE_build_language_c_s, 0, FAKE_build_language_c_s_length); const f_string_static_t fake_build_language_cpp_s = macro_f_string_static_t_initialize_1(FAKE_build_language_cpp_s, 0, FAKE_build_language_cpp_s_length); - const f_string_static_t fake_build_language_zsh_s = macro_f_string_static_t_initialize_1(FAKE_build_language_zsh_s, 0, FAKE_build_language_zsh_s_length); + const f_string_static_t fake_build_language_custom_s = macro_f_string_static_t_initialize_1(FAKE_build_language_custom_s, 0, FAKE_build_language_custom_s_length); + const f_string_static_t fake_build_language_golang_s = macro_f_string_static_t_initialize_1(FAKE_build_language_golang_s, 0, FAKE_build_language_golang_s_length); + const f_string_static_t fake_build_language_shell_s = macro_f_string_static_t_initialize_1(FAKE_build_language_shell_s, 0, FAKE_build_language_shell_s_length); #endif // _di_fake_build_language_s_ -#ifndef _di_fake_build_version_s_ - const f_string_static_t fake_build_version_major_s = macro_f_string_static_t_initialize_1(FAKE_build_version_major_s, 0, FAKE_build_version_major_s_length); - const f_string_static_t fake_build_version_minor_s = macro_f_string_static_t_initialize_1(FAKE_build_version_minor_s, 0, FAKE_build_version_minor_s_length); - const f_string_static_t fake_build_version_micro_s = macro_f_string_static_t_initialize_1(FAKE_build_version_micro_s, 0, FAKE_build_version_micro_s_length); - const f_string_static_t fake_build_version_nano_s = macro_f_string_static_t_initialize_1(FAKE_build_version_nano_s, 0, FAKE_build_version_nano_s_length); -#endif // _di_fake_build_version_s_ +#ifndef _di_fake_build_parameter_ + const f_string_static_t fake_build_parameter_library_include_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_include_s, 0, FAKE_build_parameter_library_include_s_length); + const f_string_static_t fake_build_parameter_library_link_file_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_link_file_s, 0, FAKE_build_parameter_library_link_file_s_length); + const f_string_static_t fake_build_parameter_library_link_path_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_link_path_s, 0, FAKE_build_parameter_library_link_path_s_length); + const f_string_static_t fake_build_parameter_library_name_prefix_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_name_prefix_s, 0, FAKE_build_parameter_library_name_prefix_s_length); + const f_string_static_t fake_build_parameter_library_name_suffix_shared_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_name_suffix_shared_s, 0, FAKE_build_parameter_library_name_suffix_shared_s_length); + const f_string_static_t fake_build_parameter_library_name_suffix_static_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_name_suffix_static_s, 0, FAKE_build_parameter_library_name_suffix_static_s_length); + const f_string_static_t fake_build_parameter_library_output_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_output_s, 0, FAKE_build_parameter_library_output_s_length); + const f_string_static_t fake_build_parameter_library_shared_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_shared_s, 0, FAKE_build_parameter_library_shared_s_length); + const f_string_static_t fake_build_parameter_library_static_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_static_s, 0, FAKE_build_parameter_library_static_s_length); + const f_string_static_t fake_build_parameter_library_shared_prefix_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_shared_prefix_s, 0, FAKE_build_parameter_library_shared_prefix_s_length); + + const f_string_static_t fake_build_parameter_object_compile_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_object_compile_s, 0, FAKE_build_parameter_object_compile_s_length); + const f_string_static_t fake_build_parameter_object_name_suffix_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_object_name_suffix_s, 0, FAKE_build_parameter_object_name_suffix_s_length); + const f_string_static_t fake_build_parameter_object_output_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_object_output_s, 0, FAKE_build_parameter_object_output_s_length); + const f_string_static_t fake_build_parameter_object_static_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_object_static_s, 0, FAKE_build_parameter_object_static_s_length); +#endif // _di_fake_build_parameter_ #ifndef _di_fake_build_setting_t_ const f_string_static_t fake_build_setting_default_ar_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_default_ar_s, 0, FAKE_build_setting_default_ar_s_length); @@ -35,9 +47,22 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static const f_string_static_t fake_build_setting_default_yes_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_default_yes_s, 0, FAKE_build_setting_default_yes_s_length); const f_string_static_t fake_build_setting_name_build_compiler_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_compiler_s, 0, FAKE_build_setting_name_build_compiler_s_length); + const f_string_static_t fake_build_setting_name_build_compiler_arguments_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_compiler_arguments_s, 0, FAKE_build_setting_name_build_compiler_arguments_s_length); + const f_string_static_t fake_build_setting_name_build_compiler_arguments_shared_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_compiler_arguments_shared_s, 0, FAKE_build_setting_name_build_compiler_arguments_shared_s_length); + const f_string_static_t fake_build_setting_name_build_compiler_arguments_static_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_compiler_arguments_static_s, 0, FAKE_build_setting_name_build_compiler_arguments_static_s_length); + const f_string_static_t fake_build_setting_name_build_compiler_arguments_library_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_compiler_arguments_library_s, 0, FAKE_build_setting_name_build_compiler_arguments_library_s_length); + const f_string_static_t fake_build_setting_name_build_compiler_arguments_library_shared_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_compiler_arguments_library_shared_s, 0, FAKE_build_setting_name_build_compiler_arguments_library_shared_s_length); + const f_string_static_t fake_build_setting_name_build_compiler_arguments_library_static_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_compiler_arguments_library_static_s, 0, FAKE_build_setting_name_build_compiler_arguments_library_static_s_length); + const f_string_static_t fake_build_setting_name_build_compiler_arguments_object_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_compiler_arguments_object_s, 0, FAKE_build_setting_name_build_compiler_arguments_object_s_length); + const f_string_static_t fake_build_setting_name_build_compiler_arguments_object_shared_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_compiler_arguments_object_shared_s, 0, FAKE_build_setting_name_build_compiler_arguments_object_shared_s_length); + const f_string_static_t fake_build_setting_name_build_compiler_arguments_object_static_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_compiler_arguments_object_static_s, 0, FAKE_build_setting_name_build_compiler_arguments_object_static_s_length); + const f_string_static_t fake_build_setting_name_build_compiler_arguments_program_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_compiler_arguments_program_s, 0, FAKE_build_setting_name_build_compiler_arguments_program_s_length); + const f_string_static_t fake_build_setting_name_build_compiler_arguments_program_shared_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_compiler_arguments_program_shared_s, 0, FAKE_build_setting_name_build_compiler_arguments_program_shared_s_length); + const f_string_static_t fake_build_setting_name_build_compiler_arguments_program_static_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_compiler_arguments_program_static_s, 0, FAKE_build_setting_name_build_compiler_arguments_program_static_s_length); const f_string_static_t fake_build_setting_name_build_indexer_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_indexer_s, 0, FAKE_build_setting_name_build_indexer_s_length); const f_string_static_t fake_build_setting_name_build_indexer_arguments_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_indexer_arguments_s, 0, FAKE_build_setting_name_build_indexer_arguments_s_length); const f_string_static_t fake_build_setting_name_build_language_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_language_s, 0, FAKE_build_setting_name_build_language_s_length); + const f_string_static_t fake_build_setting_name_build_language_path_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_language_path_s, 0, FAKE_build_setting_name_build_language_path_s_length); const f_string_static_t fake_build_setting_name_build_libraries_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_libraries_s, 0, FAKE_build_setting_name_build_libraries_s_length); const f_string_static_t fake_build_setting_name_build_libraries_shared_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_libraries_shared_s, 0, FAKE_build_setting_name_build_libraries_shared_s_length); const f_string_static_t fake_build_setting_name_build_libraries_static_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_build_libraries_static_s, 0, FAKE_build_setting_name_build_libraries_static_s_length); @@ -153,23 +178,12 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static const f_string_static_t fake_build_stage_sources_settings_s = macro_f_string_static_t_initialize_1(FAKE_build_stage_sources_settings_s, 0, FAKE_build_stage_sources_settings_s_length); #endif // _di_fake_build_stage_t_ -#ifndef _di_fake_build_parameter_ - const f_string_static_t fake_build_parameter_library_include_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_include_s, 0, FAKE_build_parameter_library_include_s_length); - const f_string_static_t fake_build_parameter_library_link_file_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_link_file_s, 0, FAKE_build_parameter_library_link_file_s_length); - const f_string_static_t fake_build_parameter_library_link_path_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_link_path_s, 0, FAKE_build_parameter_library_link_path_s_length); - const f_string_static_t fake_build_parameter_library_name_prefix_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_name_prefix_s, 0, FAKE_build_parameter_library_name_prefix_s_length); - const f_string_static_t fake_build_parameter_library_name_suffix_shared_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_name_suffix_shared_s, 0, FAKE_build_parameter_library_name_suffix_shared_s_length); - const f_string_static_t fake_build_parameter_library_name_suffix_static_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_name_suffix_static_s, 0, FAKE_build_parameter_library_name_suffix_static_s_length); - const f_string_static_t fake_build_parameter_library_output_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_output_s, 0, FAKE_build_parameter_library_output_s_length); - const f_string_static_t fake_build_parameter_library_shared_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_shared_s, 0, FAKE_build_parameter_library_shared_s_length); - const f_string_static_t fake_build_parameter_library_static_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_static_s, 0, FAKE_build_parameter_library_static_s_length); - const f_string_static_t fake_build_parameter_library_shared_prefix_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_library_shared_prefix_s, 0, FAKE_build_parameter_library_shared_prefix_s_length); - - const f_string_static_t fake_build_parameter_object_compile_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_object_compile_s, 0, FAKE_build_parameter_object_compile_s_length); - const f_string_static_t fake_build_parameter_object_name_suffix_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_object_name_suffix_s, 0, FAKE_build_parameter_object_name_suffix_s_length); - const f_string_static_t fake_build_parameter_object_output_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_object_output_s, 0, FAKE_build_parameter_object_output_s_length); - const f_string_static_t fake_build_parameter_object_static_s = macro_f_string_static_t_initialize_1(FAKE_build_parameter_object_static_s, 0, FAKE_build_parameter_object_static_s_length); -#endif // _di_fake_build_parameter_ +#ifndef _di_fake_build_version_s_ + const f_string_static_t fake_build_version_major_s = macro_f_string_static_t_initialize_1(FAKE_build_version_major_s, 0, FAKE_build_version_major_s_length); + const f_string_static_t fake_build_version_minor_s = macro_f_string_static_t_initialize_1(FAKE_build_version_minor_s, 0, FAKE_build_version_minor_s_length); + const f_string_static_t fake_build_version_micro_s = macro_f_string_static_t_initialize_1(FAKE_build_version_micro_s, 0, FAKE_build_version_micro_s_length); + const f_string_static_t fake_build_version_nano_s = macro_f_string_static_t_initialize_1(FAKE_build_version_nano_s, 0, FAKE_build_version_nano_s_length); +#endif // _di_fake_build_version_s_ #ifdef __cplusplus } // extern "C" diff --git a/level_3/fake/c/main/build/string.h b/level_3/fake/c/main/build/string.h index c64ee75..c9802cb 100644 --- a/level_3/fake/c/main/build/string.h +++ b/level_3/fake/c/main/build/string.h @@ -43,47 +43,81 @@ extern "C" { * The build language strings. * * fake_build_language_*_s: - * - bash: The GNU Bash language. - * - c: The C language. - * - cpp: The C++ language. - * - zsh: The ZSH language (Similar to and somewhat compatible with GNU Bash). + * - c: The C language. + * - cpp: The C++ language. + * - custom: Any other langauge. + * - golang: The Golang language. + * - shell: A shell scripting language such as GNU Bash or Zsh */ #ifndef _di_fake_build_language_s_ - #define FAKE_build_language_bash_s "bash" - #define FAKE_build_language_c_s "c" - #define FAKE_build_language_cpp_s "c++" - #define FAKE_build_language_zsh_s "zsh" + #define FAKE_build_language_c_s "c" + #define FAKE_build_language_cpp_s "c++" + #define FAKE_build_language_custom_s "custom" + #define FAKE_build_language_golang_s "golang" + #define FAKE_build_language_shell_s "shell" - #define FAKE_build_language_bash_s_length 4 - #define FAKE_build_language_c_s_length 1 - #define FAKE_build_language_cpp_s_length 3 - #define FAKE_build_language_zsh_s_length 3 + #define FAKE_build_language_c_s_length 1 + #define FAKE_build_language_cpp_s_length 3 + #define FAKE_build_language_custom_s_length 6 + #define FAKE_build_language_golang_s_length 6 + #define FAKE_build_language_shell_s_length 5 - extern const f_string_static_t fake_build_language_bash_s; extern const f_string_static_t fake_build_language_c_s; extern const f_string_static_t fake_build_language_cpp_s; - extern const f_string_static_t fake_build_language_zsh_s; + extern const f_string_static_t fake_build_language_custom_s; + extern const f_string_static_t fake_build_language_golang_s; + extern const f_string_static_t fake_build_language_shell_s; #endif // _di_fake_build_language_s_ -/** - * The program version strings. - */ -#ifndef _di_fake_build_version_s_ - #define FAKE_build_version_major_s "major" - #define FAKE_build_version_minor_s "minor" - #define FAKE_build_version_micro_s "micro" - #define FAKE_build_version_nano_s "nano" +#ifndef _di_fake_build_parameter_s_ + #define FAKE_build_parameter_library_include_s "-I" + #define FAKE_build_parameter_library_link_file_s "-l" + #define FAKE_build_parameter_library_link_path_s "-L" + #define FAKE_build_parameter_library_name_prefix_s "lib" + #define FAKE_build_parameter_library_name_suffix_shared_s ".so" + #define FAKE_build_parameter_library_name_suffix_static_s ".a" + #define FAKE_build_parameter_library_output_s "-o" + #define FAKE_build_parameter_library_shared_s "-shared" + #define FAKE_build_parameter_library_static_s "-static" + #define FAKE_build_parameter_library_shared_prefix_s "-Wl,-soname," - #define FAKE_build_version_major_s_length 5 - #define FAKE_build_version_minor_s_length 5 - #define FAKE_build_version_micro_s_length 5 - #define FAKE_build_version_nano_s_length 4 + #define FAKE_build_parameter_library_include_s_length 2 + #define FAKE_build_parameter_library_link_file_s_length 2 + #define FAKE_build_parameter_library_link_path_s_length 2 + #define FAKE_build_parameter_library_name_prefix_s_length 3 + #define FAKE_build_parameter_library_name_suffix_shared_s_length 3 + #define FAKE_build_parameter_library_name_suffix_static_s_length 2 + #define FAKE_build_parameter_library_output_s_length 2 + #define FAKE_build_parameter_library_shared_s_length 7 + #define FAKE_build_parameter_library_static_s_length 7 + #define FAKE_build_parameter_library_shared_prefix_s_length 12 - extern const f_string_static_t fake_build_version_major_s; - extern const f_string_static_t fake_build_version_minor_s; - extern const f_string_static_t fake_build_version_micro_s; - extern const f_string_static_t fake_build_version_nano_s; -#endif // _di_fake_build_version_s_ + extern const f_string_static_t fake_build_parameter_library_include_s; + extern const f_string_static_t fake_build_parameter_library_link_file_s; + extern const f_string_static_t fake_build_parameter_library_link_path_s; + extern const f_string_static_t fake_build_parameter_library_name_prefix_s; + extern const f_string_static_t fake_build_parameter_library_name_suffix_shared_s; + extern const f_string_static_t fake_build_parameter_library_name_suffix_static_s; + extern const f_string_static_t fake_build_parameter_library_output_s; + extern const f_string_static_t fake_build_parameter_library_shared_s; + extern const f_string_static_t fake_build_parameter_library_static_s; + extern const f_string_static_t fake_build_parameter_library_shared_prefix_s; + + #define FAKE_build_parameter_object_compile_s "-c" + #define FAKE_build_parameter_object_name_suffix_s ".o" + #define FAKE_build_parameter_object_output_s "-o" + #define FAKE_build_parameter_object_static_s "-static" + + #define FAKE_build_parameter_object_compile_s_length 2 + #define FAKE_build_parameter_object_name_suffix_s_length 2 + #define FAKE_build_parameter_object_output_s_length 2 + #define FAKE_build_parameter_object_static_s_length 7 + + extern const f_string_static_t fake_build_parameter_object_compile_s; + extern const f_string_static_t fake_build_parameter_object_name_suffix_s; + extern const f_string_static_t fake_build_parameter_object_output_s; + extern const f_string_static_t fake_build_parameter_object_static_s; +#endif // _di_fake_build_parameter_s_ #ifndef _di_fake_build_setting_s_ #define FAKE_build_setting_default_ar_s "ar" @@ -92,100 +126,113 @@ extern "C" { #define FAKE_build_setting_default_version_prefix_s "." #define FAKE_build_setting_default_yes_s "yes" - #define FAKE_build_setting_name_build_compiler_s "build_compiler" - #define FAKE_build_setting_name_build_indexer_s "build_indexer" - #define FAKE_build_setting_name_build_indexer_arguments_s "build_indexer_arguments" - #define FAKE_build_setting_name_build_language_s "build_language" - #define FAKE_build_setting_name_build_libraries_s "build_libraries" - #define FAKE_build_setting_name_build_libraries_shared_s "build_libraries_shared" - #define FAKE_build_setting_name_build_libraries_static_s "build_libraries_static" - #define FAKE_build_setting_name_build_name_s "build_name" - #define FAKE_build_setting_name_build_objects_library_s "build_objects_library" - #define FAKE_build_setting_name_build_objects_library_shared_s "build_objects_library_shared" - #define FAKE_build_setting_name_build_objects_library_static_s "build_objects_library_static" - #define FAKE_build_setting_name_build_objects_program_s "build_objects_program" - #define FAKE_build_setting_name_build_objects_program_shared_s "build_objects_program_shared" - #define FAKE_build_setting_name_build_objects_program_static_s "build_objects_program_static" - #define FAKE_build_setting_name_build_script_s "build_script" - #define FAKE_build_setting_name_build_shared_s "build_shared" - #define FAKE_build_setting_name_build_sources_documentation_s "build_sources_documentation" - #define FAKE_build_setting_name_build_sources_headers_s "build_sources_headers" - #define FAKE_build_setting_name_build_sources_headers_shared_s "build_sources_headers_shared" - #define FAKE_build_setting_name_build_sources_headers_static_s "build_sources_headers_static" - #define FAKE_build_setting_name_build_sources_library_s "build_sources_library" - #define FAKE_build_setting_name_build_sources_library_shared_s "build_sources_library_shared" - #define FAKE_build_setting_name_build_sources_library_static_s "build_sources_library_static" - #define FAKE_build_setting_name_build_sources_object_s "build_sources_object" - #define FAKE_build_setting_name_build_sources_object_shared_s "build_sources_object_shared" - #define FAKE_build_setting_name_build_sources_object_static_s "build_sources_object_static" - #define FAKE_build_setting_name_build_sources_program_s "build_sources_program" - #define FAKE_build_setting_name_build_sources_program_shared_s "build_sources_program_shared" - #define FAKE_build_setting_name_build_sources_program_static_s "build_sources_program_static" - #define FAKE_build_setting_name_build_sources_script_s "build_sources_script" - #define FAKE_build_setting_name_build_sources_setting_s "build_sources_setting" - #define FAKE_build_setting_name_build_static_s "build_static" - #define FAKE_build_setting_name_defines_s "defines" - #define FAKE_build_setting_name_defines_library_s "defines_library" - #define FAKE_build_setting_name_defines_library_shared_s "defines_library_shared" - #define FAKE_build_setting_name_defines_library_static_s "defines_library_static" - #define FAKE_build_setting_name_defines_object_s "defines_object" - #define FAKE_build_setting_name_defines_object_shared_s "defines_object_shared" - #define FAKE_build_setting_name_defines_object_static_s "defines_object_static" - #define FAKE_build_setting_name_defines_program_s "defines_program" - #define FAKE_build_setting_name_defines_program_shared_s "defines_program_shared" - #define FAKE_build_setting_name_defines_program_static_s "defines_program_static" - #define FAKE_build_setting_name_defines_shared_s "defines_shared" - #define FAKE_build_setting_name_defines_static_s "defines_static" - #define FAKE_build_setting_name_environment_s "environment" - #define FAKE_build_setting_name_flags_s "flags" - #define FAKE_build_setting_name_flags_library_s "flags_library" - #define FAKE_build_setting_name_flags_library_shared_s "flags_library_shared" - #define FAKE_build_setting_name_flags_library_static_s "flags_library_static" - #define FAKE_build_setting_name_flags_object_s "flags_object" - #define FAKE_build_setting_name_flags_object_shared_s "flags_object_shared" - #define FAKE_build_setting_name_flags_object_static_s "flags_object_static" - #define FAKE_build_setting_name_flags_program_s "flags_program" - #define FAKE_build_setting_name_flags_program_shared_s "flags_program_shared" - #define FAKE_build_setting_name_flags_program_static_s "flags_program_static" - #define FAKE_build_setting_name_flags_shared_s "flags_shared" - #define FAKE_build_setting_name_flags_static_s "flags_static" - #define FAKE_build_setting_name_has_path_standard_s "has_path_standard" - #define FAKE_build_setting_name_modes_s "modes" - #define FAKE_build_setting_name_modes_default_s "modes_default" - #define FAKE_build_setting_name_path_headers_s "path_headers" - #define FAKE_build_setting_name_path_language_s "path_language" - #define FAKE_build_setting_name_path_library_script_s "path_library_script" - #define FAKE_build_setting_name_path_library_shared_s "path_library_shared" - #define FAKE_build_setting_name_path_library_static_s "path_library_static" - #define FAKE_build_setting_name_path_object_script_s "path_object_script" - #define FAKE_build_setting_name_path_object_shared_s "path_object_shared" - #define FAKE_build_setting_name_path_object_static_s "path_object_static" - #define FAKE_build_setting_name_path_program_script_s "path_program_script" - #define FAKE_build_setting_name_path_program_shared_s "path_program_shared" - #define FAKE_build_setting_name_path_program_static_s "path_program_static" - #define FAKE_build_setting_name_path_sources_s "path_sources" - #define FAKE_build_setting_name_path_sources_headers_s "path_sources_headers" - #define FAKE_build_setting_name_path_sources_library_s "path_sources_library" - #define FAKE_build_setting_name_path_sources_object_s "path_sources_object" - #define FAKE_build_setting_name_path_sources_program_s "path_sources_program" - #define FAKE_build_setting_name_path_sources_script_s "path_sources_script" - #define FAKE_build_setting_name_preserve_path_headers_s "preserve_path_headers" - #define FAKE_build_setting_name_process_post_s "process_post" - #define FAKE_build_setting_name_process_pre_s "process_pre" - #define FAKE_build_setting_name_search_exclusive_s "search_exclusive" - #define FAKE_build_setting_name_search_shared_s "search_shared" - #define FAKE_build_setting_name_search_static_s "search_static" - #define FAKE_build_setting_name_stage_s "stage" - #define FAKE_build_setting_name_version_file_s "version_file" - #define FAKE_build_setting_name_version_major_s "version_major" - #define FAKE_build_setting_name_version_major_prefix_s "version_major_prefix" - #define FAKE_build_setting_name_version_micro_s "version_micro" - #define FAKE_build_setting_name_version_micro_prefix_s "version_micro_prefix" - #define FAKE_build_setting_name_version_minor_s "version_minor" - #define FAKE_build_setting_name_version_minor_prefix_s "version_minor_prefix" - #define FAKE_build_setting_name_version_nano_s "version_nano" - #define FAKE_build_setting_name_version_nano_prefix_s "version_nano_prefix" - #define FAKE_build_setting_name_version_target_s "version_target" + #define FAKE_build_setting_name_build_compiler_s "build_compiler" + #define FAKE_build_setting_name_build_compiler_arguments_s "build_compiler_arguments" + #define FAKE_build_setting_name_build_compiler_arguments_shared_s "build_compiler_arguments_shared" + #define FAKE_build_setting_name_build_compiler_arguments_static_s "build_compiler_arguments_static" + #define FAKE_build_setting_name_build_compiler_arguments_library_s "build_compiler_arguments_library" + #define FAKE_build_setting_name_build_compiler_arguments_library_shared_s "build_compiler_arguments_library_shared" + #define FAKE_build_setting_name_build_compiler_arguments_library_static_s "build_compiler_arguments_library_static" + #define FAKE_build_setting_name_build_compiler_arguments_object_s "build_compiler_arguments_object" + #define FAKE_build_setting_name_build_compiler_arguments_object_shared_s "build_compiler_arguments_object_shared" + #define FAKE_build_setting_name_build_compiler_arguments_object_static_s "build_compiler_arguments_object_static" + #define FAKE_build_setting_name_build_compiler_arguments_program_s "build_compiler_arguments_program" + #define FAKE_build_setting_name_build_compiler_arguments_program_shared_s "build_compiler_arguments_program_shared" + #define FAKE_build_setting_name_build_compiler_arguments_program_static_s "build_compiler_arguments_program_static" + #define FAKE_build_setting_name_build_indexer_s "build_indexer" + #define FAKE_build_setting_name_build_indexer_arguments_s "build_indexer_arguments" + #define FAKE_build_setting_name_build_language_s "build_language" + #define FAKE_build_setting_name_build_language_path_s "build_language_path" + #define FAKE_build_setting_name_build_libraries_s "build_libraries" + #define FAKE_build_setting_name_build_libraries_shared_s "build_libraries_shared" + #define FAKE_build_setting_name_build_libraries_static_s "build_libraries_static" + #define FAKE_build_setting_name_build_name_s "build_name" + #define FAKE_build_setting_name_build_objects_library_s "build_objects_library" + #define FAKE_build_setting_name_build_objects_library_shared_s "build_objects_library_shared" + #define FAKE_build_setting_name_build_objects_library_static_s "build_objects_library_static" + #define FAKE_build_setting_name_build_objects_program_s "build_objects_program" + #define FAKE_build_setting_name_build_objects_program_shared_s "build_objects_program_shared" + #define FAKE_build_setting_name_build_objects_program_static_s "build_objects_program_static" + #define FAKE_build_setting_name_build_script_s "build_script" + #define FAKE_build_setting_name_build_shared_s "build_shared" + #define FAKE_build_setting_name_build_sources_documentation_s "build_sources_documentation" + #define FAKE_build_setting_name_build_sources_headers_s "build_sources_headers" + #define FAKE_build_setting_name_build_sources_headers_shared_s "build_sources_headers_shared" + #define FAKE_build_setting_name_build_sources_headers_static_s "build_sources_headers_static" + #define FAKE_build_setting_name_build_sources_library_s "build_sources_library" + #define FAKE_build_setting_name_build_sources_library_shared_s "build_sources_library_shared" + #define FAKE_build_setting_name_build_sources_library_static_s "build_sources_library_static" + #define FAKE_build_setting_name_build_sources_object_s "build_sources_object" + #define FAKE_build_setting_name_build_sources_object_shared_s "build_sources_object_shared" + #define FAKE_build_setting_name_build_sources_object_static_s "build_sources_object_static" + #define FAKE_build_setting_name_build_sources_program_s "build_sources_program" + #define FAKE_build_setting_name_build_sources_program_shared_s "build_sources_program_shared" + #define FAKE_build_setting_name_build_sources_program_static_s "build_sources_program_static" + #define FAKE_build_setting_name_build_sources_script_s "build_sources_script" + #define FAKE_build_setting_name_build_sources_setting_s "build_sources_setting" + #define FAKE_build_setting_name_build_static_s "build_static" + #define FAKE_build_setting_name_defines_s "defines" + #define FAKE_build_setting_name_defines_library_s "defines_library" + #define FAKE_build_setting_name_defines_library_shared_s "defines_library_shared" + #define FAKE_build_setting_name_defines_library_static_s "defines_library_static" + #define FAKE_build_setting_name_defines_object_s "defines_object" + #define FAKE_build_setting_name_defines_object_shared_s "defines_object_shared" + #define FAKE_build_setting_name_defines_object_static_s "defines_object_static" + #define FAKE_build_setting_name_defines_program_s "defines_program" + #define FAKE_build_setting_name_defines_program_shared_s "defines_program_shared" + #define FAKE_build_setting_name_defines_program_static_s "defines_program_static" + #define FAKE_build_setting_name_defines_shared_s "defines_shared" + #define FAKE_build_setting_name_defines_static_s "defines_static" + #define FAKE_build_setting_name_environment_s "environment" + #define FAKE_build_setting_name_flags_s "flags" + #define FAKE_build_setting_name_flags_library_s "flags_library" + #define FAKE_build_setting_name_flags_library_shared_s "flags_library_shared" + #define FAKE_build_setting_name_flags_library_static_s "flags_library_static" + #define FAKE_build_setting_name_flags_object_s "flags_object" + #define FAKE_build_setting_name_flags_object_shared_s "flags_object_shared" + #define FAKE_build_setting_name_flags_object_static_s "flags_object_static" + #define FAKE_build_setting_name_flags_program_s "flags_program" + #define FAKE_build_setting_name_flags_program_shared_s "flags_program_shared" + #define FAKE_build_setting_name_flags_program_static_s "flags_program_static" + #define FAKE_build_setting_name_flags_shared_s "flags_shared" + #define FAKE_build_setting_name_flags_static_s "flags_static" + #define FAKE_build_setting_name_has_path_standard_s "has_path_standard" + #define FAKE_build_setting_name_modes_s "modes" + #define FAKE_build_setting_name_modes_default_s "modes_default" + #define FAKE_build_setting_name_path_headers_s "path_headers" + #define FAKE_build_setting_name_path_language_s "path_language" + #define FAKE_build_setting_name_path_library_script_s "path_library_script" + #define FAKE_build_setting_name_path_library_shared_s "path_library_shared" + #define FAKE_build_setting_name_path_library_static_s "path_library_static" + #define FAKE_build_setting_name_path_object_script_s "path_object_script" + #define FAKE_build_setting_name_path_object_shared_s "path_object_shared" + #define FAKE_build_setting_name_path_object_static_s "path_object_static" + #define FAKE_build_setting_name_path_program_script_s "path_program_script" + #define FAKE_build_setting_name_path_program_shared_s "path_program_shared" + #define FAKE_build_setting_name_path_program_static_s "path_program_static" + #define FAKE_build_setting_name_path_sources_s "path_sources" + #define FAKE_build_setting_name_path_sources_headers_s "path_sources_headers" + #define FAKE_build_setting_name_path_sources_library_s "path_sources_library" + #define FAKE_build_setting_name_path_sources_object_s "path_sources_object" + #define FAKE_build_setting_name_path_sources_program_s "path_sources_program" + #define FAKE_build_setting_name_path_sources_script_s "path_sources_script" + #define FAKE_build_setting_name_preserve_path_headers_s "preserve_path_headers" + #define FAKE_build_setting_name_process_post_s "process_post" + #define FAKE_build_setting_name_process_pre_s "process_pre" + #define FAKE_build_setting_name_search_exclusive_s "search_exclusive" + #define FAKE_build_setting_name_search_shared_s "search_shared" + #define FAKE_build_setting_name_search_static_s "search_static" + #define FAKE_build_setting_name_stage_s "stage" + #define FAKE_build_setting_name_version_file_s "version_file" + #define FAKE_build_setting_name_version_major_s "version_major" + #define FAKE_build_setting_name_version_major_prefix_s "version_major_prefix" + #define FAKE_build_setting_name_version_micro_s "version_micro" + #define FAKE_build_setting_name_version_micro_prefix_s "version_micro_prefix" + #define FAKE_build_setting_name_version_minor_s "version_minor" + #define FAKE_build_setting_name_version_minor_prefix_s "version_minor_prefix" + #define FAKE_build_setting_name_version_nano_s "version_nano" + #define FAKE_build_setting_name_version_nano_prefix_s "version_nano_prefix" + #define FAKE_build_setting_name_version_target_s "version_target" #define FAKE_build_setting_default_ar_s_length 2 #define FAKE_build_setting_default_gcc_s_length 3 @@ -193,100 +240,113 @@ extern "C" { #define FAKE_build_setting_default_version_prefix_s_length 1 #define FAKE_build_setting_default_yes_s_length 3 - #define FAKE_build_setting_name_build_compiler_s_length 14 - #define FAKE_build_setting_name_build_indexer_s_length 13 - #define FAKE_build_setting_name_build_indexer_arguments_s_length 23 - #define FAKE_build_setting_name_build_language_s_length 14 - #define FAKE_build_setting_name_build_libraries_s_length 15 - #define FAKE_build_setting_name_build_libraries_shared_s_length 22 - #define FAKE_build_setting_name_build_libraries_static_s_length 22 - #define FAKE_build_setting_name_build_name_s_length 10 - #define FAKE_build_setting_name_build_objects_library_s_length 21 - #define FAKE_build_setting_name_build_objects_library_shared_s_length 28 - #define FAKE_build_setting_name_build_objects_library_static_s_length 28 - #define FAKE_build_setting_name_build_objects_program_s_length 21 - #define FAKE_build_setting_name_build_objects_program_shared_s_length 28 - #define FAKE_build_setting_name_build_objects_program_static_s_length 28 - #define FAKE_build_setting_name_build_script_s_length 12 - #define FAKE_build_setting_name_build_shared_s_length 12 - #define FAKE_build_setting_name_build_sources_documentation_s_length 27 - #define FAKE_build_setting_name_build_sources_headers_s_length 21 - #define FAKE_build_setting_name_build_sources_headers_shared_s_length 28 - #define FAKE_build_setting_name_build_sources_headers_static_s_length 28 - #define FAKE_build_setting_name_build_sources_library_s_length 21 - #define FAKE_build_setting_name_build_sources_library_shared_s_length 28 - #define FAKE_build_setting_name_build_sources_library_static_s_length 28 - #define FAKE_build_setting_name_build_sources_object_s_length 20 - #define FAKE_build_setting_name_build_sources_object_shared_s_length 27 - #define FAKE_build_setting_name_build_sources_object_static_s_length 27 - #define FAKE_build_setting_name_build_sources_program_s_length 21 - #define FAKE_build_setting_name_build_sources_program_shared_s_length 28 - #define FAKE_build_setting_name_build_sources_program_static_s_length 28 - #define FAKE_build_setting_name_build_sources_script_s_length 20 - #define FAKE_build_setting_name_build_sources_setting_s_length 21 - #define FAKE_build_setting_name_build_static_s_length 12 - #define FAKE_build_setting_name_environment_s_length 11 - #define FAKE_build_setting_name_defines_s_length 7 - #define FAKE_build_setting_name_defines_library_s_length 15 - #define FAKE_build_setting_name_defines_library_shared_s_length 22 - #define FAKE_build_setting_name_defines_library_static_s_length 22 - #define FAKE_build_setting_name_defines_object_s_length 14 - #define FAKE_build_setting_name_defines_object_shared_s_length 21 - #define FAKE_build_setting_name_defines_object_static_s_length 21 - #define FAKE_build_setting_name_defines_program_s_length 15 - #define FAKE_build_setting_name_defines_program_shared_s_length 22 - #define FAKE_build_setting_name_defines_program_static_s_length 22 - #define FAKE_build_setting_name_defines_shared_s_length 14 - #define FAKE_build_setting_name_defines_static_s_length 14 - #define FAKE_build_setting_name_flags_s_length 5 - #define FAKE_build_setting_name_flags_library_s_length 13 - #define FAKE_build_setting_name_flags_library_shared_s_length 20 - #define FAKE_build_setting_name_flags_library_static_s_length 20 - #define FAKE_build_setting_name_flags_object_s_length 12 - #define FAKE_build_setting_name_flags_object_shared_s_length 19 - #define FAKE_build_setting_name_flags_object_static_s_length 19 - #define FAKE_build_setting_name_flags_program_s_length 13 - #define FAKE_build_setting_name_flags_program_shared_s_length 20 - #define FAKE_build_setting_name_flags_program_static_s_length 20 - #define FAKE_build_setting_name_flags_shared_s_length 12 - #define FAKE_build_setting_name_flags_static_s_length 12 - #define FAKE_build_setting_name_has_path_standard_s_length 17 - #define FAKE_build_setting_name_modes_s_length 5 - #define FAKE_build_setting_name_modes_default_s_length 13 - #define FAKE_build_setting_name_path_headers_s_length 12 - #define FAKE_build_setting_name_path_language_s_length 13 - #define FAKE_build_setting_name_path_library_script_s_length 19 - #define FAKE_build_setting_name_path_library_shared_s_length 19 - #define FAKE_build_setting_name_path_library_static_s_length 19 - #define FAKE_build_setting_name_path_object_script_s_length 18 - #define FAKE_build_setting_name_path_object_shared_s_length 18 - #define FAKE_build_setting_name_path_object_static_s_length 18 - #define FAKE_build_setting_name_path_program_script_s_length 19 - #define FAKE_build_setting_name_path_program_shared_s_length 19 - #define FAKE_build_setting_name_path_program_static_s_length 19 - #define FAKE_build_setting_name_path_sources_s_length 12 - #define FAKE_build_setting_name_path_sources_headers_s_length 20 - #define FAKE_build_setting_name_path_sources_library_s_length 20 - #define FAKE_build_setting_name_path_sources_object_s_length 19 - #define FAKE_build_setting_name_path_sources_program_s_length 20 - #define FAKE_build_setting_name_path_sources_script_s_length 19 - #define FAKE_build_setting_name_preserve_path_headers_s_length 21 - #define FAKE_build_setting_name_process_post_s_length 12 - #define FAKE_build_setting_name_process_pre_s_length 11 - #define FAKE_build_setting_name_search_exclusive_s_length 16 - #define FAKE_build_setting_name_search_shared_s_length 13 - #define FAKE_build_setting_name_search_static_s_length 13 - #define FAKE_build_setting_name_stage_s_length 5 - #define FAKE_build_setting_name_version_file_s_length 12 - #define FAKE_build_setting_name_version_major_s_length 13 - #define FAKE_build_setting_name_version_major_prefix_s_length 20 - #define FAKE_build_setting_name_version_micro_s_length 13 - #define FAKE_build_setting_name_version_micro_prefix_s_length 20 - #define FAKE_build_setting_name_version_minor_s_length 13 - #define FAKE_build_setting_name_version_minor_prefix_s_length 20 - #define FAKE_build_setting_name_version_nano_s_length 12 - #define FAKE_build_setting_name_version_nano_prefix_s_length 19 - #define FAKE_build_setting_name_version_target_s_length 14 + #define FAKE_build_setting_name_build_compiler_s_length 14 + #define FAKE_build_setting_name_build_compiler_arguments_s_length 24 + #define FAKE_build_setting_name_build_compiler_arguments_shared_s_length 31 + #define FAKE_build_setting_name_build_compiler_arguments_static_s_length 31 + #define FAKE_build_setting_name_build_compiler_arguments_library_s_length 32 + #define FAKE_build_setting_name_build_compiler_arguments_library_shared_s_length 39 + #define FAKE_build_setting_name_build_compiler_arguments_library_static_s_length 39 + #define FAKE_build_setting_name_build_compiler_arguments_object_s_length 31 + #define FAKE_build_setting_name_build_compiler_arguments_object_shared_s_length 38 + #define FAKE_build_setting_name_build_compiler_arguments_object_static_s_length 38 + #define FAKE_build_setting_name_build_compiler_arguments_program_s_length 32 + #define FAKE_build_setting_name_build_compiler_arguments_program_shared_s_length 39 + #define FAKE_build_setting_name_build_compiler_arguments_program_static_s_length 39 + #define FAKE_build_setting_name_build_indexer_s_length 13 + #define FAKE_build_setting_name_build_indexer_arguments_s_length 23 + #define FAKE_build_setting_name_build_language_s_length 14 + #define FAKE_build_setting_name_build_language_path_s_length 19 + #define FAKE_build_setting_name_build_libraries_s_length 15 + #define FAKE_build_setting_name_build_libraries_shared_s_length 22 + #define FAKE_build_setting_name_build_libraries_static_s_length 22 + #define FAKE_build_setting_name_build_name_s_length 10 + #define FAKE_build_setting_name_build_objects_library_s_length 21 + #define FAKE_build_setting_name_build_objects_library_shared_s_length 28 + #define FAKE_build_setting_name_build_objects_library_static_s_length 28 + #define FAKE_build_setting_name_build_objects_program_s_length 21 + #define FAKE_build_setting_name_build_objects_program_shared_s_length 28 + #define FAKE_build_setting_name_build_objects_program_static_s_length 28 + #define FAKE_build_setting_name_build_script_s_length 12 + #define FAKE_build_setting_name_build_shared_s_length 12 + #define FAKE_build_setting_name_build_sources_documentation_s_length 27 + #define FAKE_build_setting_name_build_sources_headers_s_length 21 + #define FAKE_build_setting_name_build_sources_headers_shared_s_length 28 + #define FAKE_build_setting_name_build_sources_headers_static_s_length 28 + #define FAKE_build_setting_name_build_sources_library_s_length 21 + #define FAKE_build_setting_name_build_sources_library_shared_s_length 28 + #define FAKE_build_setting_name_build_sources_library_static_s_length 28 + #define FAKE_build_setting_name_build_sources_object_s_length 20 + #define FAKE_build_setting_name_build_sources_object_shared_s_length 27 + #define FAKE_build_setting_name_build_sources_object_static_s_length 27 + #define FAKE_build_setting_name_build_sources_program_s_length 21 + #define FAKE_build_setting_name_build_sources_program_shared_s_length 28 + #define FAKE_build_setting_name_build_sources_program_static_s_length 28 + #define FAKE_build_setting_name_build_sources_script_s_length 20 + #define FAKE_build_setting_name_build_sources_setting_s_length 21 + #define FAKE_build_setting_name_build_static_s_length 12 + #define FAKE_build_setting_name_environment_s_length 11 + #define FAKE_build_setting_name_defines_s_length 7 + #define FAKE_build_setting_name_defines_library_s_length 15 + #define FAKE_build_setting_name_defines_library_shared_s_length 22 + #define FAKE_build_setting_name_defines_library_static_s_length 22 + #define FAKE_build_setting_name_defines_object_s_length 14 + #define FAKE_build_setting_name_defines_object_shared_s_length 21 + #define FAKE_build_setting_name_defines_object_static_s_length 21 + #define FAKE_build_setting_name_defines_program_s_length 15 + #define FAKE_build_setting_name_defines_program_shared_s_length 22 + #define FAKE_build_setting_name_defines_program_static_s_length 22 + #define FAKE_build_setting_name_defines_shared_s_length 14 + #define FAKE_build_setting_name_defines_static_s_length 14 + #define FAKE_build_setting_name_flags_s_length 5 + #define FAKE_build_setting_name_flags_library_s_length 13 + #define FAKE_build_setting_name_flags_library_shared_s_length 20 + #define FAKE_build_setting_name_flags_library_static_s_length 20 + #define FAKE_build_setting_name_flags_object_s_length 12 + #define FAKE_build_setting_name_flags_object_shared_s_length 19 + #define FAKE_build_setting_name_flags_object_static_s_length 19 + #define FAKE_build_setting_name_flags_program_s_length 13 + #define FAKE_build_setting_name_flags_program_shared_s_length 20 + #define FAKE_build_setting_name_flags_program_static_s_length 20 + #define FAKE_build_setting_name_flags_shared_s_length 12 + #define FAKE_build_setting_name_flags_static_s_length 12 + #define FAKE_build_setting_name_has_path_standard_s_length 17 + #define FAKE_build_setting_name_modes_s_length 5 + #define FAKE_build_setting_name_modes_default_s_length 13 + #define FAKE_build_setting_name_path_headers_s_length 12 + #define FAKE_build_setting_name_path_language_s_length 13 + #define FAKE_build_setting_name_path_library_script_s_length 19 + #define FAKE_build_setting_name_path_library_shared_s_length 19 + #define FAKE_build_setting_name_path_library_static_s_length 19 + #define FAKE_build_setting_name_path_object_script_s_length 18 + #define FAKE_build_setting_name_path_object_shared_s_length 18 + #define FAKE_build_setting_name_path_object_static_s_length 18 + #define FAKE_build_setting_name_path_program_script_s_length 19 + #define FAKE_build_setting_name_path_program_shared_s_length 19 + #define FAKE_build_setting_name_path_program_static_s_length 19 + #define FAKE_build_setting_name_path_sources_s_length 12 + #define FAKE_build_setting_name_path_sources_headers_s_length 20 + #define FAKE_build_setting_name_path_sources_library_s_length 20 + #define FAKE_build_setting_name_path_sources_object_s_length 19 + #define FAKE_build_setting_name_path_sources_program_s_length 20 + #define FAKE_build_setting_name_path_sources_script_s_length 19 + #define FAKE_build_setting_name_preserve_path_headers_s_length 21 + #define FAKE_build_setting_name_process_post_s_length 12 + #define FAKE_build_setting_name_process_pre_s_length 11 + #define FAKE_build_setting_name_search_exclusive_s_length 16 + #define FAKE_build_setting_name_search_shared_s_length 13 + #define FAKE_build_setting_name_search_static_s_length 13 + #define FAKE_build_setting_name_stage_s_length 5 + #define FAKE_build_setting_name_version_file_s_length 12 + #define FAKE_build_setting_name_version_major_s_length 13 + #define FAKE_build_setting_name_version_major_prefix_s_length 20 + #define FAKE_build_setting_name_version_micro_s_length 13 + #define FAKE_build_setting_name_version_micro_prefix_s_length 20 + #define FAKE_build_setting_name_version_minor_s_length 13 + #define FAKE_build_setting_name_version_minor_prefix_s_length 20 + #define FAKE_build_setting_name_version_nano_s_length 12 + #define FAKE_build_setting_name_version_nano_prefix_s_length 19 + #define FAKE_build_setting_name_version_target_s_length 14 extern const f_string_static_t fake_build_setting_default_ar_s; extern const f_string_static_t fake_build_setting_default_gcc_s; @@ -295,9 +355,22 @@ extern "C" { extern const f_string_static_t fake_build_setting_default_yes_s; extern const f_string_static_t fake_build_setting_name_build_compiler_s; + extern const f_string_static_t fake_build_setting_name_build_compiler_arguments_s; + extern const f_string_static_t fake_build_setting_name_build_compiler_arguments_shared_s; + extern const f_string_static_t fake_build_setting_name_build_compiler_arguments_static_s; + extern const f_string_static_t fake_build_setting_name_build_compiler_arguments_library_s; + extern const f_string_static_t fake_build_setting_name_build_compiler_arguments_library_shared_s; + extern const f_string_static_t fake_build_setting_name_build_compiler_arguments_library_static_s; + extern const f_string_static_t fake_build_setting_name_build_compiler_arguments_object_s; + extern const f_string_static_t fake_build_setting_name_build_compiler_arguments_object_shared_s; + extern const f_string_static_t fake_build_setting_name_build_compiler_arguments_object_static_s; + extern const f_string_static_t fake_build_setting_name_build_compiler_arguments_program_s; + extern const f_string_static_t fake_build_setting_name_build_compiler_arguments_program_shared_s; + extern const f_string_static_t fake_build_setting_name_build_compiler_arguments_program_static_s; extern const f_string_static_t fake_build_setting_name_build_indexer_s; extern const f_string_static_t fake_build_setting_name_build_indexer_arguments_s; extern const f_string_static_t fake_build_setting_name_build_language_s; + extern const f_string_static_t fake_build_setting_name_build_language_path_s; extern const f_string_static_t fake_build_setting_name_build_libraries_s; extern const f_string_static_t fake_build_setting_name_build_libraries_shared_s; extern const f_string_static_t fake_build_setting_name_build_libraries_static_s; @@ -457,55 +530,25 @@ extern "C" { extern const f_string_static_t fake_build_stage_sources_settings_s; #endif // _di_fake_build_stage_s_ -#ifndef _di_fake_build_parameter_s_ - #define FAKE_build_parameter_library_include_s "-I" - #define FAKE_build_parameter_library_link_file_s "-l" - #define FAKE_build_parameter_library_link_path_s "-L" - #define FAKE_build_parameter_library_name_prefix_s "lib" - #define FAKE_build_parameter_library_name_suffix_shared_s ".so" - #define FAKE_build_parameter_library_name_suffix_static_s ".a" - #define FAKE_build_parameter_library_output_s "-o" - #define FAKE_build_parameter_library_shared_s "-shared" - #define FAKE_build_parameter_library_static_s "-static" - #define FAKE_build_parameter_library_shared_prefix_s "-Wl,-soname," - - #define FAKE_build_parameter_library_include_s_length 2 - #define FAKE_build_parameter_library_link_file_s_length 2 - #define FAKE_build_parameter_library_link_path_s_length 2 - #define FAKE_build_parameter_library_name_prefix_s_length 3 - #define FAKE_build_parameter_library_name_suffix_shared_s_length 3 - #define FAKE_build_parameter_library_name_suffix_static_s_length 2 - #define FAKE_build_parameter_library_output_s_length 2 - #define FAKE_build_parameter_library_shared_s_length 7 - #define FAKE_build_parameter_library_static_s_length 7 - #define FAKE_build_parameter_library_shared_prefix_s_length 12 - - extern const f_string_static_t fake_build_parameter_library_include_s; - extern const f_string_static_t fake_build_parameter_library_link_file_s; - extern const f_string_static_t fake_build_parameter_library_link_path_s; - extern const f_string_static_t fake_build_parameter_library_name_prefix_s; - extern const f_string_static_t fake_build_parameter_library_name_suffix_shared_s; - extern const f_string_static_t fake_build_parameter_library_name_suffix_static_s; - extern const f_string_static_t fake_build_parameter_library_output_s; - extern const f_string_static_t fake_build_parameter_library_shared_s; - extern const f_string_static_t fake_build_parameter_library_static_s; - extern const f_string_static_t fake_build_parameter_library_shared_prefix_s; - - #define FAKE_build_parameter_object_compile_s "-c" - #define FAKE_build_parameter_object_name_suffix_s ".o" - #define FAKE_build_parameter_object_output_s "-o" - #define FAKE_build_parameter_object_static_s "-static" +/** + * The program version strings. + */ +#ifndef _di_fake_build_version_s_ + #define FAKE_build_version_major_s "major" + #define FAKE_build_version_minor_s "minor" + #define FAKE_build_version_micro_s "micro" + #define FAKE_build_version_nano_s "nano" - #define FAKE_build_parameter_object_compile_s_length 2 - #define FAKE_build_parameter_object_name_suffix_s_length 2 - #define FAKE_build_parameter_object_output_s_length 2 - #define FAKE_build_parameter_object_static_s_length 7 + #define FAKE_build_version_major_s_length 5 + #define FAKE_build_version_minor_s_length 5 + #define FAKE_build_version_micro_s_length 5 + #define FAKE_build_version_nano_s_length 4 - extern const f_string_static_t fake_build_parameter_object_compile_s; - extern const f_string_static_t fake_build_parameter_object_name_suffix_s; - extern const f_string_static_t fake_build_parameter_object_output_s; - extern const f_string_static_t fake_build_parameter_object_static_s; -#endif // _di_fake_build_parameter_s_ + extern const f_string_static_t fake_build_version_major_s; + extern const f_string_static_t fake_build_version_minor_s; + extern const f_string_static_t fake_build_version_micro_s; + extern const f_string_static_t fake_build_version_nano_s; +#endif // _di_fake_build_version_s_ #ifdef __cplusplus } // extern "C" diff --git a/level_3/fake/c/main/clean.c b/level_3/fake/c/main/clean.c index 8c91116..ca41270 100644 --- a/level_3/fake/c/main/clean.c +++ b/level_3/fake/c/main/clean.c @@ -23,13 +23,17 @@ extern "C" { main->setting.state.status = f_directory_remove(main->setting.build, F_directory_max_descriptors_d, F_true); } - if (F_status_set_fine(main->setting.state.status) == F_file_found_not || F_status_set_fine(main->setting.state.status) == F_directory) { - fake_print_warning_build_directory_not_directory(&main->program.warning, main->setting.build); + if (F_status_set_fine(main->setting.state.status) == F_file_found_not) { + fake_print_debug_build_directory_not_found(&main->program.warning, main->setting.build); main->setting.state.status = F_okay; } + else if (F_status_set_fine(main->setting.state.status) == F_directory_not) { + fake_print_warning_build_directory_not_directory(&main->program.warning, main->setting.build); - if (F_status_is_error(main->setting.state.status)) { + main->setting.state.status = F_okay; + } + else if (F_status_is_error(main->setting.state.status)) { fake_print_error_file(&main->program.error, macro_fake_f(f_directory_remove), main->setting.build, f_file_operation_delete_s, fll_error_file_type_directory_e); } else { diff --git a/level_3/fake/c/main/common/string.c b/level_3/fake/c/main/common/string.c index f7e7898..162f512 100644 --- a/level_3/fake/c/main/common/string.c +++ b/level_3/fake/c/main/common/string.c @@ -24,6 +24,7 @@ extern "C" { const f_string_static_t fake_path_part_data_s = macro_f_string_static_t_initialize_1(FAKE_path_part_data_s, 0, FAKE_path_part_data_s_length); const f_string_static_t fake_path_part_documentation_s = macro_f_string_static_t_initialize_1(FAKE_path_part_documentation_s, 0, FAKE_path_part_documentation_s_length); const f_string_static_t fake_path_part_documents_s = macro_f_string_static_t_initialize_1(FAKE_path_part_documents_s, 0, FAKE_path_part_documents_s_length); + const f_string_static_t fake_path_part_golang_s = macro_f_string_static_t_initialize_1(FAKE_path_part_golang_s, 0, FAKE_path_part_golang_s_length); const f_string_static_t fake_path_part_includes_s = macro_f_string_static_t_initialize_1(FAKE_path_part_includes_s, 0, FAKE_path_part_includes_s_length); const f_string_static_t fake_path_part_libraries_s = macro_f_string_static_t_initialize_1(FAKE_path_part_libraries_s, 0, FAKE_path_part_libraries_s_length); const f_string_static_t fake_path_part_licenses_s = macro_f_string_static_t_initialize_1(FAKE_path_part_licenses_s, 0, FAKE_path_part_licenses_s_length); diff --git a/level_3/fake/c/main/common/string.h b/level_3/fake/c/main/common/string.h index 569a8a2..2f26f30 100644 --- a/level_3/fake/c/main/common/string.h +++ b/level_3/fake/c/main/common/string.h @@ -81,6 +81,7 @@ extern "C" { #define FAKE_path_part_data_s "data" F_path_separator_s #define FAKE_path_part_documentation_s "documentation" F_path_separator_s #define FAKE_path_part_documents_s "documents" F_path_separator_s + #define FAKE_path_part_golang_s "golang" F_path_separator_s #define FAKE_path_part_includes_s "includes" F_path_separator_s #define FAKE_path_part_libraries_s "libraries" F_path_separator_s #define FAKE_path_part_licenses_s "licenses" F_path_separator_s @@ -101,6 +102,7 @@ extern "C" { #define FAKE_path_part_data_s_length 4 + F_path_separator_s_length #define FAKE_path_part_documentation_s_length 13 + F_path_separator_s_length #define FAKE_path_part_documents_s_length 9 + F_path_separator_s_length + #define FAKE_path_part_golang_s_length 6 + F_path_separator_s_length #define FAKE_path_part_includes_s_length 8 + F_path_separator_s_length #define FAKE_path_part_libraries_s_length 9 + F_path_separator_s_length #define FAKE_path_part_licenses_s_length 8 + F_path_separator_s_length @@ -121,6 +123,7 @@ extern "C" { extern const f_string_static_t fake_path_part_data_s; extern const f_string_static_t fake_path_part_documentation_s; extern const f_string_static_t fake_path_part_documents_s; + extern const f_string_static_t fake_path_part_golang_s; extern const f_string_static_t fake_path_part_includes_s; extern const f_string_static_t fake_path_part_libraries_s; extern const f_string_static_t fake_path_part_licenses_s; diff --git a/level_3/fake/c/main/common/type.c b/level_3/fake/c/main/common/type.c index 4652476..0bc2fba 100644 --- a/level_3/fake/c/main/common/type.c +++ b/level_3/fake/c/main/common/type.c @@ -22,6 +22,8 @@ extern "C" { f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->build_compiler.string, &build_setting->build_compiler.used, &build_setting->build_compiler.size); f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->build_indexer.string, &build_setting->build_indexer.used, &build_setting->build_indexer.size); + f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->build_language.string, &build_setting->build_language.used, &build_setting->build_language.size);f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->build_compiler.string, &build_setting->build_compiler.used, &build_setting->build_compiler.size); + f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->build_language_path.string, &build_setting->build_language_path.used, &build_setting->build_language_path.size); f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->build_name.string, &build_setting->build_name.used, &build_setting->build_name.size); f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_headers.string, &build_setting->path_headers.used, &build_setting->path_headers.size); f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_language.string, &build_setting->path_language.used, &build_setting->path_language.size); @@ -52,6 +54,18 @@ extern "C" { f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->version_nano.string, &build_setting->version_nano.used, &build_setting->version_nano.size); f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->version_nano_prefix.string, &build_setting->version_nano_prefix.used, &build_setting->version_nano_prefix.size); + f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_compiler_arguments.array, &build_setting->build_compiler_arguments.used, &build_setting->build_compiler_arguments.size, &f_string_dynamics_delete_callback); + f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_compiler_arguments_shared.array, &build_setting->build_compiler_arguments_shared.used, &build_setting->build_compiler_arguments_shared.size, &f_string_dynamics_delete_callback); + f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_compiler_arguments_static.array, &build_setting->build_compiler_arguments_static.used, &build_setting->build_compiler_arguments_static.size, &f_string_dynamics_delete_callback); + f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_compiler_arguments_library.array, &build_setting->build_compiler_arguments_library.used, &build_setting->build_compiler_arguments_library.size, &f_string_dynamics_delete_callback); + f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_compiler_arguments_library_shared.array, &build_setting->build_compiler_arguments_library_shared.used, &build_setting->build_compiler_arguments_library_shared.size, &f_string_dynamics_delete_callback); + f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_compiler_arguments_library_static.array, &build_setting->build_compiler_arguments_library_static.used, &build_setting->build_compiler_arguments_library_static.size, &f_string_dynamics_delete_callback); + f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_compiler_arguments_object.array, &build_setting->build_compiler_arguments_object.used, &build_setting->build_compiler_arguments_object.size, &f_string_dynamics_delete_callback); + f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_compiler_arguments_object_shared.array, &build_setting->build_compiler_arguments_object_shared.used, &build_setting->build_compiler_arguments_object_shared.size, &f_string_dynamics_delete_callback); + f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_compiler_arguments_object_static.array, &build_setting->build_compiler_arguments_object_static.used, &build_setting->build_compiler_arguments_object_static.size, &f_string_dynamics_delete_callback); + f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_compiler_arguments_program.array, &build_setting->build_compiler_arguments_program.used, &build_setting->build_compiler_arguments_program.size, &f_string_dynamics_delete_callback); + f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_compiler_arguments_program_shared.array, &build_setting->build_compiler_arguments_program_shared.used, &build_setting->build_compiler_arguments_program_shared.size, &f_string_dynamics_delete_callback); + f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_compiler_arguments_program_static.array, &build_setting->build_compiler_arguments_program_static.used, &build_setting->build_compiler_arguments_program_static.size, &f_string_dynamics_delete_callback); f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_indexer_arguments.array, &build_setting->build_indexer_arguments.used, &build_setting->build_indexer_arguments.size, &f_string_dynamics_delete_callback); f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_libraries.array, &build_setting->build_libraries.used, &build_setting->build_libraries.size, &f_string_dynamics_delete_callback); f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_libraries_shared.array, &build_setting->build_libraries_shared.used, &build_setting->build_libraries_shared.size, &f_string_dynamics_delete_callback); diff --git a/level_3/fake/c/main/common/type.h b/level_3/fake/c/main/common/type.h index 996464e..a75c48c 100644 --- a/level_3/fake/c/main/common/type.h +++ b/level_3/fake/c/main/common/type.h @@ -357,114 +357,128 @@ extern "C" { * Build settings data. * * Properties: - * - flag: Flags from data_build_setting_* (Not strictly part of the build settings file and is not included in fake_build_setting_total_d). + * - flag: Flags from data_build_setting_*_e (Not strictly part of the build settings file and is not included in fake_build_setting_total_d). * - * - build_language: The build_language setting. + * - language: The build_language setting as an enum. * - * - version_file: The version_file setting. - * - version_target: The version_target setting. + * - version_file: The version_file setting. + * - version_target: The version_target setting. * - * - build_script: The build_script setting. - * - build_shared: The build_shared setting. - * - build_static: The build_static setting. + * - build_script: The build_script setting. + * - build_shared: The build_shared setting. + * - build_static: The build_static setting. * - * - has_path_standard: The has_path_standard setting. - * - preserve_path_headers: The preserve_path_headers setting. + * - has_path_standard: The has_path_standard setting. + * - preserve_path_headers: The preserve_path_headers setting. * - * - search_exclusive: The search_exclusive setting. - * - search_shared: The search_shared setting. - * - search_static: The search_static setting. + * - search_exclusive: The search_exclusive setting. + * - search_shared: The search_shared setting. + * - search_static: The search_static setting. * - * - build_compiler: The build_compiler setting. - * - build_indexer: The build_indexer setting. - * - build_name: The build_name setting. - * - path_headers: The path_headers setting. - * - path_language: The path_language setting. - * - path_library_script: The path_library_script setting. - * - path_library_shared: The path_library_shared setting. - * - path_library_static: The path_library_static setting. - * - path_object_script: The path_object_script setting. - * - path_object_shared: The path_object_shared setting. - * - path_object_static: The path_object_static setting. - * - path_program_script: The path_program_script setting. - * - path_program_shared: The path_program_shared setting. - * - path_program_static: The path_program_static setting. - * - path_sources: The path_sources setting. - * - path_sources_headers: The path_sources_headers setting. - * - path_sources_library: The path_sources_library setting. - * - path_sources_object: The path_sources_object setting. - * - path_sources_program: The path_sources_program setting. - * - path_sources_script: The path_sources_script setting. - * - process_post: The process_post setting. - * - process_pre: The process_pre setting. - * - stage: The stage setting. - * - version_major: The version_major setting. - * - version_major_prefix: The version_major_prefix setting. - * - version_micro: The version_micro setting. - * - version_micro_prefix: The version_micro_prefix setting. - * - version_minor: The version_minor setting. - * - version_minor_prefix: The version_minor_prefix setting. - * - version_nano: The version_nano setting. - * - version_nano_prefix: The version_nano_prefix setting. + * - build_compiler: The build_compiler setting. + * - build_indexer: The build_indexer setting. + * - build_language: The build_language setting. + * - build_language_path: The build_language_path setting. + * - build_name: The build_name setting. + * - path_headers: The path_headers setting. + * - path_language: The path_language setting. + * - path_library_script: The path_library_script setting. + * - path_library_shared: The path_library_shared setting. + * - path_library_static: The path_library_static setting. + * - path_object_script: The path_object_script setting. + * - path_object_shared: The path_object_shared setting. + * - path_object_static: The path_object_static setting. + * - path_program_script: The path_program_script setting. + * - path_program_shared: The path_program_shared setting. + * - path_program_static: The path_program_static setting. + * - path_sources: The path_sources setting. + * - path_sources_headers: The path_sources_headers setting. + * - path_sources_library: The path_sources_library setting. + * - path_sources_object: The path_sources_object setting. + * - path_sources_program: The path_sources_program setting. + * - path_sources_script: The path_sources_script setting. + * - process_post: The process_post setting. + * - process_pre: The process_pre setting. + * - stage: The stage setting. + * - version_major: The version_major setting. + * - version_major_prefix: The version_major_prefix setting. + * - version_micro: The version_micro setting. + * - version_micro_prefix: The version_micro_prefix setting. + * - version_minor: The version_minor setting. + * - version_minor_prefix: The version_minor_prefix setting. + * - version_nano: The version_nano setting. + * - version_nano_prefix: The version_nano_prefix setting. * - * - build_indexer_arguments: The build_indexer_arguments setting. - * - build_libraries: The build_libraries setting. - * - build_libraries_shared: The build_libraries_shared setting. - * - build_libraries_static: The build_libraries_static setting. - * - build_objects_library: The build_objects_library setting. - * - build_objects_library_shared: The build_objects_library_shared setting. - * - build_objects_library_static: The build_objects_library_static setting. - * - build_objects_program: The build_objects_program setting. - * - build_objects_program_shared: The build_objects_program_shared setting. - * - build_objects_program_static: The build_objects_program_static setting. - * - build_sources_documentation: The build_sources_documentation setting. - * - build_sources_headers: The build_sources_headers setting. - * - build_sources_headers_shared: The build_sources_headers_shared setting. - * - build_sources_headers_static: The build_sources_headers_static setting. - * - build_sources_library: The build_sources_library setting. - * - build_sources_library_shared: The build_sources_library_shared setting. - * - build_sources_library_static: The build_sources_library_static setting. - * - build_sources_object: The build_sources_library setting. - * - build_sources_object_shared: The build_sources_library_shared setting. - * - build_sources_object_static: The build_sources_library_static setting. - * - build_sources_program: The build_sources_program setting. - * - build_sources_program_shared: The build_sources_program_shared setting. - * - build_sources_program_static: The build_sources_program_static setting. - * - build_sources_script: The build_sources_script setting. - * - build_sources_setting: The build_sources_setting setting. - * - defines: The defines setting. - * - defines_library: The defines_library setting. - * - defines_library_shared: The defines_library_shared setting. - * - defines_library_static: The defines_library_static setting. - * - defines_object: The defines_object setting. - * - defines_object_shared: The defines_object_shared setting. - * - defines_object_static: The defines_object_static setting. - * - defines_program: The defines_program setting. - * - defines_program_shared: The defines_program_shared setting. - * - defines_program_static: The defines_program_static setting. - * - defines_shared: The defines_shared setting. - * - defines_static: The defines_static setting. - * - environment: The environment setting. - * - flags: The flags setting. - * - flags_library: The flags_library setting. - * - flags_library_shared: The flags_library_shared setting. - * - flags_library_static: The flags_library_static setting. - * - flags_object: The flags_object setting. - * - flags_object_shared: The flags_object_shared setting. - * - flags_object_static: The flags_object_static setting. - * - flags_program: The flags_program setting. - * - flags_program_shared: The flags_program_shared setting. - * - flags_program_static: The flags_program_static setting. - * - flags_shared: The flags_shared setting. - * - flags_static: The flags_static setting. - * - modes: The modes setting. - * - modes_default: The modes_default setting. + * - build_compiler_arguments: The build_compiler_arguments setting. + * - build_compiler_arguments_shared: The build_compiler_arguments_shared setting. + * - build_compiler_arguments_static: The build_compiler_arguments_static setting. + * - build_compiler_arguments_library: The build_compiler_arguments_library setting. + * - build_compiler_arguments_library_shared: The build_compiler_arguments_library_shared setting. + * - build_compiler_arguments_library_static: The build_compiler_arguments_library_static setting. + * - build_compiler_arguments_object: The build_compiler_arguments_object setting. + * - build_compiler_arguments_object_shared: The build_compiler_arguments_object_shared setting. + * - build_compiler_arguments_object_static: The build_compiler_arguments_object_static setting. + * - build_compiler_arguments_program: The build_compiler_arguments_program setting. + * - build_compiler_arguments_program_shared: The build_compiler_arguments_program_shared setting. + * - build_compiler_arguments_program_static: The build_compiler_arguments_program_static setting. + * - build_indexer_arguments: The build_indexer_arguments setting. + * - build_libraries: The build_libraries setting. + * - build_libraries_shared: The build_libraries_shared setting. + * - build_libraries_static: The build_libraries_static setting. + * - build_objects_library: The build_objects_library setting. + * - build_objects_library_shared: The build_objects_library_shared setting. + * - build_objects_library_static: The build_objects_library_static setting. + * - build_objects_program: The build_objects_program setting. + * - build_objects_program_shared: The build_objects_program_shared setting. + * - build_objects_program_static: The build_objects_program_static setting. + * - build_sources_documentation: The build_sources_documentation setting. + * - build_sources_headers: The build_sources_headers setting. + * - build_sources_headers_shared: The build_sources_headers_shared setting. + * - build_sources_headers_static: The build_sources_headers_static setting. + * - build_sources_library: The build_sources_library setting. + * - build_sources_library_shared: The build_sources_library_shared setting. + * - build_sources_library_static: The build_sources_library_static setting. + * - build_sources_object: The build_sources_library setting. + * - build_sources_object_shared: The build_sources_library_shared setting. + * - build_sources_object_static: The build_sources_library_static setting. + * - build_sources_program: The build_sources_program setting. + * - build_sources_program_shared: The build_sources_program_shared setting. + * - build_sources_program_static: The build_sources_program_static setting. + * - build_sources_script: The build_sources_script setting. + * - build_sources_setting: The build_sources_setting setting. + * - defines: The defines setting. + * - defines_library: The defines_library setting. + * - defines_library_shared: The defines_library_shared setting. + * - defines_library_static: The defines_library_static setting. + * - defines_object: The defines_object setting. + * - defines_object_shared: The defines_object_shared setting. + * - defines_object_static: The defines_object_static setting. + * - defines_program: The defines_program setting. + * - defines_program_shared: The defines_program_shared setting. + * - defines_program_static: The defines_program_static setting. + * - defines_shared: The defines_shared setting. + * - defines_static: The defines_static setting. + * - environment: The environment setting. + * - flags: The flags setting. + * - flags_library: The flags_library setting. + * - flags_library_shared: The flags_library_shared setting. + * - flags_library_static: The flags_library_static setting. + * - flags_object: The flags_object setting. + * - flags_object_shared: The flags_object_shared setting. + * - flags_object_static: The flags_object_static setting. + * - flags_program: The flags_program setting. + * - flags_program_shared: The flags_program_shared setting. + * - flags_program_static: The flags_program_static setting. + * - flags_shared: The flags_shared setting. + * - flags_static: The flags_static setting. + * - modes: The modes setting. + * - modes_default: The modes_default setting. */ #ifndef _di_fake_build_setting_t_ typedef struct { uint8_t flag; - uint8_t build_language; + uint8_t language; uint8_t version_file; uint8_t version_target; @@ -482,6 +496,8 @@ extern "C" { f_string_dynamic_t build_compiler; f_string_dynamic_t build_indexer; + f_string_dynamic_t build_language; + f_string_dynamic_t build_language_path; f_string_dynamic_t build_name; f_string_dynamic_t path_headers; f_string_dynamic_t path_language; @@ -512,6 +528,18 @@ extern "C" { f_string_dynamic_t version_nano; f_string_dynamic_t version_nano_prefix; + f_string_dynamics_t build_compiler_arguments; + f_string_dynamics_t build_compiler_arguments_shared; + f_string_dynamics_t build_compiler_arguments_static; + f_string_dynamics_t build_compiler_arguments_library; + f_string_dynamics_t build_compiler_arguments_library_shared; + f_string_dynamics_t build_compiler_arguments_library_static; + f_string_dynamics_t build_compiler_arguments_object; + f_string_dynamics_t build_compiler_arguments_object_shared; + f_string_dynamics_t build_compiler_arguments_object_static; + f_string_dynamics_t build_compiler_arguments_program; + f_string_dynamics_t build_compiler_arguments_program_shared; + f_string_dynamics_t build_compiler_arguments_program_static; f_string_dynamics_t build_indexer_arguments; f_string_dynamics_t build_libraries; f_string_dynamics_t build_libraries_shared; @@ -610,6 +638,20 @@ extern "C" { f_string_dynamic_t_initialize, \ f_string_dynamic_t_initialize, \ f_string_dynamic_t_initialize, \ + f_string_dynamic_t_initialize, \ + f_string_dynamic_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ f_string_dynamics_t_initialize, \ f_string_dynamics_t_initialize, \ f_string_dynamics_t_initialize, \ @@ -664,7 +706,7 @@ extern "C" { f_string_dynamics_t_initialize, \ } - #define fake_build_setting_total_d 94 + #define fake_build_setting_total_d 107 #endif // _di_fake_build_setting_t_ /** diff --git a/level_3/fake/c/main/fake.h b/level_3/fake/c/main/fake.h index c59dbe0..4716250 100644 --- a/level_3/fake/c/main/fake.h +++ b/level_3/fake/c/main/fake.h @@ -140,6 +140,7 @@ #include #include #include +#include #include #include #include diff --git a/level_3/fake/c/main/make/operate.c b/level_3/fake/c/main/make/operate.c index b62a195..e7ec429 100644 --- a/level_3/fake/c/main/make/operate.c +++ b/level_3/fake/c/main/make/operate.c @@ -856,7 +856,7 @@ extern "C" { }; const uint8_t uint8_value[] = { - data_make->setting_build.build_language, + data_make->setting_build.language, data_make->setting_build.version_file, data_make->setting_build.version_target, }; @@ -918,6 +918,7 @@ extern "C" { if (unmatched) { const f_string_static_t dynamic_name[] = { fake_build_setting_name_build_compiler_s, + // @todo fake_build_setting_name_build_indexer_s, fake_build_setting_name_build_name_s, fake_build_setting_name_path_headers_s, diff --git a/level_3/fake/c/main/print/debug.c b/level_3/fake/c/main/print/debug.c new file mode 100644 index 0000000..eb26faa --- /dev/null +++ b/level_3/fake/c/main/print/debug.c @@ -0,0 +1,21 @@ +#include "../fake.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_fake_print_debug_build_directory_not_found_ + f_status_t fake_print_debug_build_directory_not_found(fl_print_t * const print, f_string_static_t path) { + + if (!print) return F_status_set_error(F_output_not); + if (print->verbosity < f_console_verbosity_verbose_e) return F_output_not; + + fake_print_context_wrapped_variable(print, "The build directory ", path, " exists but is not a directory"); + + return F_okay; + } +#endif // _di_fake_print_debug_build_directory_not_found_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/fake/c/main/print/debug.h b/level_3/fake/c/main/print/debug.h new file mode 100644 index 0000000..4574650 --- /dev/null +++ b/level_3/fake/c/main/print/debug.h @@ -0,0 +1,47 @@ +/** + * FLL - Level 3 + * + * Project: Featureless Make + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the print debug functionality. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _fake_print_debug_h +#define _fake_print_debug_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Print debug message about the build directory not being found. + * + * @param print + * The output structure to print to. + * + * This requires print.custom to be fake_main_t. + * + * This does not alter print.custom.setting.state.status. + * @param path + * The path of the build directory. + * + * @return + * F_okay on success. + * F_output_not on success, but no printing is performed. + * + * F_output_not (with error bit) if setting is NULL. + * + * @see fake_print_context_wrapped_variable() + */ +#ifndef _di_fake_print_debug_build_directory_not_found_ + extern f_status_t fake_print_debug_build_directory_not_found(fl_print_t * const print, f_string_static_t path); +#endif // _di_fake_print_debug_build_directory_not_found_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _fake_print_debug_h diff --git a/level_3/fake/c/main/skeleton.c b/level_3/fake/c/main/skeleton.c index 5439fae..bd869c4 100644 --- a/level_3/fake/c/main/skeleton.c +++ b/level_3/fake/c/main/skeleton.c @@ -22,34 +22,39 @@ extern "C" { { f_string_static_t sources = f_string_static_t_initialize; - f_string_static_t sources_bash = f_string_static_t_initialize; f_string_static_t sources_c = f_string_static_t_initialize; f_string_static_t sources_cpp = f_string_static_t_initialize; + f_string_static_t sources_golang = f_string_static_t_initialize; f_string_static_t sources_script = f_string_static_t_initialize; + f_string_static_t sources_shell = f_string_static_t_initialize; fake_skeleton_path_source_length(data, &f_string_empty_s, &sources); fake_skeleton_path_source_length(data, &fake_path_part_c_s, &sources_c); fake_skeleton_path_source_length(data, &fake_path_part_cpp_s, &sources_cpp); + fake_skeleton_path_source_length(data, &fake_path_part_golang_s, &sources_golang); fake_skeleton_path_source_length(data, &fake_path_part_script_s, &sources_script); - fake_skeleton_path_source_length(data, &fake_path_part_shell_s, &sources_bash); + fake_skeleton_path_source_length(data, &fake_path_part_shell_s, &sources_shell); f_char_t sources_string[sources.used + 1]; - f_char_t sources_bash_string[sources_bash.used + 1]; f_char_t sources_c_string[sources_c.used + 1]; f_char_t sources_cpp_string[sources_cpp.used + 1]; + f_char_t sources_golang_string[sources_golang.used + 1]; f_char_t sources_script_string[sources_script.used + 1]; + f_char_t sources_shell_string[sources_shell.used + 1]; sources.string = sources_string; - sources_bash.string = sources_bash_string; sources_c.string = sources_c_string; sources_cpp.string = sources_cpp_string; + sources_golang.string = sources_golang_string; sources_script.string = sources_script_string; + sources_shell.string = sources_shell_string; fake_skeleton_path_source_string(data, &f_string_empty_s, &sources); fake_skeleton_path_source_string(data, &fake_path_part_c_s, &sources_c); fake_skeleton_path_source_string(data, &fake_path_part_cpp_s, &sources_cpp); + fake_skeleton_path_source_string(data, &fake_path_part_golang_s, &sources_golang); fake_skeleton_path_source_string(data, &fake_path_part_script_s, &sources_script); - fake_skeleton_path_source_string(data, &fake_path_part_shell_s, &sources_bash); + fake_skeleton_path_source_string(data, &fake_path_part_shell_s, &sources_shell); const f_string_static_t path[] = { data->path_build, @@ -61,10 +66,11 @@ extern "C" { data->path_licenses, main->setting.sources, sources, - sources_bash, sources_c, sources_cpp, + sources_golang, sources_script, + sources_shell, main->setting.work, data->path_work_includes, data->path_work_libraries, @@ -78,7 +84,7 @@ extern "C" { fake_path_part_specifications_s, }; - for (uint8_t i = 0; i < 24; ++i) { + for (uint8_t i = 0; i < 25; ++i) { fake_skeleton_operate_directory_create(data, path[i]); diff --git a/level_3/fake/data/build/settings b/level_3/fake/data/build/settings index 8383a89..2de5d19 100644 --- a/level_3/fake/data/build/settings +++ b/level_3/fake/data/build/settings @@ -44,7 +44,7 @@ build_libraries-individual_thread -lf_thread build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll -build_sources_library main/build.c main/clean.c main/common.c main/fake.c main/make.c main/print/common.c main/print/context.c main/print/error.c main/print/message.c main/print/operation.c main/print/warning.c main/print/verbose.c main/signal.c main/skeleton.c main/thread.c +build_sources_library main/build.c main/clean.c main/common.c main/fake.c main/make.c main/print/common.c main/print/context.c main/print/debug.c main/print/error.c main/print/message.c main/print/operation.c main/print/warning.c main/print/verbose.c main/signal.c main/skeleton.c main/thread.c build_sources_library main/build/enumeration.c main/build/library.c main/build/load.c main/build/object.c main/build/print/compile.c main/build/print/error.c main/build/print/message.c main/build/print/verbose.c main/build/print/warning.c main/build/program.c main/build/skeleton.c main/build/string.c build_sources_library main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c build_sources_library main/fake/path_generate.c main/fake/do.c @@ -52,7 +52,7 @@ build_sources_library main/make/load_fakefile.c main/make/load_parameters.c main build_sources_program main/main.c -build_sources_headers main/build.h main/clean.h main/common.h main/fake.h main/make.h main/print/common.h main/print/context.h main/print/error.h main/print/message.h main/print/operation.h main/print/warning.h main/print/verbose.h main/signal.h main/skeleton.h main/thread.h +build_sources_headers main/build.h main/clean.h main/common.h main/fake.h main/make.h main/print/common.h main/print/context.h main/print/debug.h main/print/error.h main/print/message.h main/print/operation.h main/print/warning.h main/print/verbose.h main/signal.h main/skeleton.h main/thread.h build_sources_headers main/build/enumeration.h main/build/library.h main/build/load.h main/build/object.h main/build/print/compile.h main/build/print/error.h main/build/print/message.h main/build/print/verbose.h main/build/print/warning.h main/build/program.h main/build/skeleton.h main/build/string.h build_sources_headers main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h build_sources_headers main/fake/path_generate.h main/fake/do.h diff --git a/level_3/fake/data/projects/go/example_go/data/build/defines b/level_3/fake/data/projects/go/example_go/data/build/defines new file mode 100644 index 0000000..c665317 --- /dev/null +++ b/level_3/fake/data/projects/go/example_go/data/build/defines @@ -0,0 +1,2 @@ +# fss-0000 + diff --git a/level_3/fake/data/projects/go/example_go/data/build/dependencies b/level_3/fake/data/projects/go/example_go/data/build/dependencies new file mode 100644 index 0000000..c665317 --- /dev/null +++ b/level_3/fake/data/projects/go/example_go/data/build/dependencies @@ -0,0 +1,2 @@ +# fss-0000 + diff --git a/level_3/fake/data/projects/go/example_go/data/build/fakefile b/level_3/fake/data/projects/go/example_go/data/build/fakefile new file mode 100644 index 0000000..3d2dc2b --- /dev/null +++ b/level_3/fake/data/projects/go/example_go/data/build/fakefile @@ -0,0 +1,7 @@ +# fss-0005 iki-0002 + +settings: + fail exit + +main: + diff --git a/level_3/fake/data/projects/go/example_go/data/build/process_post.sh b/level_3/fake/data/projects/go/example_go/data/build/process_post.sh new file mode 100755 index 0000000..05a7907 --- /dev/null +++ b/level_3/fake/data/projects/go/example_go/data/build/process_post.sh @@ -0,0 +1,2 @@ +#!/bin/bash + diff --git a/level_3/fake/data/projects/go/example_go/data/build/process_pre.sh b/level_3/fake/data/projects/go/example_go/data/build/process_pre.sh new file mode 100755 index 0000000..05a7907 --- /dev/null +++ b/level_3/fake/data/projects/go/example_go/data/build/process_pre.sh @@ -0,0 +1,2 @@ +#!/bin/bash + diff --git a/level_3/fake/data/projects/go/example_go/data/build/settings b/level_3/fake/data/projects/go/example_go/data/build/settings new file mode 100644 index 0000000..23ac529 --- /dev/null +++ b/level_3/fake/data/projects/go/example_go/data/build/settings @@ -0,0 +1,34 @@ +# fss-0001 +# +# Very basic golang example. +# + +build_name example_go + +version_major 0 +version_minor 0 +version_micro 0 +version_file micro +version_target minor + +modes program +modes_default program + +build_compiler go +build_language golang +build_compiler_arguments build +build_compiler_arguments_shared -o build/programs/shared/main + +build_script no +build_shared yes +build_static no + +build_sources_program main.go + +environment PATH LD_LIBRARY_PATH +environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH +environment GOCACHE XDG_CACHE_HOME HOME + +flags -O2 -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces + +flags_program -fPIE diff --git a/level_3/fake/data/projects/go/example_go/documents/readme b/level_3/fake/data/projects/go/example_go/documents/readme new file mode 100644 index 0000000..e69de29 diff --git a/level_3/fake/data/projects/go/example_go/sources/golang/main.go b/level_3/fake/data/projects/go/example_go/sources/golang/main.go new file mode 100644 index 0000000..864d767 --- /dev/null +++ b/level_3/fake/data/projects/go/example_go/sources/golang/main.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("Example Go Program.") +} diff --git a/level_3/fake/documents/settings.txt b/level_3/fake/documents/settings.txt index e764d32..74c0dc8 100644 --- a/level_3/fake/documents/settings.txt +++ b/level_3/fake/documents/settings.txt @@ -1,7 +1,7 @@ # fss-0002 iki-0000 # # license: open-standard-license-1.0-or-later -# version 2024/07/30 +# version 2024/09/20 # # This file (assumed to be named settings.txt) can be more easily read using the following iki_read commands: # iki_read settings.txt +Q -w -rrr ASCII ASCII FLL FLL GCC GCC -WW character "'" "'" code '"' '"' @@ -23,6 +23,66 @@ Settings Documentation: The programs code:"gcc" and code:"clang" are known to work. Many of the parameters in the bold:"settings" file can be changed if not using GCC:"GNU Compiler Collection", but there may be certain hard-coded functionality that may need to be changed. + - code:"build_compiler_arguments"\: + This represents arguments passed directly to the code:"build_compiler". + These arguments are placed immediately after the code:"build_compiler" program. + This is useful for some languages, such as code:"go" which might need to operate like code:"go build" or code:"go build -buildmode=archive". + + - code:"build_compiler_arguments_shared"\: + This represents arguments passed directly to the code:"build_compiler" for shared. + These arguments are placed immediately after the code:"build_compiler" program. + This is useful for some languages, such as code:"go" which might need to operate like code:"go build" or code:"go build -buildmode=archive". + + - code:"build_compiler_arguments_static"\: + This represents arguments passed directly to the code:"build_compiler for static". + These arguments are placed immediately after the code:"build_compiler" program. + This is useful for some languages, such as code:"go" which might need to operate like code:"go build" or code:"go build -buildmode=archive". + + - code:"build_compiler_arguments_library"\: + This represents arguments passed directly to the code:"build_compiler" when building libraries. + These arguments are placed immediately after the code:"build_compiler_arguments" parameters. + This is useful for some languages, such as code:"go" which might need to operate like code:"go build" or code:"go build -buildmode=archive". + + - code:"build_compiler_arguments_library_shared"\: + This represents arguments passed directly to the code:"build_compiler" when building libraries that are shared. + These arguments are placed immediately after the code:"build_compiler_arguments_library" parameters. + This is useful for some languages, such as code:"go" which might need to operate like code:"go build" or code:"go build -buildmode=archive". + + - code:"build_compiler_arguments_library_static"\: + This represents arguments passed directly to the code:"build_compiler" when building libraries that are static. + These arguments are placed immediately after the code:"build_compiler_arguments_library" parameters. + This is useful for some languages, such as code:"go" which might need to operate like code:"go build" or code:"go build -buildmode=archive". + + - code:"build_compiler_arguments_object"\: + This represents arguments passed directly to the code:"build_compiler" when building objects. + These arguments are placed immediately after the code:"build_compiler_arguments" parameters. + This is useful for some languages, such as code:"go" which might need to operate like code:"go build" or code:"go build -buildmode=archive" + + - code:"build_compiler_arguments_object_shared"\: + This represents arguments passed directly to the code:"build_compiler" when building objects that are shared. + These arguments are placed immediately after the code:"build_compiler_arguments_object" parameters. + This is useful for some languages, such as code:"go" which might need to operate like code:"go build" or code:"go build -buildmode=archive" + + - code:"build_compiler_arguments_object_static"\: + This represents arguments passed directly to the code:"build_compiler" when building objects that are static. + These arguments are placed immediately after the code:"build_compiler_arguments_object" parameters. + This is useful for some languages, such as code:"go" which might need to operate like code:"go build" or code:"go build -buildmode=archive" + + - code:"build_compiler_arguments_program"\: + This represents arguments passed directly to the code:"build_compiler" when building programs. + These arguments are placed immediately after the code:"build_compiler_arguments" parameters. + This is useful for some languages, such as code:"go" which might need to operate like code:"go build" or code:"go build -buildmode=archive". + + - code:"build_compiler_arguments_program_shared"\: + This represents arguments passed directly to the code:"build_compiler" when building programs that are shared. + These arguments are placed immediately after the code:"build_compiler_arguments_program" parameters. + This is useful for some languages, such as code:"go" which might need to operate like code:"go build" or code:"go build -buildmode=archive". + + - code:"build_compiler_arguments_program_static"\: + This represents arguments passed directly to the code:"build_compiler" when building programs that are static. + These arguments are placed immediately after the code:"build_compiler_arguments_program" parameters. + This is useful for some languages, such as code:"go" which might need to operate like code:"go build" or code:"go build -buildmode=archive". + - code:"build_indexer"\: This represents the name of the indexer program to use, such as code:"ar". An indexer is often called a linker. @@ -36,9 +96,15 @@ Settings Documentation: - code:"build_language"\: The programming language to build with. - The languages code:"c" and code:"c++" are supported (with code:"bash" as a consideration for support). - The code:"bash" language is not currently implemented and needs some consideration because there is nothing to compile. - The code:"bash" language will likely build a set of individual scripts, and perhaps script dependencies, into a single Bash script. + The languages code:"c", code:"c++", code:"go", and code:"shell" are the commonly known and supported languages. + The code:"shell" language is for shell languages such as code:"bash" or code:"zsh" and might not need special handling because there is nothing to compile. + The code:"shell" language might be implemented to build a set of individual scripts, and perhaps script dependencies, into a single script. + Individual implementations may restrict this to a select number of languages such as the commonly known and supported languages mentioned. + Languages not in the commonly known and supported languages are generally treated as compiled languages but the user must take care to properly configure it. + + - code:"build_language_path"\: + A path relative to the sources directory reprsenting the sources. + This defaults to a path based on the code:"build_language" when not defined. - code:"build_libraries"\: A collection of libraries to be linked against. @@ -58,40 +124,40 @@ Settings Documentation: These are applied to only static builds. - code:"build_objects_library"\: - A collection of object files to be compile with when building libraries. + A collection of object files to be compile with when building objects for libraries. These are intended to represent already compiled object files. These paths are relative to the code:"path_object_script", code:"path_object_shared", or code:"path_object_static". The order of these may matter if the compiler (such as GCC:"GNU Compiler Collection" or a linker via GCC:"GNU Compiler Collection") is order sensitive. - code:"build_objects_library_shared"\: - A collection of object files to be compile with when building shared libraries. + A collection of object files to be compile with when building objects for shared libraries. These are intended to represent already compiled object files. These paths are relative to the code:"path_object_shared". The order of these may matter if the compiler (such as GCC:"GNU Compiler Collection" or a linker via GCC:"GNU Compiler Collection") is order sensitive. These are applied to only shared builds. - code:"build_objects_library_static"\: - A collection of object files to be compile with when building static libraries. + A collection of object files to be compile with when building objects for static libraries. These are intended to represent already compiled object files. These paths are relative to the code:"path_object_static". The order of these may matter if the compiler (such as GCC:"GNU Compiler Collection" or a linker via GCC:"GNU Compiler Collection") is order sensitive. These are applied to only static builds. - code:"build_objects_program"\: - A collection of object files to be compile with when building programs. + A collection of object files to be compile with when building objects for programs. These are intended to represent already compiled object files. These paths are relative to the code:"path_object_script", code:"path_object_shared", or code:"path_object_static". The order of these may matter if the compiler (such as GCC:"GNU Compiler Collection" or a linker via GCC:"GNU Compiler Collection") is order sensitive. - code:"build_objects_program_shared"\: - A collection of object files to be compile with when building shared programs. + A collection of object files to be compile with when building objects for shared programs. These are intended to represent already compiled object files. These paths are relative to the code:"path_object_shared". The order of these may matter if the compiler (such as GCC:"GNU Compiler Collection" or a linker via GCC:"GNU Compiler Collection") is order sensitive. These are applied to only shared builds. - code:"build_objects_program_static"\: - A collection of object files to be compile with when building static programs. + A collection of object files to be compile with when building objects for static programs. These are intended to represent already compiled object files. These paths are relative to the code:"path_object_static". The order of these may matter if the compiler (such as GCC:"GNU Compiler Collection" or a linker via GCC:"GNU Compiler Collection") is order sensitive. diff --git a/level_3/fake/specifications/settings.txt b/level_3/fake/specifications/settings.txt index 9a94ef2..dcfaa08 100644 --- a/level_3/fake/specifications/settings.txt +++ b/level_3/fake/specifications/settings.txt @@ -1,7 +1,7 @@ # fss-0002 iki-0000 # # license: open-standard-license-1.0-or-later -# version 2024/07/30 +# version 2024/09/20 # # This file (assumed to be named settings.txt) can be more easily read using the following iki_read commands: # iki_read settings.txt +Q -w -WW character "'" "'" code '"' '"' @@ -21,9 +21,21 @@ Settings Specification: bold:"Object" names and their respective bold:"Content" purpose/restrictions\: - code:"build_compiler": Only one bold:"Content", which must only be a valid filename. + - code:"build_compiler_arguments": Must be zero or more parameters. + - code:"build_compiler_arguments_shared": Must be zero or more parameters. + - code:"build_compiler_arguments_static": Must be zero or more parameters. + - code:"build_compiler_arguments_library": Must be zero or more parameters. + - code:"build_compiler_arguments_library_shared": Must be zero or more parameters. + - code:"build_compiler_arguments_library_static": Must be zero or more parameters. + - code:"build_compiler_arguments_object": Must be zero or more parameters. + - code:"build_compiler_arguments_object_shared": Must be zero or more parameters. + - code:"build_compiler_arguments_object_static": Must be zero or more parameters. + - code:"build_compiler_arguments_program": Must be zero or more parameters. + - code:"build_compiler_arguments_program_shared": Must be zero or more parameters. + - code:"build_compiler_arguments_program_static": Must be zero or more parameters. - code:"build_indexer": Only one bold:"Content", which must only be a valid filename. - code:"build_indexer_arguments": Zero or more arguments supported by the indexer specified in code:"build_indexer". - - code:"build_language": Must only be one of: code:"bash", code:"c", or code:"c++". + - code:"build_language": May be any language but is generally only a known or supported language, such as: code:"c", code:"c++", or code:"go". - code:"build_libraries": Must only contain any number of valid library include arguments that are valid for the compiler defined in "build_compiler" bold:"Object". - code:"build_libraries_shared": Must only contain any number of valid library include arguments that are valid for the compiler defined in "build_compiler" bold:"Object". - code:"build_libraries_static": Must only contain any number of valid library include arguments that are valid for the compiler defined in "build_compiler" bold:"Object". @@ -114,6 +126,6 @@ Settings Specification: - code:"version_minor_prefix": Must be zero or more valid filename characters (no slashes allowed). - code:"version_nano": Must only be a single value containing valid filename characters (no slashes allowed). - code:"version_nano_prefix": Must be zero or more valid filename characters (no slashes allowed). - - code:"version_target": Must only be one of: code:"major", code:"minor", code:"micro", or code:"nano". + - code:"version_target": Must only be one of: code:"major", code:"minor", code:"micro", or code:"nano" (no slashes allowed). All bold:"Object" names support having a code:"-" and a code:"mode" name, such as code:"build_libraries-individual" for a mode called code:"individual", except for the code:"modes" and the code:"modes_default" bold:"Object" names. -- 1.8.3.1