From ff4f2effda74fad99d6b7715a0808ee6c19b4642 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 22 Sep 2024 20:53:35 -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. --- level_3/fake/c/common.c | 7 +- level_3/fake/c/common.h | 35 +- level_3/fake/c/private-build-library.c | 405 ++++++++------ level_3/fake/c/private-build-load.c | 203 +++++--- level_3/fake/c/private-build-object.c | 36 +- level_3/fake/c/private-build-program.c | 99 +++- level_3/fake/c/private-build.c | 62 ++- level_3/fake/c/private-clean.c | 14 +- level_3/fake/c/private-common.c | 13 + level_3/fake/c/private-common.h | 579 ++++++++++++--------- level_3/fake/c/private-make-operate.c | 3 +- level_3/fake/c/private-skeleton.c | 20 +- .../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 | 88 +++- level_3/fake/specifications/settings.txt | 16 +- 22 files changed, 1100 insertions(+), 536 deletions(-) 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/level_3/fake/c/common.c b/level_3/fake/c/common.c index ff80afd..26ba47a 100644 --- a/level_3/fake/c/common.c +++ b/level_3/fake/c/common.c @@ -18,13 +18,13 @@ extern "C" { #endif // _di_fake_program_help_parameters_ #ifndef _di_fake_path_ - const f_string_static_t fake_path_part_bash_s = macro_f_string_static_t_initialize(FAKE_path_part_bash_s, 0, FAKE_path_part_bash_s_length); const f_string_static_t fake_path_part_build_s = macro_f_string_static_t_initialize(FAKE_path_part_build_s, 0, FAKE_path_part_build_s_length); const f_string_static_t fake_path_part_c_s = macro_f_string_static_t_initialize(FAKE_path_part_c_s, 0, FAKE_path_part_c_s_length); const f_string_static_t fake_path_part_cpp_s = macro_f_string_static_t_initialize(FAKE_path_part_cpp_s, 0, FAKE_path_part_cpp_s_length); const f_string_static_t fake_path_part_data_s = macro_f_string_static_t_initialize(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(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(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(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(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(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(FAKE_path_part_licenses_s, 0, FAKE_path_part_licenses_s_length); @@ -34,6 +34,7 @@ extern "C" { const f_string_static_t fake_path_part_script_s = macro_f_string_static_t_initialize(FAKE_path_part_script_s, 0, FAKE_path_part_script_s_length); const f_string_static_t fake_path_part_settings_s = macro_f_string_static_t_initialize(FAKE_path_part_settings_s, 0, FAKE_path_part_settings_s_length); const f_string_static_t fake_path_part_shared_s = macro_f_string_static_t_initialize(FAKE_path_part_shared_s, 0, FAKE_path_part_shared_s_length); + const f_string_static_t fake_path_part_shell_s = macro_f_string_static_t_initialize(FAKE_path_part_shell_s, 0, FAKE_path_part_shell_s_length); const f_string_static_t fake_path_part_specifications_s = macro_f_string_static_t_initialize(FAKE_path_part_specifications_s, 0, FAKE_path_part_specifications_s_length); const f_string_static_t fake_path_part_stage_s = macro_f_string_static_t_initialize(FAKE_path_part_stage_s, 0, FAKE_path_part_stage_s_length); const f_string_static_t fake_path_part_static_s = macro_f_string_static_t_initialize(FAKE_path_part_static_s, 0, FAKE_path_part_static_s_length); @@ -59,9 +60,11 @@ extern "C" { #endif // _di_fake_defaults_ #ifndef _di_fake_build_language_ - const f_string_static_t fake_build_language_bash_s = macro_f_string_static_t_initialize(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(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(FAKE_build_language_cpp_s, 0, FAKE_build_language_cpp_s_length); + const f_string_static_t fake_build_language_custom_s = macro_f_string_static_t_initialize(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(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(FAKE_build_language_shell_s, 0, FAKE_build_language_shell_s_length); #endif // _di_fake_build_language_ #ifndef _di_fake_build_version_ diff --git a/level_3/fake/c/common.h b/level_3/fake/c/common.h index 34c9881..26a5633 100644 --- a/level_3/fake/c/common.h +++ b/level_3/fake/c/common.h @@ -85,13 +85,13 @@ extern "C" { * These structures are hard-coded by their individual pieces to be constructed later on. */ #ifndef _di_fake_path_ - #define FAKE_path_part_bash_s "bash" F_path_separator_s #define FAKE_path_part_build_s "build" F_path_separator_s #define FAKE_path_part_c_s "c" F_path_separator_s #define FAKE_path_part_cpp_s "c++" F_path_separator_s #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,17 +101,18 @@ extern "C" { #define FAKE_path_part_script_s "script" F_path_separator_s #define FAKE_path_part_settings_s "settings" F_path_separator_s #define FAKE_path_part_shared_s "shared" F_path_separator_s + #define FAKE_path_part_shell_s "shell" F_path_separator_s #define FAKE_path_part_specifications_s "specifications" F_path_separator_s #define FAKE_path_part_stage_s "stage" F_path_separator_s #define FAKE_path_part_static_s "static" F_path_separator_s - #define FAKE_path_part_bash_s_length 4 + F_path_separator_s_length #define FAKE_path_part_build_s_length 5 + F_path_separator_s_length #define FAKE_path_part_c_s_length 1 + F_path_separator_s_length #define FAKE_path_part_cpp_s_length 3 + F_path_separator_s_length #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,17 +122,18 @@ extern "C" { #define FAKE_path_part_script_s_length 6 + F_path_separator_s_length #define FAKE_path_part_settings_s_length 8 + F_path_separator_s_length #define FAKE_path_part_shared_s_length 6 + F_path_separator_s_length + #define FAKE_path_part_shell_s_length 5 + F_path_separator_s_length #define FAKE_path_part_specifications_s_length 14 + F_path_separator_s_length #define FAKE_path_part_stage_s_length 5 + F_path_separator_s_length #define FAKE_path_part_static_s_length 6 + F_path_separator_s_length - extern const f_string_static_t fake_path_part_bash_s; extern const f_string_static_t fake_path_part_build_s; extern const f_string_static_t fake_path_part_c_s; extern const f_string_static_t fake_path_part_cpp_s; 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; @@ -142,6 +144,7 @@ extern "C" { extern const f_string_static_t fake_path_part_settings_s; extern const f_string_static_t fake_path_part_shared_s; extern const f_string_static_t fake_path_part_specifications_s; + extern const f_string_static_t fake_path_part_shell_s; extern const f_string_static_t fake_path_part_stage_s; extern const f_string_static_t fake_path_part_static_s; #endif // _di_fake_path_ @@ -206,22 +209,30 @@ extern "C" { */ #ifndef _di_fake_build_language_ enum { - fake_build_language_type_bash_e = 1, - fake_build_language_type_c_e, + fake_build_language_type_c_e = 1, fake_build_language_type_cpp_e, + fake_build_language_type_custom_e, + fake_build_language_type_golang_e, + fake_build_language_type_shell_e, }; // enum - #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_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_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_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_ /** diff --git a/level_3/fake/c/private-build-library.c b/level_3/fake/c/private-build-library.c index 5d5ef4a..a166a8d 100644 --- a/level_3/fake/c/private-build-library.c +++ b/level_3/fake/c/private-build-library.c @@ -32,6 +32,38 @@ extern "C" { f_string_dynamics_t arguments = f_string_dynamics_t_initialize; + 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; + + *status = fll_execute_arguments_add(values[i]->array[j], &arguments); + if (F_status_is_error(*status)) break; + } // for + + if (F_status_is_error(*status)) { + fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + + f_string_dynamics_resize(0, &arguments); + + return 0; + } + } // for + } + *status = 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, &arguments); if (F_status_is_error(*status)) { @@ -109,9 +141,7 @@ extern "C" { }; { - uint8_t i = 0; - - for (; i < strings_length; ++i) { + 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); @@ -209,9 +239,7 @@ extern "C" { 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; - } - { f_string_static_t parameter_file_path = f_string_static_t_initialize; f_string_static_t parameter_linker = f_string_static_t_initialize; @@ -289,23 +317,30 @@ extern "C" { parameter_file_path, }; - for (uint8_t i = 0; i < 4; ++i) { + for (i = 0; i < 4; ++i) { if (!values[i].used) continue; *status = fll_execute_arguments_add(values[i], &arguments); - if (F_status_is_error(*status)) break; + + if (F_status_is_error(*status)) { + fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + + f_string_dynamics_resize(0, &arguments); + + return 0; + } } // for + } - fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_library_e, &arguments, status); + fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_library_e, &arguments, status); - if (F_status_is_error(*status)) { - fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + if (F_status_is_error(*status)) { + fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_arguments_standard_add", F_true); - f_string_dynamics_resize(0, &arguments); + f_string_dynamics_resize(0, &arguments); - return 0; - } + return 0; } { @@ -317,52 +352,22 @@ extern "C" { if (*status == F_child) return result; } - if (parameter_file_name_major.used) { - f_string_static_t parameter_file_path = f_string_static_t_initialize; - parameter_file_path.used = data->path_build_libraries_shared.used + parameter_file_name.used; - - f_char_t parameter_file_path_string[parameter_file_path.used + 1]; - parameter_file_path.string = parameter_file_path_string; - parameter_file_path_string[parameter_file_path.used] = 0; - - memcpy(parameter_file_path_string, data->path_build_libraries_shared.string, sizeof(f_char_t) * data->path_build_libraries_shared.used); - memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name.string, sizeof(f_char_t) * parameter_file_name.used); - - *status = f_file_link(parameter_file_name_major, parameter_file_path); - - if (F_status_is_error_not(*status) && data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->output.to.stream, parameter_file_path, parameter_file_name_major, f_string_eol_s); - } - else if (F_status_is_error(*status)) { - if (F_status_set_fine(*status) == F_file_found) { - fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e); - - return 0; - } - - fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_major, f_file_operation_link_s, fll_error_file_type_file_e); - - return 0; - } - } - - if (data_build->setting.version_file != fake_build_version_type_major_e && parameter_file_name_major.used) { - f_string_static_t parameter_file_path = f_string_static_t_initialize; - - { - parameter_file_path.used = data->path_build_libraries_shared.used + parameter_file_name_major.used; + { + if (parameter_file_name_major.used) { + f_string_static_t parameter_file_path = f_string_static_t_initialize; + parameter_file_path.used = data->path_build_libraries_shared.used + parameter_file_name.used; f_char_t parameter_file_path_string[parameter_file_path.used + 1]; parameter_file_path.string = parameter_file_path_string; parameter_file_path_string[parameter_file_path.used] = 0; memcpy(parameter_file_path_string, data->path_build_libraries_shared.string, sizeof(f_char_t) * data->path_build_libraries_shared.used); - memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name_major.string, sizeof(f_char_t) * parameter_file_name_major.used); + memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name.string, sizeof(f_char_t) * parameter_file_name.used); - *status = f_file_link(parameter_file_name_minor, parameter_file_path); + *status = f_file_link(parameter_file_name_major, parameter_file_path); if (F_status_is_error_not(*status) && data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->output.to.stream, parameter_file_path, parameter_file_name_minor, f_string_eol_s); + fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->output.to.stream, parameter_file_path, parameter_file_name_major, f_string_eol_s); } else if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_file_found) { @@ -371,27 +376,29 @@ extern "C" { return 0; } - fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_minor, f_file_operation_link_s, fll_error_file_type_file_e); + fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_major, f_file_operation_link_s, fll_error_file_type_file_e); return 0; } } - if (data_build->setting.version_file != fake_build_version_type_minor_e && parameter_file_name_minor.used) { + if (data_build->setting.version_file != fake_build_version_type_major_e && parameter_file_name_major.used) { + f_string_static_t parameter_file_path = f_string_static_t_initialize; + { - parameter_file_path.used = data->path_build_libraries_shared.used + parameter_file_name_minor.used; + parameter_file_path.used = data->path_build_libraries_shared.used + parameter_file_name_major.used; f_char_t parameter_file_path_string[parameter_file_path.used + 1]; parameter_file_path.string = parameter_file_path_string; parameter_file_path_string[parameter_file_path.used] = 0; memcpy(parameter_file_path_string, data->path_build_libraries_shared.string, sizeof(f_char_t) * data->path_build_libraries_shared.used); - memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name_minor.string, sizeof(f_char_t) * parameter_file_name_minor.used); + memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name_major.string, sizeof(f_char_t) * parameter_file_name_major.used); - *status = f_file_link(parameter_file_name_micro, parameter_file_path); + *status = f_file_link(parameter_file_name_minor, parameter_file_path); if (F_status_is_error_not(*status) && data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->output.to.stream, parameter_file_path, parameter_file_name_micro, f_string_eol_s); + fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->output.to.stream, parameter_file_path, parameter_file_name_minor, f_string_eol_s); } else if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_file_found) { @@ -400,37 +407,67 @@ extern "C" { return 0; } - fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_micro, f_file_operation_link_s, fll_error_file_type_file_e); + fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_minor, f_file_operation_link_s, fll_error_file_type_file_e); return 0; } } - if (data_build->setting.version_file != fake_build_version_type_micro_e && parameter_file_name_micro.used) { - parameter_file_path.used = data->path_build_libraries_shared.used + parameter_file_name_micro.used; + if (data_build->setting.version_file != fake_build_version_type_minor_e && parameter_file_name_minor.used) { + { + parameter_file_path.used = data->path_build_libraries_shared.used + parameter_file_name_minor.used; - f_char_t parameter_file_path_string[parameter_file_path.used + 1]; - parameter_file_path.string = parameter_file_path_string; - parameter_file_path_string[parameter_file_path.used] = 0; + f_char_t parameter_file_path_string[parameter_file_path.used + 1]; + parameter_file_path.string = parameter_file_path_string; + parameter_file_path_string[parameter_file_path.used] = 0; - memcpy(parameter_file_path_string, data->path_build_libraries_shared.string, sizeof(f_char_t) * data->path_build_libraries_shared.used); - memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name_micro.string, sizeof(f_char_t) * parameter_file_name_micro.used); + memcpy(parameter_file_path_string, data->path_build_libraries_shared.string, sizeof(f_char_t) * data->path_build_libraries_shared.used); + memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name_minor.string, sizeof(f_char_t) * parameter_file_name_minor.used); - *status = f_file_link(parameter_file_name_nano, parameter_file_path); + *status = f_file_link(parameter_file_name_micro, parameter_file_path); - if (F_status_is_error_not(*status) && data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->output.to.stream, parameter_file_path, parameter_file_name_nano, f_string_eol_s); - } - else if (F_status_is_error(*status)) { - if (F_status_set_fine(*status) == F_file_found) { - fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e); + if (F_status_is_error_not(*status) && data->main->error.verbosity >= f_console_verbosity_verbose_e) { + fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->output.to.stream, parameter_file_path, parameter_file_name_micro, f_string_eol_s); + } + else if (F_status_is_error(*status)) { + if (F_status_set_fine(*status) == F_file_found) { + fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e); + + return 0; + } + + fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_micro, f_file_operation_link_s, fll_error_file_type_file_e); return 0; } + } - fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_nano, f_file_operation_link_s, fll_error_file_type_file_e); + if (data_build->setting.version_file != fake_build_version_type_micro_e && parameter_file_name_micro.used) { + parameter_file_path.used = data->path_build_libraries_shared.used + parameter_file_name_micro.used; - return 0; + f_char_t parameter_file_path_string[parameter_file_path.used + 1]; + parameter_file_path.string = parameter_file_path_string; + parameter_file_path_string[parameter_file_path.used] = 0; + + memcpy(parameter_file_path_string, data->path_build_libraries_shared.string, sizeof(f_char_t) * data->path_build_libraries_shared.used); + memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name_micro.string, sizeof(f_char_t) * parameter_file_name_micro.used); + + *status = f_file_link(parameter_file_name_nano, parameter_file_path); + + if (F_status_is_error_not(*status) && data->main->error.verbosity >= f_console_verbosity_verbose_e) { + fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->output.to.stream, parameter_file_path, parameter_file_name_nano, f_string_eol_s); + } + else if (F_status_is_error(*status)) { + if (F_status_set_fine(*status) == F_file_found) { + fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e); + + return 0; + } + + fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_nano, f_file_operation_link_s, fll_error_file_type_file_e); + + return 0; + } } } } @@ -458,8 +495,37 @@ extern "C" { f_string_dynamics_t arguments = f_string_dynamics_t_initialize; f_array_length_t i = 0; + f_array_length_t j = 0; - for (; i < data_build->setting.build_indexer_arguments.used; ++i) { + { + 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; + + *status = fll_execute_arguments_add(values[i]->array[j], &arguments); + if (F_status_is_error(*status)) break; + } // for + + if (F_status_is_error(*status)) { + fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + + f_string_dynamics_resize(0, &arguments); + + return 0; + } + } // for + } + + for (i = 0; i < data_build->setting.build_indexer_arguments.used; ++i) { if (!data_build->setting.build_indexer_arguments.array[i].used) continue; @@ -502,7 +568,6 @@ extern "C" { if (F_status_is_error_not(*status)) { f_string_static_t source = f_string_static_t_initialize; - f_array_length_t j = 0; const f_string_dynamics_t *sources[2] = { &data_build->setting.build_sources_library, @@ -625,7 +690,8 @@ extern "C" { f_array_length_t i = 0; f_array_length_t j = 0; - uint8_t k = 0; + f_array_length_t k = 0; + uint8_t v = 0; for (i = 0; i < 2; ++i) { @@ -635,7 +701,36 @@ extern "C" { file_name.used = 0; destination_path.used = 0; - arguments.used = 0 ; + + while (arguments.used) { + arguments.array[--arguments.used].used = 0; + } // while + + { + 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 (v = 0; v < 4; ++v) { + + for (k = 0; k < values[v]->used; ++k) { + + if (!values[v]->array[k].used) continue; + + *status = fll_execute_arguments_add(values[v]->array[k], &arguments); + if (F_status_is_error(*status)) break; + } // for + + if (F_status_is_error(*status)) { + fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + + break; + } + } // for + } fake_build_path_source_length(data, data_build, &data_build->setting.path_sources_library, &source); @@ -656,121 +751,127 @@ extern "C" { break; } - *status = f_file_name_directory(sources[i]->array[j], &destination_path); - - if (F_status_is_error(*status)) { - fll_error_print(data->main->error, F_status_set_fine(*status), "f_file_name_directory", F_true); - - break; - } - - if (destination_path.used) { - *status = f_string_dynamic_prepend(data->path_build_objects_static, &destination_path); + if (data_build->setting.language == fake_build_language_type_c_e || data_build->setting.language == fake_build_language_type_cpp_e) { + *status = f_file_name_directory(sources[i]->array[j], &destination_path); if (F_status_is_error(*status)) { - fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_prepend", F_true); + fll_error_print(data->main->error, F_status_set_fine(*status), "f_file_name_directory", F_true); break; } - *status = f_string_dynamic_append_assure(f_path_separator_s, &destination_path); + if (destination_path.used) { + *status = f_string_dynamic_prepend(data->path_build_objects_static, &destination_path); - if (F_status_is_error(*status)) { - fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_assure", F_true); - - break; - } + if (F_status_is_error(*status)) { + fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_prepend", F_true); - *status = f_directory_exists(destination_path); + break; + } - if (*status == F_false) { - if (data->main->error.verbosity != f_console_verbosity_quiet_e) { - flockfile(data->main->error.to.stream); + *status = f_string_dynamic_append_assure(f_path_separator_s, &destination_path); - fl_print_format("%r%[%QThe path '%]", data->main->error.to.stream, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%Q%]", data->main->error.to.stream, data->main->error.notable, destination_path, data->main->error.notable); - fl_print_format("%[' exists but is not a directory.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s); + if (F_status_is_error(*status)) { + fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_assure", F_true); - funlockfile(data->main->error.to.stream); + break; } - *status = F_status_set_error(F_failure); + *status = f_directory_exists(destination_path); - break; - } - - if (*status == F_file_found_not) { - *status = f_directory_create(destination_path, mode.directory); - - if (F_status_is_error(*status)) { - if (F_status_set_fine(*status) == F_file_found_not) { + if (*status == F_false) { + if (data->main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(data->main->error.to.stream); fl_print_format("%r%[%QThe path '%]", data->main->error.to.stream, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%Q%]", data->main->error.to.stream, data->main->error.notable, destination_path, data->main->error.notable); - fl_print_format("%[' could not be created, a parent directory does not exist.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s); + fl_print_format("%[' exists but is not a directory.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s); funlockfile(data->main->error.to.stream); } - else { - fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_directory_create", F_true, destination_path, f_file_operation_create_s, fll_error_file_type_directory_e); - } + + *status = F_status_set_error(F_failure); break; } - if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Directory '%Q' created.%r", data->main->output.to.stream, destination_path, f_string_eol_s); + if (*status == F_file_found_not) { + *status = f_directory_create(destination_path, mode.directory); + + if (F_status_is_error(*status)) { + if (F_status_set_fine(*status) == F_file_found_not) { + flockfile(data->main->error.to.stream); + + fl_print_format("%r%[%QThe path '%]", data->main->error.to.stream, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); + fl_print_format("%[%Q%]", data->main->error.to.stream, data->main->error.notable, destination_path, data->main->error.notable); + fl_print_format("%[' could not be created, a parent directory does not exist.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s); + + funlockfile(data->main->error.to.stream); + } + else { + fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_directory_create", F_true, destination_path, f_file_operation_create_s, fll_error_file_type_directory_e); + } + + break; + } + + if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { + fll_print_format("Directory '%Q' created.%r", data->main->output.to.stream, destination_path, f_string_eol_s); + } } - } - if (F_status_is_error(*status)) { - fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_directory_exists", F_true, destination_path, f_file_operation_create_s, fll_error_file_type_directory_e); + if (F_status_is_error(*status)) { + fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_directory_exists", F_true, destination_path, f_file_operation_create_s, fll_error_file_type_directory_e); - break; - } + break; + } - destination.used = destination_path.used + file_name.used + fake_build_parameter_object_name_suffix_s.used; - } - else { - destination.used = data->path_build_objects_static.used + file_name.used + fake_build_parameter_object_name_suffix_s.used; - } + destination.used = destination_path.used + file_name.used + fake_build_parameter_object_name_suffix_s.used; + } + else { + destination.used = data->path_build_objects_static.used + file_name.used + fake_build_parameter_object_name_suffix_s.used; + } - f_char_t destination_string[destination.used + 1]; - destination.string = destination_string; - destination_string[destination.used] = 0; + f_char_t destination_string[destination.used + 1]; + destination.string = destination_string; + destination_string[destination.used] = 0; - if (destination_path.used) { - memcpy(destination_string, destination_path.string, sizeof(f_char_t) * destination_path.used); - memcpy(destination_string + destination_path.used, file_name.string, sizeof(f_char_t) * file_name.used); - memcpy(destination_string + destination_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used); - } - else { - memcpy(destination_string, data->path_build_objects_static.string, sizeof(f_char_t) * data->path_build_objects_static.used); - memcpy(destination_string + data->path_build_objects_static.used, file_name.string, sizeof(f_char_t) * file_name.used); - memcpy(destination_string + data->path_build_objects_static.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used); - } + if (destination_path.used) { + memcpy(destination_string, destination_path.string, sizeof(f_char_t) * destination_path.used); + memcpy(destination_string + destination_path.used, file_name.string, sizeof(f_char_t) * file_name.used); + memcpy(destination_string + destination_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used); + } + else { + memcpy(destination_string, data->path_build_objects_static.string, sizeof(f_char_t) * data->path_build_objects_static.used); + memcpy(destination_string + data->path_build_objects_static.used, file_name.string, sizeof(f_char_t) * file_name.used); + memcpy(destination_string + data->path_build_objects_static.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used); + } - const f_string_static_t values[] = { - source, - fake_build_parameter_object_compile_s, - fake_build_parameter_object_static_s, - fake_build_parameter_object_output_s, - destination, - }; + const f_string_static_t values[] = { + source, + fake_build_parameter_object_compile_s, + fake_build_parameter_object_static_s, + fake_build_parameter_object_output_s, + destination, + }; - for (k = 0; k < 5; ++k) { + for (v = 0; v < 5; ++v) { - if (!values[k].used) continue; + if (!values[v].used) continue; - *status = fll_execute_arguments_add(values[k], &arguments); + *status = fll_execute_arguments_add(values[v], &arguments); + if (F_status_is_error(*status)) break; + } // for + } + else if (source.used) { + *status = fll_execute_arguments_add(source, &arguments); if (F_status_is_error(*status)) break; - } // for + } fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_object_e, &arguments, status); if (F_status_is_error(*status)) { - fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_arguments_standard_add", F_true); break; } diff --git a/level_3/fake/c/private-build-load.c b/level_3/fake/c/private-build-load.c index 2cd4484..3bb3891 100644 --- a/level_3/fake/c/private-build-load.c +++ b/level_3/fake/c/private-build-load.c @@ -265,6 +265,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; @@ -307,9 +308,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, @@ -404,9 +418,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, @@ -501,9 +528,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 @@ -747,6 +787,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, @@ -792,6 +833,7 @@ extern "C" { &build_compiler, &build_indexer, &build_language, + &build_language_path, &build_name, &build_script, &build_shared, @@ -837,6 +879,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 @@ -871,7 +914,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 @@ -914,54 +958,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 @@ -1006,13 +1052,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 @@ -1058,6 +1105,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 @@ -1103,6 +1151,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 f_string_empty_s, // build_script f_string_empty_s, // build_shared @@ -1144,11 +1193,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. 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 @@ -1193,7 +1243,7 @@ extern "C" { f_array_length_t j = 0; f_string_dynamic_t *single_source = 0; - for (f_array_length_t i = 0; i < 42; ++i) { + for (f_array_length_t i = 0; i < 43; ++i) { // Assign the default for literal and path types. if (!settings_single_matches[i] && settings_single_destination[i]) { @@ -1242,16 +1292,36 @@ extern "C" { } } else if (settings_single_type[i] == 4) { - if (fl_string_dynamic_compare_trim(*single_source, fake_build_language_bash_s) == F_equal_to) { - *settings_single_language[i] = fake_build_language_type_bash_e; - } - else if (fl_string_dynamic_compare_trim(*single_source, fake_build_language_c_s) == F_equal_to) { + if (fl_string_dynamic_compare_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_type_c_e; } else if (fl_string_dynamic_compare_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_type_cpp_e; } + else if (fl_string_dynamic_compare_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_type_golang_e; + } + else if (fl_string_dynamic_compare_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_type_shell_e; + } + else if (single_source->used) { + *settings_single_language[i] = fake_build_language_type_custom_e; + settings_single_destination[i]->used = 0; + + *status = f_string_dynamic_append(*single_source, settings_single_destination[i]); + + if (F_status_is_error(*status)) { + fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true); + + break; + } + } else { + *settings_single_destination[i] = fake_build_language_c_s; *settings_single_language[i] = fake_build_language_type_c_e; if (data->main->warning.verbosity >= f_console_verbosity_verbose_e) { @@ -1262,11 +1332,13 @@ extern "C" { fl_print_format("%[' in the file '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context); fl_print_format("%[%Q%]", data->main->warning.to.stream, data->main->warning.notable, path_file, data->main->warning.notable); fl_print_format("%[' may only be one of '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context); - fl_print_format("%[%r%]", data->main->warning.to.stream, data->main->warning.notable, fake_build_language_bash_s, data->main->warning.notable); - fl_print_format("%[', '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context); fl_print_format("%[%r%]", data->main->warning.to.stream, data->main->warning.notable, fake_build_language_c_s, data->main->warning.notable); - fl_print_format("%[', or '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context); + fl_print_format("%[', '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context); fl_print_format("%[%r%]", data->main->warning.to.stream, data->main->warning.notable, fake_build_language_cpp_s, data->main->warning.notable); + fl_print_format("%[', or '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context); + fl_print_format("%[%r%]", data->main->warning.to.stream, data->main->warning.notable, fake_build_language_golang_s, data->main->warning.notable); + fl_print_format("%[', or '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context); + fl_print_format("%[%r%]", data->main->warning.to.stream, data->main->warning.notable, fake_build_language_shell_s, data->main->warning.notable); fl_print_format("%[', defaulting to '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context); fl_print_format("%[%r%]", data->main->warning.to.stream, data->main->warning.notable, fake_build_language_c_s, data->main->warning.notable); fl_print_format("%['.%]%r", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context, f_string_eol_s); @@ -1418,36 +1490,36 @@ extern "C" { // Handle special defaults for path sources. if (F_status_is_error_not(*status)) { - // [72] path_sources_headers. - if (!settings_matches[72]) { + // [85] path_sources_headers. + if (!settings_matches[85]) { setting->path_sources_headers.used = 0; *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(*status)) { + // [86] path_sources_library. + if (!settings_matches[86] && F_status_is_error_not(*status)) { setting->path_sources_library.used = 0; *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(*status)) { + // [87] path_sources_object. + if (!settings_matches[87] && F_status_is_error_not(*status)) { setting->path_sources_object.used = 0; *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(*status)) { + // [88] path_sources_program. + if (!settings_matches[88] && F_status_is_error_not(*status)) { setting->path_sources_program.used = 0; *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(*status)) { + // [89] path_sources_script. + if (!settings_matches[89] && F_status_is_error_not(*status)) { setting->path_sources_script.used = 0; *status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_script); @@ -1500,6 +1572,7 @@ extern "C" { f_string_dynamics_resize(0, &build_compiler); f_string_dynamics_resize(0, &build_indexer); f_string_dynamics_resize(0, &build_language); + f_string_dynamics_resize(0, &build_language_path); f_string_dynamics_resize(0, &build_name); f_string_dynamics_resize(0, &build_script); f_string_dynamics_resize(0, &build_shared); @@ -1631,7 +1704,7 @@ extern "C" { setting->search_static = F_true; } - if (setting->build_language == fake_build_language_type_c_e || setting->build_language == fake_build_language_type_cpp_e) { + if (setting->language == fake_build_language_type_c_e || setting->language == fake_build_language_type_cpp_e) { if (setting->build_shared == F_false && setting->build_static == F_false) { if (data->main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(data->main->error.to.stream); @@ -1641,7 +1714,7 @@ extern "C" { fl_print_format("%[' and '%]", data->main->error.to.stream, data->main->error.context, data->main->error.context); fl_print_format("%[%r%]", data->main->error.to.stream, data->main->error.notable, fake_build_setting_name_build_static_s, data->main->error.notable); fl_print_format("%[' cannot both be false when using the language '%]", data->main->error.to.stream, data->main->error.context, data->main->error.context); - fl_print_format("%[%r%]", data->main->error.to.stream, data->main->error.notable, setting->build_language == fake_build_language_type_c_e ? fake_build_language_c_s : fake_build_language_cpp_s, data->main->error.notable); + fl_print_format("%[%r%]", data->main->error.to.stream, data->main->error.notable, setting->language == fake_build_language_type_c_e ? fake_build_language_c_s : fake_build_language_cpp_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s); funlockfile(data->main->error.to.stream); diff --git a/level_3/fake/c/private-build-object.c b/level_3/fake/c/private-build-object.c index 7b6a807..e646103 100644 --- a/level_3/fake/c/private-build-object.c +++ b/level_3/fake/c/private-build-object.c @@ -41,6 +41,8 @@ extern "C" { f_number_unsigned_t i = 0; f_number_unsigned_t j = 0; + f_number_unsigned_t k = 0; + uint8_t v = 0; const f_string_dynamics_t *sources[2] = { &data_build->setting.build_sources_object, @@ -60,6 +62,32 @@ extern "C" { arguments.array[--arguments.used].used = 0; } // while + { + 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 (v = 0; v < 4; ++v) { + + for (k = 0; k < values[v]->used; ++k) { + + if (!values[v]->array[k].used) continue; + + *status = fll_execute_arguments_add(values[v]->array[k], &arguments); + if (F_status_is_error(*status)) break; + } // for + + if (F_status_is_error(*status)) { + fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + + break; + } + } // for + } + *status = fake_build_sources_object_add(data, data_build, &sources[i]->array[j], &arguments); if (F_status_is_error(*status)) { @@ -166,11 +194,11 @@ extern "C" { cache_3, }; - for (uint8_t i = 0; i < 4; ++i) { + for (v = 0; v < 4; ++v) { - if (!values[i].used) continue; + if (!values[v].used) continue; - *status = fll_execute_arguments_add(values[i], &arguments); + *status = fll_execute_arguments_add(values[v], &arguments); if (F_status_is_error(*status)) { fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); @@ -180,7 +208,7 @@ extern "C" { } // for } - fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_object_e, &arguments, status); // @todo don't add linkage for object. + fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_object_e, &arguments, status); if (F_status_is_error(*status)) { fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_arguments_standard_add", F_true); diff --git a/level_3/fake/c/private-build-program.c b/level_3/fake/c/private-build-program.c index e61ef5c..adf3b0c 100644 --- a/level_3/fake/c/private-build-program.c +++ b/level_3/fake/c/private-build-program.c @@ -32,6 +32,37 @@ extern "C" { } f_string_dynamics_t arguments = f_string_dynamics_t_initialize; + uint8_t i = 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, + }; + + f_array_length_t j = 0; + + for (i = 0; i < 4; ++i) { + + for (j = 0; j < values[i]->used; ++j) { + + if (!values[i]->array[i].used) continue; + + *status = fll_execute_arguments_add(values[i]->array[j], &arguments); + if (F_status_is_error(*status)) break; + } // for + + if (F_status_is_error(*status)) { + fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + + f_string_dynamics_resize(0, &arguments); + + return 0; + } + } // for + } *status = 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, &arguments); @@ -54,28 +85,30 @@ extern "C" { } if (F_status_is_error_not(*status)) { - f_string_static_t parameter_file_name_path = f_string_static_t_initialize; - parameter_file_name_path.used = data->path_build_programs_shared.used + data_build->setting.build_name.used; + if (data_build->setting.language == fake_build_language_type_c_e || data_build->setting.language == fake_build_language_type_cpp_e) { + f_string_static_t parameter_file_name_path = f_string_static_t_initialize; + parameter_file_name_path.used = data->path_build_programs_shared.used + data_build->setting.build_name.used; - f_char_t parameter_file_name_path_string[parameter_file_name_path.used + 1]; - parameter_file_name_path.string = parameter_file_name_path_string; - parameter_file_name_path_string[parameter_file_name_path.used] = 0; + f_char_t parameter_file_name_path_string[parameter_file_name_path.used + 1]; + parameter_file_name_path.string = parameter_file_name_path_string; + parameter_file_name_path_string[parameter_file_name_path.used] = 0; - memcpy(parameter_file_name_path_string, data->path_build_programs_shared.string, sizeof(f_char_t) * data->path_build_programs_shared.used); - memcpy(parameter_file_name_path_string + data->path_build_programs_shared.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used); + memcpy(parameter_file_name_path_string, data->path_build_programs_shared.string, sizeof(f_char_t) * data->path_build_programs_shared.used); + memcpy(parameter_file_name_path_string + data->path_build_programs_shared.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used); - const f_string_static_t values[] = { - fake_build_parameter_library_output_s, - parameter_file_name_path, - }; + const f_string_static_t values[] = { + fake_build_parameter_library_output_s, + parameter_file_name_path, + }; - for (uint8_t i = 0; i < 2; ++i) { + for (i = 0; i < 2; ++i) { - if (!values[i].used) continue; + if (!values[i].used) continue; - *status = fll_execute_arguments_add(values[i], &arguments); - if (F_status_is_error(*status)) break; - } // for + *status = fll_execute_arguments_add(values[i], &arguments); + if (F_status_is_error(*status)) break; + } // for + } } // If project-specific library sources exist, then the -lbuild_name needs to be added to the arguments. @@ -127,6 +160,34 @@ extern "C" { } f_string_dynamics_t arguments = f_string_dynamics_t_initialize; + f_array_length_t i = 0; + uint8_t v = 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 (v = 0; v < 4; ++v) { + + for (i = 0; i < values[v]->used; ++i) { + + if (!values[v]->array[i].used) continue; + + *status = fll_execute_arguments_add(values[v]->array[i], &arguments); + if (F_status_is_error(*status)) break; + } // for + + if (F_status_is_error(*status)) { + fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + + break; + } + } // for + } *status = 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, &arguments); @@ -189,11 +250,11 @@ extern "C" { parameter_file_name_path, }; - for (uint8_t i = 0; i < 4; ++i) { + for (v = 0; v < 4; ++v) { - if (!values[i].used) continue; + if (!values[v].used) continue; - *status = fll_execute_arguments_add(values[i], &arguments); + *status = fll_execute_arguments_add(values[v], &arguments); if (F_status_is_error(*status)) break; } // for } diff --git a/level_3/fake/c/private-build.c b/level_3/fake/c/private-build.c index 6d89807..87737c2 100644 --- a/level_3/fake/c/private-build.c +++ b/level_3/fake/c/private-build.c @@ -27,6 +27,9 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static if (F_status_is_error(*status)) return; + // Only C/C++ is supported here. + if (!(data_build->setting.language == fake_build_language_type_c_e || data_build->setting.language == fake_build_language_type_cpp_e)) return; + { f_array_length_t build_libraries_length = fake_build_parameter_library_link_path_s.used + (is_shared ? data->path_build_libraries_shared.used : data->path_build_libraries_static.used); @@ -909,7 +912,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static 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, &status); - if (data_build.setting.build_language == fake_build_language_type_bash_e) { + if (data_build.setting.language == fake_build_language_type_shell_e) { fake_build_object_script(data, &data_build, mode, stage.file_object_script, &status); fake_build_library_script(data, &data_build, mode, stage.file_library_script, &status); @@ -980,7 +983,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static if (data_build.setting.build_static) { data->main->child = fake_build_object(data, &data_build, mode, stage.file_object_static, F_false, &status); - data->main->child = fake_build_library_static_object(data, &data_build, mode, stage.file_library_static_object, &status); + data->main->child = fake_build_library_static_object(data, &data_build, mode, stage.file_library_static_object, &status); // @todo data->main->child = fake_build_library_static(data, &data_build, mode, stage.file_library_static, &status); @@ -1024,17 +1027,33 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static } if (data_build->setting.has_path_standard) { - if (data_build->setting.build_language == fake_build_language_type_c_e) { + uint8_t add_slash = F_true; + + if (data_build->setting.build_language_path.used) { + source->used += data_build->setting.build_language_path.used; + } + else if (data_build->setting.language == fake_build_language_type_c_e) { source->used += fake_build_language_c_s.used; } - else if (data_build->setting.build_language == fake_build_language_type_cpp_e) { + else if (data_build->setting.language == fake_build_language_type_cpp_e) { source->used += fake_build_language_cpp_s.used; } - else if (data_build->setting.build_language == fake_build_language_type_bash_e) { - source->used += fake_build_language_bash_s.used; + else if (data_build->setting.language == fake_build_language_type_custom_e) { + source->used += fake_build_language_custom_s.used; + } + else if (data_build->setting.language == fake_build_language_type_golang_e) { + source->used += fake_build_language_golang_s.used; + } + else if (data_build->setting.language == fake_build_language_type_shell_e) { + source->used += fake_build_language_shell_s.used; + } + else { + add_slash = F_false; } - source->used += f_path_separator_s.used; + if (add_slash) { + source->used += f_path_separator_s.used; + } } } #endif // _di_fake_build_path_source_length_ @@ -1048,21 +1067,36 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static source->used += setting_path_source->used; if (data_build->setting.has_path_standard) { - if (data_build->setting.build_language == fake_build_language_type_c_e) { + uint8_t add_slash = F_true; + + if (data_build->setting.build_language_path.used) { + memcpy(source->string + source->used, data_build->setting.build_language_path.string, sizeof(f_char_t) * data_build->setting.build_language_path.used); + source->used += data_build->setting.build_language_path.used; + } + else if (data_build->setting.language == fake_build_language_type_c_e) { memcpy(source->string + source->used, fake_build_language_c_s.string, sizeof(f_char_t) * fake_build_language_c_s.used); source->used += fake_build_language_c_s.used; } - else if (data_build->setting.build_language == fake_build_language_type_cpp_e) { + else if (data_build->setting.language == fake_build_language_type_cpp_e) { memcpy(source->string + source->used, fake_build_language_cpp_s.string, sizeof(f_char_t) * fake_build_language_cpp_s.used); source->used += fake_build_language_cpp_s.used; } - else if (data_build->setting.build_language == fake_build_language_type_bash_e) { - memcpy(source->string + source->used, fake_build_language_bash_s.string, sizeof(f_char_t) * fake_build_language_bash_s.used); - source->used += fake_build_language_bash_s.used; + else if (data_build->setting.language == fake_build_language_type_golang_e) { + memcpy(source->string + source->used, fake_build_language_golang_s.string, sizeof(f_char_t) * fake_build_language_golang_s.used); + source->used += fake_build_language_golang_s.used; + } + else if (data_build->setting.language == fake_build_language_type_shell_e) { + memcpy(source->string + source->used, fake_build_language_shell_s.string, sizeof(f_char_t) * fake_build_language_shell_s.used); + source->used += fake_build_language_shell_s.used; + } + else { + add_slash = F_false; } - memcpy(source->string + source->used, f_path_separator_s.string, sizeof(f_char_t) * f_path_separator_s.used); - source->used += f_path_separator_s.used; + if (add_slash) { + memcpy(source->string + source->used, f_path_separator_s.string, sizeof(f_char_t) * f_path_separator_s.used); + source->used += f_path_separator_s.used; + } } source->string[source->used] = 0; diff --git a/level_3/fake/c/private-clean.c b/level_3/fake/c/private-clean.c index 5cb7b67..6c2963a 100644 --- a/level_3/fake/c/private-clean.c +++ b/level_3/fake/c/private-clean.c @@ -28,12 +28,20 @@ extern "C" { status = f_directory_remove(data->path_build, F_directory_descriptors_max_d, F_true); } - if (F_status_set_fine(status) == F_file_found_not || F_status_set_fine(status) == F_directory) { - if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { + if (F_status_set_fine(status) == F_file_found_not) { + if (data->main->error.verbosity >= f_console_verbosity_debug_e) { fll_print_format("The build directory '%[%Q%]' does not exist.%r", data->main->warning.to.stream, data->main->context.set.notable, data->path_build, data->main->context.set.notable, f_string_eol_s); } - status = F_none; + return F_none; + } + + if (F_status_set_fine(status) == F_directory_not) { + if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { + fll_print_format("The build directory '%[%Q%]' exists but is not a directory.%r", data->main->warning.to.stream, data->main->context.set.notable, data->path_build, data->main->context.set.notable, f_string_eol_s); + } + + return F_none; } if (F_status_is_error(status)) { diff --git a/level_3/fake/c/private-common.c b/level_3/fake/c/private-common.c index d035af6..8cd0b2a 100644 --- a/level_3/fake/c/private-common.c +++ b/level_3/fake/c/private-common.c @@ -13,9 +13,22 @@ extern "C" { const f_string_static_t fake_build_setting_default_yes_s = macro_f_string_static_t_initialize(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(FAKE_build_setting_name_build_libraries_static_s, 0, FAKE_build_setting_name_build_libraries_static_s_length); diff --git a/level_3/fake/c/private-common.h b/level_3/fake/c/private-common.h index f7a5b05..5a12ecf 100644 --- a/level_3/fake/c/private-common.h +++ b/level_3/fake/c/private-common.h @@ -214,7 +214,7 @@ extern "C" { * * flag: Flags from data_build_setting_flag_* (Not strictly part of the build settings file). * - * build_language: The build_language setting. + * language: The build_language setting. * * version_file: The version_file setting. * version_target: The version_target setting. @@ -262,58 +262,70 @@ extern "C" { * 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_object setting. - * build_sources_object_shared: The build_sources_object_shared setting. - * build_sources_object_static: The build_sources_object_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_object setting. + * build_sources_object_shared: The build_sources_object_shared setting. + * build_sources_object_static: The build_sources_object_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_ enum { @@ -323,7 +335,7 @@ extern "C" { typedef struct { uint8_t flag; - uint8_t build_language; + uint8_t language; uint8_t version_file; uint8_t version_target; @@ -341,6 +353,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; @@ -371,6 +385,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; @@ -469,6 +495,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, \ @@ -526,6 +566,8 @@ extern "C" { #define macro_fake_build_setting_t_delete_simple(setting) \ macro_f_string_dynamic_t_delete_simple(setting.build_compiler) \ macro_f_string_dynamic_t_delete_simple(setting.build_indexer) \ + macro_f_string_dynamic_t_delete_simple(setting.build_language) \ + macro_f_string_dynamic_t_delete_simple(setting.build_language_path) \ macro_f_string_dynamic_t_delete_simple(setting.build_name) \ macro_f_string_dynamic_t_delete_simple(setting.path_headers) \ macro_f_string_dynamic_t_delete_simple(setting.path_language) \ @@ -555,6 +597,18 @@ extern "C" { macro_f_string_dynamic_t_delete_simple(setting.version_minor_prefix) \ macro_f_string_dynamic_t_delete_simple(setting.version_nano) \ macro_f_string_dynamic_t_delete_simple(setting.version_nano_prefix) \ + macro_f_string_dynamics_t_delete_simple(setting.build_compiler_arguments) \ + macro_f_string_dynamics_t_delete_simple(setting.build_compiler_arguments_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.build_compiler_arguments_static) \ + macro_f_string_dynamics_t_delete_simple(setting.build_compiler_arguments_library) \ + macro_f_string_dynamics_t_delete_simple(setting.build_compiler_arguments_library_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.build_compiler_arguments_library_static) \ + macro_f_string_dynamics_t_delete_simple(setting.build_compiler_arguments_object) \ + macro_f_string_dynamics_t_delete_simple(setting.build_compiler_arguments_object_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.build_compiler_arguments_object_static) \ + macro_f_string_dynamics_t_delete_simple(setting.build_compiler_arguments_program) \ + macro_f_string_dynamics_t_delete_simple(setting.build_compiler_arguments_program_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.build_compiler_arguments_program_static) \ macro_f_string_dynamics_t_delete_simple(setting.build_indexer_arguments) \ macro_f_string_dynamics_t_delete_simple(setting.build_libraries) \ macro_f_string_dynamics_t_delete_simple(setting.build_libraries_shared) \ @@ -614,100 +668,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 @@ -715,100 +782,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; @@ -817,9 +897,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; @@ -911,7 +1004,7 @@ extern "C" { extern const f_string_static_t fake_build_setting_name_version_nano_prefix_s; extern const f_string_static_t fake_build_setting_name_version_target_s; - #define fake_build_setting_total_d 94 + #define fake_build_setting_total_d 107 #endif // _di_fake_build_setting_t_ #ifndef _di_fake_build_stage_t_ diff --git a/level_3/fake/c/private-make-operate.c b/level_3/fake/c/private-make-operate.c index 2ab7687..27b2df3 100644 --- a/level_3/fake/c/private-make-operate.c +++ b/level_3/fake/c/private-make-operate.c @@ -893,7 +893,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, }; @@ -955,6 +955,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/private-skeleton.c b/level_3/fake/c/private-skeleton.c index f7479ba..8bee40f 100644 --- a/level_3/fake/c/private-skeleton.c +++ b/level_3/fake/c/private-skeleton.c @@ -21,34 +21,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_bash_s, &sources_bash); 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_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_golanglang_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_golanglang_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_bash_s, &sources_bash); 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_shell); const f_string_static_t *parameters_value[] = { &data->path_build, @@ -60,10 +65,11 @@ extern "C" { &data->path_licenses, &data->path_sources, &sources, - &sources_bash, &sources_c, &sources_cpp, + &sources_golang, &sources_script, + &sources_shell, &data->path_work, &data->path_work_includes, &data->path_work_libraries, @@ -77,7 +83,7 @@ extern "C" { &fake_path_part_specifications_s, }; - for (uint8_t i = 0; i < 24; ++i) { + for (uint8_t i = 0; i < 25; ++i) { status = fake_skeleton_operate_directory_create(data, *parameters_value[i]); 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 f62170d..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. @@ -365,8 +431,6 @@ Settings Documentation: Absolute paths that start with "./" are relative to the project root rather than the importing file. Absolute paths that start with "/" are treated normally. - This is neither implemented nor supported by Featureless Make 0.6.x and earlier. - - code:"modes"\: A collection of available build modes. Build modes provide custom variants of the build process where certain bold:"settings" are appended onto others. diff --git a/level_3/fake/specifications/settings.txt b/level_3/fake/specifications/settings.txt index 99bf58d..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". -- 1.8.3.1