From: Kevin Day Date: Mon, 14 Feb 2022 04:04:15 +0000 (-0600) Subject: Feature: Fake build settings now supports compiling only object files. X-Git-Tag: 0.5.8~55 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=de1d2626559d597d3eb92559409f45ce2ad0d933;p=fll Feature: Fake build settings now supports compiling only object files. I've observed that many programs like to compile each source file separately by passing "-c" to GCC. Then the linking is done separately. I believe unit tests may benefit from compiling individual object files for cases when mocking needs to be performed only for select functions. With an upcoming stable release planned, I felt that now is the time to get this in. Due to limitations of the compilers, only a single object file may be generated at a time. Multiple generated object files may be combined into either a library or a program. Object file generation is shared vs static aware. Custom defines and flags may be specified for building objects. It is now possible to compile different objects files for the generated library and for the generated program. These are improvements to the build settings build process. The make build process is still available for more advanced compiling. An example project, called "example-objects", is provided to demostrate how to utilize the build settings and a fakefile to compile multiple objects separately and then combine them into a single program. Additional fixes and improvement were necessary to properly complete this feature. Summary of additional fixes and improvements: - Improve default handling behavior in both fake and bootstrap.sh. - Provide more defaults, such as having "compiler" default to "gcc". - Massive cleanup of the bootstrap.sh (bootstrap.sh is now much closer to matching the functionality of the fake build settings). - Update documentation. - Add an error message for when an unknown build mode is passed to the boostrap-example.sh script. - Fix bug in f_path_directory_cleanup() where the termnating NULL is being included in the count. --- diff --git a/build/level_0/settings b/build/level_0/settings index 1fc1e56..3f8c90b 100644 --- a/build/level_0/settings +++ b/build/level_0/settings @@ -25,10 +25,19 @@ build_libraries-level build_libraries-level_threadless build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library account.c private-account.c capability.c color.c color-common.c console.c console-common.c control_group.c control_group-common.c conversion.c conversion-common.c private-conversion.c directory.c private-directory.c environment.c private-environment.c execute.c file.c file-common.c private-file.c fss.c private-fss.c fss-common.c fss_named.c fss_nest.c fss_set.c iki.c iki-common.c private-iki.c limit.c memory.c memory_structure.c private-memory.c path.c path-common.c private-path.c pipe.c print.c print_to.c print-common.c private-print.c private-print_to.c serialize.c serialize-common.c private-serialize.c signal.c socket.c status_string.c string.c string-common.c private-string.c string_dynamic.c string_map.c string_quantity.c string_range.c string_triple.c type_array.c private-type_array.c utf.c utf-common.c utf_dynamic.c utf_map.c utf_string.c utf_triple.c private-utf.c private-utf-is_unassigned.c private-utf_string.c build_sources_library-level thread.c private-thread.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -47,9 +56,15 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static +path_sources +path_sources_object +path_standard yes search_exclusive yes search_shared yes @@ -62,6 +77,9 @@ defines-level_threadless -D_di_pthread_support_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -73,6 +91,9 @@ flags-level -pthread flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/build/level_1/settings b/build/level_1/settings index 33900fd..e4d48e5 100644 --- a/build/level_1/settings +++ b/build/level_1/settings @@ -25,10 +25,19 @@ build_libraries-level -lfll_0 build_libraries-level_threadless -lfll_0 build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library control_group.c conversion.c private-conversion.c directory.c private-directory.c environment.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c iki.c print.c print-common.c private-print.c signal.c string.c private-string.c utf.c private-utf.c utf_file.c private-utf_file.c build_sources_library-level build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -47,9 +56,15 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static +path_sources +path_sources_object +path_standard yes search_exclusive yes search_shared yes @@ -62,6 +77,9 @@ defines-level_threadless -D_di_pthread_support_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -73,6 +91,9 @@ flags-level -pthread flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/build/level_2/settings b/build/level_2/settings index a08aaea..e654109 100644 --- a/build/level_2/settings +++ b/build/level_2/settings @@ -25,10 +25,19 @@ build_libraries-level -lfll_1 -lfll_0 build_libraries-level_threadless -lfll_1 -lfll_0 build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library control_group.c error.c error-common.c private-error.c execute.c private-execute.c file.c private-file.c fss.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c fss_payload.c fss_status_string.c iki.c private-iki.c path.c print.c program.c program-common.c status_string.c build_sources_library-level build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -47,9 +56,15 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static +path_sources +path_sources_object +path_standard yes search_exclusive yes search_shared yes @@ -62,6 +77,9 @@ defines-level_threadless -D_di_pthread_support_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -73,6 +91,9 @@ flags-level -pthread flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/build/monolithic/settings b/build/monolithic/settings index 26488dd..25849bd 100644 --- a/build/monolithic/settings +++ b/build/monolithic/settings @@ -25,10 +25,19 @@ build_libraries-monolithic build_libraries-monolithic_threadless build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library level_0/account.c level_0/private-account.c level_0/capability.c level_0/color.c level_0/color-common.c level_0/console.c level_0/console-common.c level_0/control_group.c level_0/control_group-common.c level_0/conversion.c level_0/conversion-common.c level_0/private-conversion.c level_0/directory.c level_0/private-directory.c level_0/environment.c level_0/private-environment.c level_0/execute.c level_0/file.c level_0/file-common.c level_0/private-file.c level_0/fss.c level_0/private-fss.c level_0/fss-common.c level_0/fss_named.c level_0/fss_nest.c level_0/fss_set.c level_0/iki.c level_0/iki-common.c level_0/private-iki.c level_0/limit.c level_0/memory.c level_0/memory_structure.c level_0/private-memory.c level_0/path.c level_0/path-common.c level_0/private-path.c level_0/pipe.c level_0/print.c level_0/print_to.c level_0/print-common.c level_0/private-print.c level_0/private-print_to.c level_0/serialize.c level_0/serialize-common.c level_0/private-serialize.c level_0/signal.c level_0/socket.c level_0/status_string.c level_0/string.c level_0/string-common.c level_0/private-string.c level_0/string_dynamic.c level_0/string_map.c level_0/string_quantity.c level_0/string_range.c level_0/string_triple.c level_0/type_array.c level_0/private-type_array.c level_0/utf.c level_0/utf-common.c level_0/utf_dynamic.c level_0/utf_map.c level_0/utf_string.c level_0/utf_triple.c level_0/private-utf.c level_0/private-utf-is_unassigned.c level_0/private-utf_string.c level_1/control_group.c level_1/conversion.c level_1/private-conversion.c level_1/directory.c level_1/private-directory.c level_1/environment.c level_1/private-fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_embedded_list.c level_1/fss_extended.c level_1/fss_extended_list.c level_1/iki.c level_1/print.c level_1/print-common.c level_1/private-print.c level_1/signal.c level_1/string.c level_1/private-string.c level_1/utf.c level_1/private-utf.c level_1/utf_file.c level_1/private-utf_file.c level_2/control_group.c level_2/error.c level_2/error-common.c level_2/private-error.c level_2/execute.c level_2/private-execute.c level_2/file.c level_2/private-file.c level_2/fss.c level_2/private-fss.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_embedded_list.c level_2/fss_extended.c level_2/fss_extended_list.c level_2/fss_payload.c level_2/fss_status_string.c level_2/iki.c level_2/private-iki.c level_2/path.c level_2/print.c level_2/program.c level_2/program-common.c level_2/status_string.c build_sources_library-monolithic level_0/thread.c level_0/private-thread.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -47,9 +56,15 @@ path_headers_preserve yes path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static +path_sources +path_sources_object +path_standard yes search_exclusive yes search_shared yes @@ -62,6 +77,9 @@ defines-monolithic_threadless -D_di_pthread_support_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -73,6 +91,9 @@ flags-monolithic -pthread flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/build/scripts/bootstrap-example.sh b/build/scripts/bootstrap-example.sh index dca9c66..ca8597a 100644 --- a/build/scripts/bootstrap-example.sh +++ b/build/scripts/bootstrap-example.sh @@ -135,6 +135,10 @@ if [[ $1 == "fake-individual" || $1 == "fake-level" || $1 == "fake-monolithic" ] ./bootstrap.sh build $verbose $color $shared $static -w $install_path -m $build_mode && ./install.sh $verbose $color $shared $static -w $install_path +elif [[ $1 != "individual" && $1 != "level" && $1 != "monolithic" ]] ; then + echo + echo "ERROR: '$1' is not a supported build mode." + echo fi # regardless of what happens always return to the starting directory. diff --git a/build/scripts/bootstrap.sh b/build/scripts/bootstrap.sh index a58862e..a7146a7 100644 --- a/build/scripts/bootstrap.sh +++ b/build/scripts/bootstrap.sh @@ -43,12 +43,16 @@ bootstrap_main() { local path_data=data/ local path_settings="${path_data}settings/" local path_sources=sources/ - local path_c=sources/c/ + local path_language=c/ local path_work= local project_built= local project_built_shared= local project_built_static= local project_label= + local override_path_build= + local override_path_data= + local override_path_sources= + local override_path_work= local defines_override= local process= local verbosity="normal" @@ -118,14 +122,17 @@ bootstrap_main() { elif [[ $grab_next == "settings_name" ]] ; then settings_name="$p" elif [[ $grab_next == "path_build" ]] ; then - path_build=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|') + path_build=$(echo $p | sed -e 's|//*|/|g' -e 's|/*$|/|') + override_path_build="y" elif [[ $grab_next == "path_data" ]] ; then - path_data=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|') + path_data=$(echo $p | sed -e 's|//*|/|g' -e 's|/*$|/|') + override_path_data="y" elif [[ $grab_next == "path_sources" ]] ; then - path_sources=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|') - path_c="${path_sources}c/" + path_sources=$(echo $p | sed -e 's|//*|/|g' -e 's|/*$|/|') + override_path_sources="y" elif [[ $grab_next == "path_work" ]] ; then - path_work=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|') + path_work=$(echo $p | sed -e 's|//*|/|g' -e 's|/*$|/|') + override_path_work="y" fi grab_next= @@ -203,7 +210,7 @@ bootstrap_main() { if [[ ${variables[$(bootstrap_id modes)]} == "" ]] ; then if [[ $mode != "" ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: the mode $c_notice$mode$c_error is not a valid mode, there are no available modes.$c_error$c_reset" + echo -e "${c_error}ERROR: The mode $c_notice$mode$c_error is not a valid mode, there are no available modes.$c_error$c_reset" fi bootstrap_cleanup @@ -220,7 +227,7 @@ bootstrap_main() { if [[ $i -eq 0 ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: the mode $c_notice$mode$c_error is not a valid mode, it must be one of: $c_notice${variables[$(bootstrap_id modes)]}$c_error.$c_reset" + echo -e "${c_error}ERROR: The mode $c_notice$mode$c_error is not a valid mode, it must be one of: $c_notice${variables[$(bootstrap_id modes)]}$c_error.$c_reset" fi bootstrap_cleanup @@ -230,7 +237,7 @@ bootstrap_main() { if [[ ${variables[$(bootstrap_id build_name)]} == "" ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: the required setting '${c_notice}build_name$c_error' is not specified in the build settings file '$c_notice$settings_file$c_error'.$c_reset" + echo -e "${c_error}ERROR: The required setting '${c_notice}build_name$c_error' is not specified in the build settings file '$c_notice$settings_file$c_error'.$c_reset" fi bootstrap_cleanup @@ -239,7 +246,7 @@ bootstrap_main() { if [[ ${variables[$(bootstrap_id version_major)]} == "" ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: the required setting '${c_notice}version_major$c_error' is not specified in the build settings file '$c_notice$settings_file$c_error'.$c_reset" + echo -e "${c_error}ERROR: The required setting '${c_notice}version_major$c_error' is not specified in the build settings file '$c_notice$settings_file$c_error'.$c_reset" fi bootstrap_cleanup @@ -248,7 +255,7 @@ bootstrap_main() { if [[ ${variables[$(bootstrap_id version_minor)]} == "" ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: the required setting '${c_notice}version_minor$c_error' is not specified in the build settings file '$c_notice$settings_file$c_error'.$c_reset" + echo -e "${c_error}ERROR: The required setting '${c_notice}version_minor$c_error' is not specified in the build settings file '$c_notice$settings_file$c_error'.$c_reset" fi bootstrap_cleanup @@ -257,7 +264,7 @@ bootstrap_main() { if [[ ${variables[$(bootstrap_id version_micro)]} == "" ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: the required setting '${c_notice}version_micro$c_error' is not specified in the build settings file '$c_notice$settings_file$c_error'.$c_reset" + echo -e "${c_error}ERROR: The required setting '${c_notice}version_micro$c_error' is not specified in the build settings file '$c_notice$settings_file$c_error'.$c_reset" fi bootstrap_cleanup @@ -266,7 +273,7 @@ bootstrap_main() { if [[ $path_data == "" || ! -d $path_data ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: the data directory $c_notice$path_data$c_error is not a valid directory.$c_reset" + echo -e "${c_error}ERROR: The data directory $c_notice$path_data$c_error is not a valid directory.$c_reset" fi bootstrap_cleanup @@ -275,7 +282,7 @@ bootstrap_main() { if [[ $path_sources == "" || ! -d $path_sources ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: the sources directory $c_notice$path_sources$c_error is not a valid directory.$c_reset" + echo -e "${c_error}ERROR: The sources directory $c_notice$path_sources$c_error is not a valid directory.$c_reset" fi bootstrap_cleanup @@ -284,7 +291,7 @@ bootstrap_main() { if [[ $path_work != "" && ! -d $path_work ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: the work directory $c_notice$path_work$c_error is not a valid directory.$c_reset" + echo -e "${c_error}ERROR: The work directory $c_notice$path_work$c_error is not a valid directory.$c_reset" fi bootstrap_cleanup @@ -293,7 +300,7 @@ bootstrap_main() { if [[ $defines_override != "" && $(echo "$defines_override" | grep -s -o "[^_[:alnum:][:space:]]") != "" ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: the defines override $c_notice$defines_override$c_error includes invalid characters, only alphanumeric, whitespace, and underscore are allowed.$c_reset" + echo -e "${c_error}ERROR: The defines override $c_notice$defines_override$c_error includes invalid characters, only alphanumeric, whitespace, and underscore are allowed.$c_reset" fi bootstrap_cleanup @@ -427,9 +434,7 @@ bootstrap_help() { } bootstrap_id() { - local name=$1 - - case $name in + case $1 in "build_compiler") echo -n 0;; "build_indexer") echo -n 1;; "build_indexer_arguments") echo -n 2;; @@ -437,117 +442,197 @@ bootstrap_id() { "build_libraries") echo -n 4;; "build_libraries_shared") echo -n 5;; "build_libraries_static") echo -n 6;; - "build_script") echo -n 7;; - "build_shared") echo -n 8;; - "build_sources_headers") echo -n 9;; - "build_sources_headers_shared") echo -n 10;; - "build_sources_headers_static") echo -n 11;; - "build_sources_library") echo -n 12;; - "build_sources_library_shared") echo -n 13;; - "build_sources_library_static") echo -n 14;; - "build_sources_program") echo -n 15;; - "build_sources_program_shared") echo -n 16;; - "build_sources_program_static") echo -n 17;; - "build_sources_script") echo -n 18;; - "build_sources_setting") echo -n 19;; - "build_static") echo -n 20;; - "defines") echo -n 21;; - "defines_library") echo -n 22;; - "defines_library_shared") echo -n 23;; - "defines_library_static") echo -n 24;; - "defines_program") echo -n 25;; - "defines_program_shared") echo -n 26;; - "defines_program_static") echo -n 27;; - "defines_shared") echo -n 28;; - "defines_static") echo -n 29;; - "environment") echo -n 30;; - "flags") echo -n 31;; - "flags_library") echo -n 32;; - "flags_library_shared") echo -n 33;; - "flags_library_static") echo -n 34;; - "flags_program") echo -n 35;; - "flags_program_shared") echo -n 36;; - "flags_program_static") echo -n 37;; - "flags_shared") echo -n 38;; - "flags_static") echo -n 39;; - "modes") echo -n 40;; - "modes_default") echo -n 41;; - "path_headers") echo -n 42;; - "path_headers_preserve") echo -n 43;; - "path_language") echo -n 44;; - "path_library_script") echo -n 45;; - "path_library_shared") echo -n 46;; - "path_library_static") echo -n 47;; - "path_program_script") echo -n 48;; - "path_program_shared") echo -n 49;; - "path_program_static") echo -n 50;; - "path_sources") echo -n 51;; - "path_standard") echo -n 52;; - "process_post") echo -n 53;; - "process_pre") echo -n 54;; - "build_name") echo -n 55;; - "search_exclusive") echo -n 56;; - "search_shared") echo -n 57;; - "search_static") echo -n 58;; - "version_file") echo -n 59;; - "version_major") echo -n 60;; - "version_major_prefix") echo -n 61;; - "version_micro") echo -n 62;; - "version_micro_prefix") echo -n 63;; - "version_minor") echo -n 64;; - "version_minor_prefix") echo -n 65;; - "version_nano") echo -n 66;; - "version_nano_prefix") echo -n 67;; - "version_target") echo -n 68;; - - "build_libraries-$mode") echo -n 69;; - "build_libraries_shared-$mode") echo -n 70;; - "build_libraries_static-$mode") echo -n 71;; - "build_sources_headers-$mode") echo -n 72;; - "build_sources_headers_shared-$mode") echo -n 73;; - "build_sources_headers_static-$mode") echo -n 74;; - "build_sources_library-$mode") echo -n 75;; - "build_sources_library_shared-$mode") echo -n 76;; - "build_sources_library_static-$mode") echo -n 77;; - "build_sources_program-$mode") echo -n 78;; - "build_sources_program_shared-$mode") echo -n 79;; - "build_sources_program_static-$mode") echo -n 80;; - "build_sources_script-$mode") echo -n 81;; - "build_sources_setting-$mode") echo -n 82;; - "defines-$mode") echo -n 83;; - "defines_library-$mode") echo -n 84;; - "defines_library_shared-$mode") echo -n 85;; - "defines_library_static-$mode") echo -n 86;; - "defines_program-$mode") echo -n 87;; - "defines_program_shared-$mode") echo -n 88;; - "defines_program_static-$mode") echo -n 89;; - "defines_shared-$mode") echo -n 90;; - "defines_static-$mode") echo -n 91;; - "environment-$mode") echo -n 92;; - "flags-$mode") echo -n 93;; - "flags_library-$mode") echo -n 94;; - "flags_library_shared-$mode") echo -n 95;; - "flags_library_static-$mode") echo -n 96;; - "flags_program-$mode") echo -n 97;; - "flags_program_shared-$mode") echo -n 98;; - "flags_program_static-$mode") echo -n 99;; - "flags_shared-$mode") echo -n 100;; - "flags_static-$mode") echo -n 101;; - - "has-version_major_prefix") echo -n 102;; - "has-version_micro_prefix") echo -n 103;; - "has-version_minor_prefix") echo -n 104;; - "has-version_nano_prefix") echo -n 105;; - - "has-version_major_prefix-$mode") echo -n 106;; - "has-version_micro_prefix-$mode") echo -n 107;; - "has-version_minor_prefix-$mode") echo -n 108;; - "has-version_nano_prefix-$mode") echo -n 109;; + "build_name") echo -n 7;; + "build_objects_library") echo -n 8;; + "build_objects_library_shared") echo -n 9;; + "build_objects_library_static") echo -n 10;; + "build_objects_program") echo -n 11;; + "build_objects_program_shared") echo -n 12;; + "build_objects_program_static") echo -n 13;; + "build_script") echo -n 14;; + "build_shared") echo -n 15;; + "build_sources_headers") echo -n 16;; + "build_sources_headers_shared") echo -n 17;; + "build_sources_headers_static") echo -n 18;; + "build_sources_library") echo -n 19;; + "build_sources_library_shared") echo -n 20;; + "build_sources_library_static") echo -n 21;; + "build_sources_object") echo -n 22;; + "build_sources_object_shared") echo -n 23;; + "build_sources_object_static") echo -n 24;; + "build_sources_program") echo -n 25;; + "build_sources_program_shared") echo -n 26;; + "build_sources_program_static") echo -n 27;; + "build_sources_script") echo -n 28;; + "build_sources_setting") echo -n 29;; + "build_static") echo -n 30;; + "defines") echo -n 31;; + "defines_library") echo -n 32;; + "defines_library_shared") echo -n 33;; + "defines_library_static") echo -n 34;; + "defines_object") echo -n 35;; + "defines_object_shared") echo -n 36;; + "defines_object_static") echo -n 37;; + "defines_program") echo -n 38;; + "defines_program_shared") echo -n 39;; + "defines_program_static") echo -n 40;; + "defines_shared") echo -n 41;; + "defines_static") echo -n 42;; + "environment") echo -n 43;; + "flags") echo -n 44;; + "flags_library") echo -n 45;; + "flags_library_shared") echo -n 46;; + "flags_library_static") echo -n 47;; + "flags_object") echo -n 48;; + "flags_object_shared") echo -n 49;; + "flags_object_static") echo -n 50;; + "flags_program") echo -n 51;; + "flags_program_shared") echo -n 52;; + "flags_program_static") echo -n 53;; + "flags_shared") echo -n 54;; + "flags_static") echo -n 55;; + "modes") echo -n 56;; + "modes_default") echo -n 57;; + "path_headers") echo -n 58;; + "path_headers_preserve") echo -n 59;; + "path_language") echo -n 60;; + "path_library_script") echo -n 61;; + "path_library_shared") echo -n 62;; + "path_library_static") echo -n 63;; + "path_object_script") echo -n 64;; + "path_object_shared") echo -n 65;; + "path_object_static") echo -n 66;; + "path_program_script") echo -n 67;; + "path_program_shared") echo -n 68;; + "path_program_static") echo -n 69;; + "path_sources") echo -n 70;; + "path_sources_object") echo -n 71;; + "path_standard") echo -n 72;; + "process_post") echo -n 73;; + "process_pre") echo -n 74;; + "search_exclusive") echo -n 75;; + "search_shared") echo -n 76;; + "search_static") echo -n 77;; + "version_file") echo -n 78;; + "version_major") echo -n 79;; + "version_major_prefix") echo -n 80;; + "version_micro") echo -n 81;; + "version_micro_prefix") echo -n 82;; + "version_minor") echo -n 83;; + "version_minor_prefix") echo -n 84;; + "version_nano") echo -n 85;; + "version_nano_prefix") echo -n 86;; + "version_target") echo -n 87;; + + "build_compiler-$mode") echo -n 88;; + "build_indexer-$mode") echo -n 89;; + "build_indexer_arguments-$mode") echo -n 90;; + "build_language-$mode") echo -n 91;; + "build_libraries-$mode") echo -n 92;; + "build_libraries_shared-$mode") echo -n 93;; + "build_libraries_static-$mode") echo -n 94;; + "build_name-$mode") echo -n 95;; + "build_objects_library-$mode") echo -n 96;; + "build_objects_library_shared-$mode") echo -n 97;; + "build_objects_library_static-$mode") echo -n 98;; + "build_objects_program-$mode") echo -n 99;; + "build_objects_program_shared-$mode") echo -n 100;; + "build_objects_program_static-$mode") echo -n 101;; + "build_script-$mode") echo -n 102;; + "build_shared-$mode") echo -n 103;; + "build_sources_headers-$mode") echo -n 104;; + "build_sources_headers_shared-$mode") echo -n 105;; + "build_sources_headers_static-$mode") echo -n 106;; + "build_sources_library-$mode") echo -n 107;; + "build_sources_library_shared-$mode") echo -n 108;; + "build_sources_library_static-$mode") echo -n 109;; + "build_sources_object-$mode") echo -n 110;; + "build_sources_object_shared-$mode") echo -n 111;; + "build_sources_object_static-$mode") echo -n 112;; + "build_sources_program-$mode") echo -n 113;; + "build_sources_program_shared-$mode") echo -n 114;; + "build_sources_program_static-$mode") echo -n 115;; + "build_sources_script-$mode") echo -n 116;; + "build_sources_setting-$mode") echo -n 117;; + "build_static-$mode") echo -n 118;; + "defines-$mode") echo -n 119;; + "defines_library-$mode") echo -n 120;; + "defines_library_shared-$mode") echo -n 121;; + "defines_library_static-$mode") echo -n 122;; + "defines_object-$mode") echo -n 123;; + "defines_object_shared-$mode") echo -n 124;; + "defines_object_static-$mode") echo -n 125;; + "defines_program-$mode") echo -n 126;; + "defines_program_shared-$mode") echo -n 127;; + "defines_program_static-$mode") echo -n 128;; + "defines_shared-$mode") echo -n 129;; + "defines_static-$mode") echo -n 130;; + "environment-$mode") echo -n 131;; + "flags-$mode") echo -n 132;; + "flags_library-$mode") echo -n 133;; + "flags_library_shared-$mode") echo -n 134;; + "flags_library_static-$mode") echo -n 135;; + "flags_object-$mode") echo -n 136;; + "flags_object_shared-$mode") echo -n 137;; + "flags_object_static-$mode") echo -n 138;; + "flags_program-$mode") echo -n 139;; + "flags_program_shared-$mode") echo -n 140;; + "flags_program_static-$mode") echo -n 141;; + "flags_shared-$mode") echo -n 142;; + "flags_static-$mode") echo -n 143;; + "path_headers-$mode") echo -n 144;; + "path_headers_preserve-$mode") echo -n 145;; + "path_language-$mode") echo -n 146;; + "path_library_script-$mode") echo -n 147;; + "path_library_shared-$mode") echo -n 148;; + "path_library_static-$mode") echo -n 149;; + "path_object_script-$mode") echo -n 150;; + "path_object_shared-$mode") echo -n 151;; + "path_object_static-$mode") echo -n 152;; + "path_program_script-$mode") echo -n 153;; + "path_program_shared-$mode") echo -n 154;; + "path_program_static-$mode") echo -n 155;; + "path_sources-$mode") echo -n 156;; + "path_sources_object-$mode") echo -n 157;; + "path_standard-$mode") echo -n 158;; + "process_post-$mode") echo -n 159;; + "process_pre-$mode") echo -n 160;; + "search_exclusive-$mode") echo -n 161;; + "search_shared-$mode") echo -n 162;; + "search_static-$mode") echo -n 163;; + "version_file-$mode") echo -n 164;; + "version_major-$mode") echo -n 165;; + "version_major_prefix-$mode") echo -n 166;; + "version_micro-$mode") echo -n 167;; + "version_micro_prefix-$mode") echo -n 168;; + "version_minor-$mode") echo -n 169;; + "version_minor_prefix-$mode") echo -n 170;; + "version_nano-$mode") echo -n 171;; + "version_nano_prefix-$mode") echo -n 172;; + "version_target-$mode") echo -n 173;; + + "has-path_library_script") echo -n 175;; + "has-path_library_shared") echo -n 176;; + "has-path_library_static") echo -n 177;; + "has-path_object_script") echo -n 178;; + "has-path_object_shared") echo -n 179;; + "has-path_object_static") echo -n 180;; + "has-path_program_script") echo -n 181;; + "has-path_program_shared") echo -n 182;; + "has-path_program_static") echo -n 183;; + "has-path_sources") echo -n 184;; + "has-path_sources_object") echo -n 185;; + "has-path_standard") echo -n 186;; + "has-search_shared") echo -n 187;; + "has-version_major_prefix") echo -n 188;; + "has-version_micro_prefix") echo -n 189;; + "has-version_minor_prefix") echo -n 190;; + "has-version_nano_prefix") echo -n 191;; esac } bootstrap_load_settings() { - local failure= + local -i failure=0 local i= local key= @@ -556,36 +641,77 @@ bootstrap_load_settings() { echo -e "${c_error}ERROR: no build settings directory '$c_notice${path_data}build/$c_error' could not be found or is not a valid directory.$c_reset" fi - failure=1 + let failure=1 elif [[ ! -f $settings_file ]] ; then if [[ $verbosity != "quiet" ]] ; then echo -e "${c_error}ERROR: no settings file $c_notice$settings_file$c_error could not be found or is not a valid file.$c_reset" fi - failure=1 + let failure=1 fi - if [[ $failure != "" ]] ; then + if [[ $failure -eq 1 ]] ; then return 1 fi - for i in build_compiler build_indexer build_indexer_arguments build_language build_libraries build_libraries_shared build_libraries_static build_script build_shared build_sources_headers build_sources_headers_shared build_sources_headers_static build_sources_library build_sources_library_shared build_sources_library_static build_sources_program build_sources_program_shared build_sources_program_static build_sources_script build_sources_setting build_static defines defines_library defines_library_shared defines_library_static defines_program defines_shared defines_program_shared defines_program_static defines_static environment flags flags_library flags_program flags_shared flags_static modes modes_default path_headers path_headers_preserve path_language path_library_script path_library_shared path_library_static path_program_script path_program_shared path_program_static path_sources path_standard process_post process_pre build_name search_exclusive search_shared search_static version_major version_major_prefix version_micro version_micro_prefix version_minor version_minor_prefix version_nano version_nano_prefix version_target ; do - variables[$(bootstrap_id $i)]=$(grep -s -o "^[[:space:]]*$i[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*$i\>||" -e 's|^[[:space:]]*||') + for i in build_compiler build_indexer build_indexer_arguments build_language build_libraries build_libraries_shared build_libraries_static build_name build_objects_library build_objects_library_shared build_objects_library_static build_objects_program build_objects_program_shared build_objects_program_static build_script build_shared build_sources_headers build_sources_headers_shared build_sources_headers_static build_sources_library build_sources_library_shared build_sources_library_static build_sources_object build_sources_object_shared build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static build_sources_script build_sources_setting build_static defines defines_library defines_library_shared defines_library_static defines_object defines_object_shared defines_object_static defines_program defines_program_shared defines_program_static defines_shared defines_static ; do + key=$(bootstrap_id $i) + + if [[ $key == "" ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_warning}WARNING: Failed to find index for '$c_notice$i$c_error' when calling ${c_notice}bootstrap_id()$c_error.$c_reset" + fi + else + variables[$key]=$(grep -s -o "^[[:space:]]*$i[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*$i\>||" -e 's|^[[:space:]]*||') + fi + done + + for i in environment flags flags_library flags_library_shared flags_library_static flags_object flags_object_shared flags_object_static flags_program flags_program_shared flags_program_static flags_shared flags_static modes modes_default path_headers path_headers_preserve path_language path_library_script path_library_shared path_library_static path_object_script path_object_shared path_object_static path_program_script path_program_shared path_program_static path_sources path_sources_object path_standard process_post process_pre search_exclusive search_shared search_static version_file version_major version_major_prefix version_micro version_micro_prefix version_minor version_minor_prefix version_nano version_nano_prefix version_target ; do + key=$(bootstrap_id $i) + + if [[ $key == "" ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_warning}WARNING: Failed to find index for '$c_notice$i$c_error' when calling ${c_notice}bootstrap_id()$c_error.$c_reset" + fi + else + variables[$key]=$(grep -s -o "^[[:space:]]*$i[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*$i\>||" -e 's|^[[:space:]]*||') + fi done } bootstrap_load_settings_mode() { local i= + local key= + + for i in build_compiler-$mode build_indexer-$mode build_indexer_arguments-$mode build_language-$mode build_libraries-$mode build_libraries_shared-$mode build_libraries_static-$mode build_name-$mode build_objects_library-$mode build_objects_library_shared-$mode build_objects_library_static-$mode build_objects_program-$mode build_objects_program_shared-$mode build_objects_program_static-$mode build_script-$mode build_shared-$mode build_sources_headers-$mode build_sources_headers_shared-$mode build_sources_headers_static-$mode build_sources_library-$mode build_sources_library_shared-$mode build_sources_library_static-$mode build_sources_object-$mode build_sources_object_shared-$mode build_sources_object_static-$mode build_sources_program-$mode build_sources_program_shared-$mode build_sources_program_static-$mode build_sources_script-$mode build_sources_setting-$mode build_static-$mode defines-$mode defines_library-$mode defines_library_shared-$mode defines_library_static-$mode defines_object-$mode defines_object_shared-$mode defines_object_static-$mode defines_program-$mode defines_program_shared-$mode defines_program_static-$mode defines_shared-$mode defines_static-$mode ; do + key=$(bootstrap_id $i) + + if [[ $key == "" ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_warning}WARNING: Failed to find index for '$c_notice$i$c_error' when calling ${c_notice}bootstrap_id()$c_error.$c_reset" + fi + else + variables[$key]=$(grep -s -o "^[[:space:]]*$i[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*$i\>||" -e 's|^[[:space:]]*||') + fi + done + + for i in environment-$mode flags-$mode flags_library-$mode flags_library_shared-$mode flags_library_static-$mode flags_object-$mode flags_object_shared-$mode flags_object_static-$mode flags_program-$mode flags_program_shared-$mode flags_program_static-$mode flags_shared-$mode flags_static-$mode path_headers-$mode path_headers_preserve-$mode path_language-$mode path_library_script-$mode path_library_shared-$mode path_library_static-$mode path_object_script-$mode path_object_shared-$mode path_object_static-$mode path_program_script-$mode path_program_shared-$mode path_program_static-$mode path_sources-$mode path_sources_object-$mode path_standard-$mode process_post-$mode process_pre-$mode search_exclusive-$mode search_shared-$mode search_static-$mode version_file-$mode version_major-$mode version_major_prefix-$mode version_micro-$mode version_micro_prefix-$mode version_minor-$mode version_minor_prefix-$mode version_nano-$mode version_nano_prefix-$mode version_target-$mode ; do + key=$(bootstrap_id $i) - for i in build_libraries-$mode build_libraries_shared-$mode build_libraries_static-$mode build_sources_headers-$mode build_sources_headers_shared-$mode build_sources_headers_static-$mode build_sources_library-$mode build_sources_library_shared-$mode build_sources_library_static-$mode build_sources_program-$mode build_sources_program_shared-$mode build_sources_program_static-$mode build_sources_script-$mode build_sources_setting-$mode defines-$mode defines_library-$mode defines_library_shared-$mode defines_library_static-$mode defines_program-$mode defines_program_shared-$mode defines_program_static-$mode defines_shared-$mode defines_static-$mode environment-$mode flags-$mode flags_library-$mode flags_library_shared-$mode flags_library_static-$mode flags_program-$mode flags_program_shared-$mode flags_program_static-$mode flags_shared-$mode flags_static-$mode ; do - variables[$(bootstrap_id $i)]=$(grep -s -o "^[[:space:]]*$i[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*$i\>||" -e 's|^[[:space:]]*||') + if [[ $key == "" ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_warning}WARNING: Failed to find index for '$c_notice$i$c_error' when calling ${c_notice}bootstrap_id()$c_error.$c_reset" + fi + else + variables[$key]=$(grep -s -o "^[[:space:]]*$i[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*$i\>||" -e 's|^[[:space:]]*||') + fi done } bootstrap_load_settings_has() { local i= - for i in version_major_prefix version_minor_prefix version_micro_prefix version_nano_prefix ; do + for i in build_compiler build_indexer build_shared-$mode path_library_script path_library_shared path_library_static path_object_script path_object_shared path_object_static path_program_script path_program_shared path_program_static path_sources path_sources_object path_standard search_shared version_major_prefix version_minor_prefix version_micro_prefix version_nano_prefix ; do if [[ $(grep -s -o "^[[:space:]]*$i\>" $settings_file | sed -e "s|^[[:space:]]*||") ]] ; then variables[$(bootstrap_id has-$i)]="yes" else @@ -593,7 +719,7 @@ bootstrap_load_settings_has() { fi done - for i in version_major_prefix-$mode version_minor_prefix-$mode version_micro_prefix-$mode version_nano_prefix-$mode ; do + for i in build_compiler-$mode build_indexer-$mode build_shared-$mode path_library_script-$mode path_library_shared-$mode path_library_static-$mode path_object_script-$mode path_object_shared-$mode path_object_static-$mode path_program_script-$mode path_program_shared-$mode path_program_static-$mode path_sources-$mode path_sources_object-$mode path_standard-$mode search_shared-$mode version_major_prefix-$mode version_minor_prefix-$mode version_micro_prefix-$mode version_nano_prefix-$mode ; do if [[ $(grep -s -o "^[[:space:]]*$i-$mode\>" $settings_file | sed -e "s|^[[:space:]]*||") ]] ; then variables[$(bootstrap_id has-$i)]="yes" else @@ -603,19 +729,31 @@ bootstrap_load_settings_has() { } bootstrap_prepare_build() { - local failure= + local -i failure=0 local alt=$1 local i= - mkdir $verbose -p ${path_build}{documents,includes,libraries/{script,shared,static},objects,programs/{script,shared,static},settings,stage} || failure=1 + mkdir $verbose -p ${path_build}{documents,includes,libraries/{script,shared,static},objects/{script,shared,static},programs/{script,shared,static},settings,stage} || failure=1 - if [[ $failure == "" ]] ; then - for i in ${variables[$(bootstrap_id path_headers)]} ; do - mkdir $verbose -p ${path_build}includes/$i || failure=1 - done + if [[ $failure -eq 1 ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_warning}WARNING: Failed to create build directories in '$c_notice$path_build$c_errror'.$c_reset" + fi + + return $failure + fi + + if [[ ${variables[$(bootstrap_id path_headers-$mode)]} != "" ]] ; then + mkdir $verbose -p ${path_build}includes/${variables[$(bootstrap_id path_headers-$mode)]} || failure=1 + elif [[ ${variables[$(bootstrap_id path_headers)]} != "" ]] ; then + mkdir $verbose -p ${path_build}includes/${variables[$(bootstrap_id path_headers)]} || failure=1 fi - if [[ $failure != "" ]] ; then + if [[ $failure -eq 1 ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_warning}WARNING: Failed to create $c_noticepath_heades$c_error build directories in '$c_notice$path_build$c_errror'.$c_reset" + fi + return $failure fi @@ -623,8 +761,47 @@ bootstrap_prepare_build() { } bootstrap_operation_build() { - local failure= + local -i failure=0 + local i= + local n= + local version_file= + local version_target= + local alt=$1 + local directory= + local build_name=${variables[$(bootstrap_id build_name)]} + local compiler=${variables[$(bootstrap_id build_compiler)]} + local defines=${variables[$(bootstrap_id defines)]} + local defines_library=${variables[$(bootstrap_id defines_library)]} + local defines_library_shared=${variables[$(bootstrap_id defines_library_shared)]} + local defines_library_static=${variables[$(bootstrap_id defines_library_static)]} + local defines_object=${variables[$(bootstrap_id defines_object)]} + local defines_object_shared=${variables[$(bootstrap_id defines_object_shared)]} + local defines_object_static=${variables[$(bootstrap_id defines_object_static)]} + local defines_program=${variables[$(bootstrap_id defines_program)]} + local defines_program_shared=${variables[$(bootstrap_id defines_program_shared)]} + local defines_program_static=${variables[$(bootstrap_id defines_program_static)]} + local defines_shared=${variables[$(bootstrap_id defines_shared)]} + local defines_static=${variables[$(bootstrap_id defines_static)]} + local file=${variables[$(bootstrap_id version_file)]} + local flags=${variables[$(bootstrap_id flags)]} + local flags_library=${variables[$(bootstrap_id flags_library)]} + local flags_library_shared=${variables[$(bootstrap_id flags_library_shared)]} + local flags_library_static=${variables[$(bootstrap_id flags_library_static)]} + local flags_object=${variables[$(bootstrap_id flags_object)]} + local flags_object_shared=${variables[$(bootstrap_id flags_object_shared)]} + local flags_object_static=${variables[$(bootstrap_id flags_object_static)]} + local flags_program=${variables[$(bootstrap_id flags_program)]} + local flags_program_shared=${variables[$(bootstrap_id flags_program_shared)]} + local flags_program_static=${variables[$(bootstrap_id flags_program_static)]} + local flags_shared=${variables[$(bootstrap_id flags_shared)]} + local flags_static=${variables[$(bootstrap_id flags_static)]} + local indexer=${variables[$(bootstrap_id build_indexer)]} + local indexer_arguments=${variables[$(bootstrap_id build_indexer_arguments)]} + local libraries=${variables[$(bootstrap_id build_libraries)]} + local libraries_shared=${variables[$(bootstrap_id build_libraries_shared)]} + local libraries_static=${variables[$(bootstrap_id build_libraries_static)]} + local links= local major=${variables[$(bootstrap_id version_major)]} local major_prefix=${variables[$(bootstrap_id version_major_prefix)]} local minor=${variables[$(bootstrap_id version_minor)]} @@ -633,221 +810,575 @@ bootstrap_operation_build() { local micro_prefix=${variables[$(bootstrap_id version_micro_prefix)]} local nano=${variables[$(bootstrap_id version_nano)]} local nano_prefix=${variables[$(bootstrap_id version_nano_prefix)]} - local file=${variables[$(bootstrap_id version_file)]} - local target=${variables[$(bootstrap_id version_target)]} - local compiler=${variables[$(bootstrap_id build_compiler)]} - local indexer=${variables[$(bootstrap_id build_indexer)]} - local indexer_arguments=${variables[$(bootstrap_id build_indexer_arguments)]} - local arguments_include="-I${path_build}includes" - local arguments_shared="-L${path_build}libraries/shared" - local arguments_static="-L${path_build}libraries/static" + local objects_library=${variables[$(bootstrap_id build_objects_library)]} + local objects_library_shared=${variables[$(bootstrap_id build_objects_library_shared)]} + local objects_library_static=${variables[$(bootstrap_id build_objects_library_static)]} + local objects_program=${variables[$(bootstrap_id build_objects_program)]} + local objects_program_shared=${variables[$(bootstrap_id build_objects_program_shared)]} + local objects_program_static=${variables[$(bootstrap_id build_objects_program_static)]} + local path_headers=${variables[$(bootstrap_id path_headers)]} + local path_headers_preserve=${variables[$(bootstrap_id path_headers_preserve)]} + local path_library_script=${variables[$(bootstrap_id path_library_script)]} + local path_library_shared=${variables[$(bootstrap_id path_library_shared)]} + local path_library_static=${variables[$(bootstrap_id path_library_static)]} + local path_object_script=${variables[$(bootstrap_id path_object_script)]} + local path_object_shared=${variables[$(bootstrap_id path_object_shared)]} + local path_object_static=${variables[$(bootstrap_id path_object_static)]} + local path_program_script=${variables[$(bootstrap_id path_program_script)]} + local path_program_shared=${variables[$(bootstrap_id path_program_shared)]} + local path_program_static=${variables[$(bootstrap_id path_program_static)]} + local path_standard=${variables[$(bootstrap_id path_standard)]} local search_exclusive=${variables[$(bootstrap_id search_exclusive)]} local search_shared=${variables[$(bootstrap_id search_shared)]} local search_static=${variables[$(bootstrap_id search_static)]} local shared=${variables[$(bootstrap_id build_shared)]} - local static=${variables[$(bootstrap_id build_static)]} local sources_headers=${variables[$(bootstrap_id build_sources_headers)]} local sources_library=${variables[$(bootstrap_id build_sources_library)]} local sources_library_shared=${variables[$(bootstrap_id build_sources_library_shared)]} local sources_library_static=${variables[$(bootstrap_id build_sources_library_static)]} + local sources_object=${variables[$(bootstrap_id build_sources_object)]} + local sources_object_shared=${variables[$(bootstrap_id build_sources_object_shared)]} + local sources_object_static=${variables[$(bootstrap_id build_sources_object_static)]} local sources_program=${variables[$(bootstrap_id build_sources_program)]} local sources_program_shared=${variables[$(bootstrap_id build_sources_program_shared)]} local sources_program_static=${variables[$(bootstrap_id build_sources_program_static)]} local sources_script=${variables[$(bootstrap_id build_sources_script)]} local sources_setting=${variables[$(bootstrap_id build_sources_setting)]} local sources= - local libraries=${variables[$(bootstrap_id build_libraries)]} - local libraries_shared=${variables[$(bootstrap_id build_libraries_shared)]} - local libraries_static=${variables[$(bootstrap_id build_libraries_static)]} - local links= - local defines=${variables[$(bootstrap_id defines)]} - local defines_library=${variables[$(bootstrap_id defines_library)]} - local defines_library_shared=${variables[$(bootstrap_id defines_library_shared)]} - local defines_library_static=${variables[$(bootstrap_id defines_library_static)]} - local defines_program=${variables[$(bootstrap_id defines_program)]} - local defines_program_shared=${variables[$(bootstrap_id defines_program_shared)]} - local defines_program_static=${variables[$(bootstrap_id defines_program_static)]} - local defines_shared=${variables[$(bootstrap_id defines_shared)]} - local defines_static=${variables[$(bootstrap_id defines_static)]} - local flags=${variables[$(bootstrap_id flags)]} - local flags_library=${variables[$(bootstrap_id flags_library)]} - local flags_library_shared=${variables[$(bootstrap_id flags_library_shared)]} - local flags_library_static=${variables[$(bootstrap_id flags_library_static)]} - local flags_program=${variables[$(bootstrap_id flags_program)]} - local flags_program_shared=${variables[$(bootstrap_id flags_program_shared)]} - local flags_program_static=${variables[$(bootstrap_id flags_program_static)]} - local flags_shared=${variables[$(bootstrap_id flags_shared)]} - local flags_static=${variables[$(bootstrap_id flags_static)]} - local i= - local n= - local version_file= - local version_target= - local alt=$1 - local directory= - local path_headers=${variables[$(bootstrap_id path_headers)]} - local path_headers_preserve=${variables[$(bootstrap_id path_headers_preserve)]} + local static=${variables[$(bootstrap_id build_static)]} + local target=${variables[$(bootstrap_id version_target)]} - # provide defaults for version prefixes if they are not specified (except for major). - if [[ ${variables[$(bootstrap_id has-version_minor_prefix)]} != "yes" && $minor != "" ]] ; then - minor_prefix="." - fi + bootstrap_operation_build_prepare_defaults - if [[ ${variables[$(bootstrap_id has-version_micro_prefix)]} != "yes" && $micro != "" ]] ; then - micro_prefix="." - fi + bootstrap_operation_build_prepare_versions - if [[ ${variables[$(bootstrap_id has-version_nano_prefix)]} != "yes" && $nano != "" ]] ; then - nano_prefix="." - fi + bootstrap_operation_build_prepare_shared_static - if [[ $file == "" ]] ; then - file="micro" - fi + bootstrap_operation_build_prepare_paths - if [[ $target == "" ]] ; then - target="major" - fi + bootstrap_operation_build_prepare_flags - if [[ $file == "major" ]] ; then - version_file="$major_prefix$major" - elif [[ $file == "minor" ]] ; then - version_file="$major_prefix$major$minor_prefix$minor" - elif [[ $file == "micro" ]] ; then - version_file="$major_prefix$major$minor_prefix$minor$micro_prefix$micro" - elif [[ $file == "nano" ]] ; then - version_file="$major_prefix$major$minor_prefix$minor$micro_prefix$micro$nano_prefix$nano" - fi + bootstrap_operation_build_prepare_defines - if [[ $target == "major" ]] ; then - version_target="$major_prefix$major" - elif [[ $target == "minor" ]] ; then - version_target="$major_prefix$major$minor_prefix$minor" - elif [[ $target == "micro" ]] ; then - version_target="$major_prefix$major$minor_prefix$minor$micro_prefix$micro" - elif [[ $target == "nano" ]] ; then - version_target="$major_prefix$major$minor_prefix$minor$micro_prefix$micro$nano_prefix$nano" - fi + bootstrap_operation_build_prepare_libraries - if [[ $sources_library == "" ]] ; then - sources_library=${variables[$(bootstrap_id build_sources_library-$mode)]} - else - sources_library="$sources_library ${variables[$(bootstrap_id build_sources_library-$mode)]}" - fi + bootstrap_operation_build_prepare_objects - if [[ $sources_library_shared == "" ]] ; then - sources_library_shared=${variables[$(bootstrap_id build_sources_library_shared-$mode)]} - else - sources_library_shared="$build_sources_library_shared ${variables[$(bootstrap_id build_sources_library_shared-$mode)]}" - fi + bootstrap_operation_build_prepare_programs - if [[ $sources_library_static == "" ]] ; then - sources_library_static=${variables[$(bootstrap_id build_sources_library_static-$mode)]} - else - sources_library_static="$build_sources_library_static ${variables[$(bootstrap_id build_sources_library_static-$mode)]}" - fi + bootstrap_operation_build_prepare_settings - if [[ $sources_program == "" ]] ; then - sources_program=${variables[$(bootstrap_id build_sources_program-$mode)]} - else - sources_program="$sources_program ${variables[$(bootstrap_id build_sources_program-$mode)]}" - fi + bootstrap_operation_build_prepare_headers - if [[ $sources_program_shared == "" ]] ; then - sources_program_shared=${variables[$(bootstrap_id build_sources_program_shared-$mode)]} - else - sources_program_shared="$sources_program_shared ${variables[$(bootstrap_id build_sources_program_shared-$mode)]}" - fi + if [[ $shared == "yes" && -f ${project_built_shared}.built || $static == "yes" && -f ${project_built_static}.built ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_warning}WARNING: This project has already been built.$c_reset" + fi - if [[ $sources_program_static == "" ]] ; then - sources_program_static=${variables[$(bootstrap_id build_sources_program_static-$mode)]} - else - sources_program_static="$sources_program_static ${variables[$(bootstrap_id build_sources_program_static-$mode)]}" + return 0 fi - if [[ $sources_headers == "" ]] ; then - sources_headers=${variables[$(bootstrap_id build_sources_headers-$mode)]} - else - sources_headers="$sources_headers ${variables[$(bootstrap_id build_sources_headers-$mode)]}" - fi + local arguments_include="-I${path_build}includes/" + local arguments_shared="-L${path_build}libraries/$path_library_shared" + local arguments_static="-L${path_build}libraries/$path_library_static" - if [[ $sources_setting == "" ]] ; then - sources_setting=${variables[$(bootstrap_id build_sources_setting-$mode)]} - else - sources_setting="$sources_setting ${variables[$(bootstrap_id build_sources_setting-$mode)]}" + if [[ $path_work != "" ]] ; then + arguments_include="$arguments_include -I${path_work}includes/" + arguments_shared="$arguments_shared -L${path_work}libraries/$path_library_shared" + arguments_static="$arguments_static -L${path_work}libraries/$path_library_static" fi - if [[ $libraries == "" ]] ; then - libraries=${variables[$(bootstrap_id build_libraries-$mode)]} - else - libraries="${variables[$(bootstrap_id build_libraries-$mode)]} $libraries" - fi + bootstrap_operation_build_validate_paths - if [[ $libraries_shared == "" ]] ; then - libraries_shared=${variables[$(bootstrap_id build_libraries_shared-$mode)]} - else - libraries_shared="${variables[$(bootstrap_id build_libraries_shared-$mode)]} $libraries_shared" - fi + bootstrap_operation_build_validate_shared_static - if [[ $libraries_static == "" ]] ; then - libraries_static=${variables[$(bootstrap_id build_libraries_static-$mode)]} - else - libraries_static="${variables[$(bootstrap_id build_libraries_static-$mode)]} $libraries_static" - fi + bootstrap_operation_build_validate_sources - if [[ $defines == "" ]] ; then - defines=${variables[$(bootstrap_id defines-$mode)]} - else - defines="$defines ${variables[$(bootstrap_id defines-$mode)]}" - fi + bootstrap_operation_build_validate_search - if [[ $defines_library == "" ]] ; then - defines_library=${variables[$(bootstrap_id defines_library-$mode)]} - else - defines_library="$defines_library ${variables[$(bootstrap_id defines_library-$mode)]}" - fi + bootstrap_operation_build_validate_build - if [[ $defines_library_shared == "" ]] ; then - defines_library_shared=${variables[$(bootstrap_id defines_library_shared-$mode)]} - else - defines_library_shared="$defines_library_shared ${variables[$(bootstrap_id defines_library_shared-$mode)]}" + if [[ $failure -eq 1 ]] ; then + return 1 fi - if [[ $defines_library_static == "" ]] ; then - defines_library_static=${variables[$(bootstrap_id defines_library_static-$mode)]} - else - defines_library_static="$defines_library_static ${variables[$(bootstrap_id defines_library_static-$mode)]}" - fi + if [[ $sources_setting != "" ]] ; then + for i in $sources_setting ; do + directory=$(dirname $i) - if [[ $defines_program == "" ]] ; then - defines_program=${variables[$(bootstrap_id defines_program-$mode)]} - else - defines_program="$defines_program ${variables[$(bootstrap_id defines_program-$mode)]}" - fi + if [[ $directory == "." ]] ; then + cp $verbose -R $path_settings$i ${path_build}settings/ || failure=1 + else + mkdir $verbose -p ${path_build}settings/$directory || failure=1 - if [[ $defines_program_shared == "" ]] ; then - defines_program_shared=${variables[$(bootstrap_id defines_program_shared-$mode)]} - else - defines_program_shared="$defines_program_shared ${variables[$(bootstrap_id defines_program_shared-$mode)]}" + if [[ $failure -eq 0 ]] ; then + cp $verbose -R $path_settings$i ${path_build}settings/${directory}/ || failure=1 + fi + fi + done fi - if [[ $defines_program_static == "" ]] ; then - defines_program_static=${variables[$(bootstrap_id defines_program_static-$mode)]} - else - defines_program_static="$defines_program_static ${variables[$(bootstrap_id defines_program_static-$mode)]}" - fi + if [[ $failure -eq 0 && $sources_headers != "" ]] ; then + if [[ $path_headers_preserve == "yes" ]] ; then + for i in $sources_headers ; do + directory=$(dirname $i) - if [[ $defines_shared == "" ]] ; then - defines_shared=${variables[$(bootstrap_id defines_shared-$mode)]} - else - defines_shared="$defines_shared ${variables[$(bootstrap_id defines_shared-$mode)]}" - fi + if [[ $directory == "." ]] ; then + cp $verbose -f $path_sources$path_language$i ${path_build}includes/$path_headers || failure=1 + else + if [[ ! -d ${path_build}includes/$path_headers$directory ]] ; then + mkdir $verbose -p ${path_build}includes/$path_headers$directory || failure=1 + fi - if [[ $defines_static == "" ]] ; then - defines_static=${variables[$(bootstrap_id defines_static-$mode)]} - else - defines_static="$defines_static ${variables[$(bootstrap_id defines_static-$mode)]}" + if [[ $failure -eq 0 ]] ; then + cp $verbose -f $path_sources$path_language$i ${path_build}includes/$path_headers$i || failure=1 + fi + fi + done + else + for i in $sources_headers ; do + cp $verbose -f $path_sources$path_language$i ${path_build}includes/$path_headers || failure=1 + done + fi + fi + + if [[ $failure -eq 0 && $shared == "yes" && ! -f ${project_built_shared}.built ]] ; then + if [[ $sources_object != "" || $sources_object_shared != "" ]] ; then + sources= + let count=0 + + # Sources object only allows for a single value. + if [[ $sources_object_shared != "" ]] ; then + for i in $sources_object_shared ; do + let count++ + done + + if [[ $count -gt 1 ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object_shared$c_warning' found, only using the first one found is going to be used.$c_reset" + fi + fi + + for i in $sources_object_shared ; do + sources="$path_sources_object$path_language$i " + break + done + else + for i in $sources_object ; do + let count++ + done + + if [[ $count -gt 1 ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object$c_warning' found, only using the first one found is going to be used.$c_reset" + fi + fi + + for i in $sources_object ; do + sources="$path_sources_object$path_language$i " + break + done + fi + + if [[ $verbosity == "verbose" ]] ; then + echo $compiler $sources -c -o ${path_build}objects/$path_object_shared$build_name.o $arguments_shared $arguments_include $libraries $libraries_shared $flags $flags_shared $flags_object $flags_object_shared $defines $defines_shared $defines_object $defines_object_shared + fi + + $compiler $sources -c -o ${path_build}objects/$path_object_shared$build_name.o $arguments_shared $arguments_include $libraries $libraries_shared $flags $flags_shared $flags_object $flags_object_shared $defines $defines_shared $defines_object $defines_object_shared || failure=1 + fi + + if [[ $sources_library != "" || $sources_library_shared != "" ]] ; then + sources= + + if [[ $objects_library != "" || $objects_library_shared != "" ]] ; then + for i in $objects_library $objects_library_shared ; do + sources="$sources${path_build}objects/${path_object_shared}$i " + done + fi + + for i in $sources_library $sources_library_shared ; do + sources="$sources$path_sources$path_language$i " + done + + if [[ $verbosity == "verbose" ]] ; then + echo $compiler $sources -shared -Wl,-soname,lib$build_name.so$version_target -o ${path_build}libraries/${path_library_shared}lib$build_name.so$version_file $arguments_shared $arguments_include $libraries $libraries_shared $flags $flags_shared $flags_library $flags_library_shared $defines $defines_shared $defines_library $defines_library_shared + fi + + $compiler $sources -shared -Wl,-soname,lib$build_name.so$version_target -o ${path_build}libraries/${path_library_shared}lib$build_name.so$version_file $arguments_shared $arguments_include $libraries $libraries_shared $flags $flags_shared $flags_library $flags_library_shared $defines $defines_shared $defines_library $defines_library_shared || failure=1 + + if [[ $failure -eq 0 ]] ; then + if [[ $file != "major" ]] ; then + if [[ $file == "minor" ]] ; then + ln $verbose -sf lib$build_name.so$version_file ${path_build}libraries/${path_library_shared}lib$build_name.so$major_prefix$major || failure=1 + else + ln $verbose -sf lib$build_name.so$major_prefix$major$minor_prefix$minor ${path_build}libraries/${path_library_shared}lib$build_name.so$major_prefix$major || failure=1 + + if [[ $failure -eq 0 ]] ; then + if [[ $file == "micro" ]] ; then + ln $verbose -sf lib$build_name.so$version_file ${path_build}libraries/${path_library_shared}lib$build_name.so$major_prefix$major$minor_prefix$minor || failure=1 + else + ln $verbose -sf lib$build_name.so$major_prefix$major$minor_prefix$minor$micro_prefix$micro ${path_build}libraries/${path_library_shared}lib$build_name.so$major_prefix$major$minor_prefix$minor || failure=1 + + if [[ $failure -eq 0 ]] ; then + ln $verbose -sf lib$build_name.so$version_file ${path_build}libraries/${path_library_shared}lib$build_name.so$major_prefix$major$minor_prefix$minor_prefix$minor$micro_prefix$micro || failure=1 + fi + fi + fi + fi + fi + + if [[ $failure -eq 0 ]] ; then + ln $verbose -sf lib$build_name.so$major_prefix$major ${path_build}libraries/${path_library_shared}lib$build_name.so || failure=1 + fi + fi + fi + + if [[ $failure -eq 0 && $sources_program != "" ]] ; then + sources= + links= + + if [[ $sources_library != "" || $sources_library_shared != "" ]] ; then + links="-l$build_name " + fi + + if [[ $objects_program != "" || $objects_program_shared != "" ]] ; then + for i in $objects_program $objects_program_shared ; do + sources="$sources${path_build}objects/${path_object_shared}$i " + done + fi + + for i in $sources_program $sources_program_shared ; do + sources="$sources$path_sources$path_language$i " + done + + if [[ $verbosity == "verbose" ]] ; then + echo $compiler $sources -o ${path_build}programs/${path_program_shared}$build_name $arguments_shared $arguments_include $links $libraries $libraries_shared $flags $flags_shared $flags_program $flags_program_shared $defines $defines_shared $defines_program $defines_program_shared + fi + + $compiler $sources -o ${path_build}programs/${path_program_shared}$build_name $arguments_shared $arguments_include $links $libraries $libraries_shared $flags $flags_shared $flags_program $flags_program_shared $defines $defines_shared $defines_program $defines_program_shared || failure=1 + fi + + if [[ $failure -eq 0 ]] ; then + touch ${project_built_shared}.built + fi + fi + + if [[ $failure -eq 0 && $static == "yes" && ! -f ${project_built_static}.built ]] ; then + if [[ $sources_object != "" || $sources_object_static != "" ]] ; then + let count=0 + + # Sources object only allows for a single value. + if [[ $sources_object_static != "" ]] ; then + for i in $sources_object_static ; do + let count++ + done + + if [[ $count -gt 1 ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object_static$c_warning' found, only using the first one found is going to be used.$c_reset" + fi + fi + + for i in $sources_object_static ; do + sources="$path_sources_object$path_language$i " + break + done + else + for i in $sources_object ; do + let count++ + done + + if [[ $count -gt 1 ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object$c_warning' found, only using the first one found is going to be used.$c_reset" + fi + fi + + for i in $sources_object ; do + sources="$path_sources_object$path_language$i " + break + done + fi + + if [[ $verbosity == "verbose" ]] ; then + echo $compiler $sources -c -o ${path_build}objects/$path_object_static$build_name.o $arguments_static $arguments_include $libraries $libraries_static $flags $flags_static $flags_object $flags_object_static $defines $defines_static $defines_object $defines_object_static + fi + + $compiler $sources -c -o ${path_build}objects/$path_object_static$build_name.o $arguments_static $arguments_include $libraries $libraries_static $flags $flags_static $flags_object $flags_object_static $defines $defines_static $defines_object $defines_object_static || failure=1 + fi + + if [[ $sources_library != "" || $sources_library_static != "" ]] ; then + sources= + + if [[ $objects_library != "" || $objects_library_static != "" ]] ; then + for i in $objects_library $objects_library_static ; do + sources="$sources${path_build}objects/${path_object_static}$i " + done + fi + + for i in $sources_library $sources_library_static ; do + directory=$(dirname $i) + n=$(basename $i | sed -e 's|\.c$||') + + if [[ $directory != "." && ! -d ${path_build}objects/$directory ]] ; then + mkdir $verbose -p ${path_build}objects/$directory + + if [[ $? -ne 0 ]] ; then + let failure=1 + + break; + fi + fi + + # These are objects created by the static build step rather than objects created by the object build step. + sources="$sources${path_build}objects/$directory/$n.o " + + if [[ $verbosity == "verbose" ]] ; then + echo $compiler $path_sources$path_language$i -c -static -o ${path_build}objects/$directory/$n.o $arguments_static $arguments_include $libraries $libraries_static $flags $flags_static $flags_library $flags_library_static $defines $defines_static $defines_library $defines_library_static + fi + + $compiler $path_sources$path_language$i -c -static -o ${path_build}objects/$directory/$n.o $arguments_static $arguments_include $libraries $libraries_static $flags $flags_static $flags_library $flags_library_static $defines $defines_static $defines_library $defines_library_static || failure=1 + + if [[ $failure -eq 1 ]] ; then + break; + fi + done + + if [[ $failure -eq 0 && ( $sources_library != "" || $sources_library_static != "" ) ]] ; then + + if [[ $verbosity == "verbose" ]] ; then + echo $indexer $indexer_arguments ${path_build}libraries/${path_library_static}lib$build_name.a $sources + fi + + $indexer $indexer_arguments ${path_build}libraries/${path_library_static}lib$build_name.a $sources || failure=1 + fi + fi + + if [[ $failure -eq 0 && $sources_program != "" ]] ; then + sources= + links= + + if [[ $sources_library != "" || $sources_library_static != "" ]] ; then + links="-l$build_name " + fi + + if [[ $objects_program != "" || $objects_program_static != "" ]] ; then + for i in $objects_program $objects_program_static ; do + sources="$sources${path_build}objects/${path_object_static}$i " + done + fi + + for i in $sources_program $sources_program_static ; do + sources="$sources$path_sources$path_language$i " + done + + if [[ $verbosity == "verbose" ]] ; then + echo $compiler $sources -static -o ${path_build}programs/${path_program_static}$build_name $arguments_static $arguments_include $links $libraries $libraries_static $flags $flags_static $flags_program $flags_program_static $defines $defines_static $defines_program $defines_program_static + fi + + $compiler $sources -static -o ${path_build}programs/${path_program_static}$build_name $arguments_static $arguments_include $links $libraries $libraries_static $flags $flags_static $flags_program $flags_program_static $defines $defines_static $defines_program $defines_program_static || failure=1 + fi + + if [[ $failure -eq 0 ]] ; then + touch ${project_built_static}.built + fi + fi + + if [[ $failure -eq 1 ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_error}ERROR: failed to build.$c_reset" + fi + + return 1 + fi +} + +bootstrap_operation_build_prepare_defaults() { + + if [[ ${variables[$(bootstrap_id has-version_major_prefix)]} != "yes" ]] ; then + major_prefix="." + fi + + if [[ ${variables[$(bootstrap_id has-version_minor_prefix)]} != "yes" ]] ; then + minor_prefix="." + fi + + if [[ ${variables[$(bootstrap_id has-version_micro_prefix)]} != "yes" ]] ; then + micro_prefix="." + fi + + if [[ ${variables[$(bootstrap_id has-version_nano_prefix)]} != "yes" ]] ; then + nano_prefix="." + fi + + if [[ ${variables[$(bootstrap_id has-build_compiler)]} != "yes" ]] ; then + compiler="gcc" + fi + + if [[ ${variables[$(bootstrap_id has-build_indexer)]} != "yes" ]] ; then + indexer="ar" + fi + + if [[ ${variables[$(bootstrap_id has-path_library_script)]} != "yes" ]] ; then + path_library_script="script/" + fi + + if [[ ${variables[$(bootstrap_id has-path_library_shared)]} != "yes" ]] ; then + path_library_shared="shared/" + fi + + if [[ ${variables[$(bootstrap_id has-path_library_static)]} != "yes" ]] ; then + path_library_static="static/" + fi + + if [[ ${variables[$(bootstrap_id has-path_object_script)]} != "yes" ]] ; then + path_object_script="script/" + fi + + if [[ ${variables[$(bootstrap_id has-path_object_shared)]} != "yes" ]] ; then + path_object_shared="shared/" + fi + + if [[ ${variables[$(bootstrap_id has-path_object_static)]} != "yes" ]] ; then + path_object_static="static/" + fi + + if [[ ${variables[$(bootstrap_id has-path_program_script)]} != "yes" ]] ; then + path_program_script="script/" + fi + + if [[ ${variables[$(bootstrap_id has-path_program_shared)]} != "yes" ]] ; then + path_program_shared="shared/" + fi + + if [[ ${variables[$(bootstrap_id has-path_program_static)]} != "yes" ]] ; then + path_program_static="static/" + fi + + if [[ ${variables[$(bootstrap_id has-path_sources)]} != "yes" ]] ; then + path_sources="sources/" + fi + + if [[ ${variables[$(bootstrap_id has-path_sources_object)]} != "yes" ]] ; then + path_sources_object="sources/" + fi + + if [[ ${variables[$(bootstrap_id has-path_standard)]} != "yes" ]] ; then + path_standard="yes" + fi + + if [[ ${variables[$(bootstrap_id has-search_shared)]} != "yes" ]] ; then + search_shared="yes" + fi + + if [[ ${variables[$(bootstrap_id has-build_shared)]} != "yes" ]] ; then + shared="yes" + fi +} + +bootstrap_operation_build_prepare_defines() { + if [[ $defines == "" ]] ; then + defines=${variables[$(bootstrap_id defines-$mode)]} + else + defines="$defines ${variables[$(bootstrap_id defines-$mode)]}" + fi + + if [[ $defines_library == "" ]] ; then + defines_library=${variables[$(bootstrap_id defines_library-$mode)]} + else + defines_library="$defines_library ${variables[$(bootstrap_id defines_library-$mode)]}" + fi + + if [[ $defines_library_shared == "" ]] ; then + defines_library_shared=${variables[$(bootstrap_id defines_library_shared-$mode)]} + else + defines_library_shared="$defines_library_shared ${variables[$(bootstrap_id defines_library_shared-$mode)]}" + fi + + if [[ $defines_library_static == "" ]] ; then + defines_library_static=${variables[$(bootstrap_id defines_library_static-$mode)]} + else + defines_library_static="$defines_library_static ${variables[$(bootstrap_id defines_library_static-$mode)]}" + fi + + if [[ $defines_object_library == "" ]] ; then + defines_object_library=${variables[$(bootstrap_id defines_object_library-$mode)]} + else + defines_object_library="$defines_object_library ${variables[$(bootstrap_id defines_object_library-$mode)]}" + fi + + if [[ $defines_object_library_shared == "" ]] ; then + defines_object_library_shared=${variables[$(bootstrap_id defines_object_library_shared-$mode)]} + else + defines_object_library_shared="$defines_object_library_shared ${variables[$(bootstrap_id defines_object_library_shared-$mode)]}" + fi + + if [[ $defines_object_library_static == "" ]] ; then + defines_object_library_static=${variables[$(bootstrap_id defines_object_library_static-$mode)]} + else + defines_object_library_static="$defines_object_library_static ${variables[$(bootstrap_id defines_object_library_static-$mode)]}" + fi + + if [[ $defines_object_program == "" ]] ; then + defines_object_program=${variables[$(bootstrap_id defines_object_program-$mode)]} + else + defines_object_program="$defines_object_program ${variables[$(bootstrap_id defines_object_program-$mode)]}" + fi + + if [[ $defines_object_program_shared == "" ]] ; then + defines_object_program_shared=${variables[$(bootstrap_id defines_object_program_shared-$mode)]} + else + defines_object_program_shared="$defines_object_program_shared ${variables[$(bootstrap_id defines_object_program_shared-$mode)]}" + fi + + if [[ $defines_object_program_static == "" ]] ; then + defines_object_program_static=${variables[$(bootstrap_id defines_object_program_static-$mode)]} + else + defines_object_program_static="$defines_object_program_static ${variables[$(bootstrap_id defines_object_program_static-$mode)]}" + fi + + if [[ $defines_program == "" ]] ; then + defines_program=${variables[$(bootstrap_id defines_program-$mode)]} + else + defines_program="$defines_program ${variables[$(bootstrap_id defines_program-$mode)]}" + fi + + if [[ $defines_program_shared == "" ]] ; then + defines_program_shared=${variables[$(bootstrap_id defines_program_shared-$mode)]} + else + defines_program_shared="$defines_program_shared ${variables[$(bootstrap_id defines_program_shared-$mode)]}" + fi + + if [[ $defines_program_static == "" ]] ; then + defines_program_static=${variables[$(bootstrap_id defines_program_static-$mode)]} + else + defines_program_static="$defines_program_static ${variables[$(bootstrap_id defines_program_static-$mode)]}" + fi + + if [[ $defines_shared == "" ]] ; then + defines_shared=${variables[$(bootstrap_id defines_shared-$mode)]} + else + defines_shared="$defines_shared ${variables[$(bootstrap_id defines_shared-$mode)]}" + fi + + if [[ $defines_static == "" ]] ; then + defines_static=${variables[$(bootstrap_id defines_static-$mode)]} + else + defines_static="$defines_static ${variables[$(bootstrap_id defines_static-$mode)]}" + fi + + if [[ $defines_override != "" ]] ; then + defines="$defines_override" + defines_library= + defines_object_library= + defines_object_program= + defines_program= + defines_shared= + defines_static= fi +} +bootstrap_operation_build_prepare_flags() { if [[ $flags == "" ]] ; then flags=${variables[$(bootstrap_id flags-$mode)]} else @@ -872,6 +1403,42 @@ bootstrap_operation_build() { flags_library_static="$flags_library_static ${variables[$(bootstrap_id flags_library_static-$mode)]}" fi + if [[ $flags_object_library == "" ]] ; then + flags_object_library=${variables[$(bootstrap_id flags_object_library-$mode)]} + else + flags_object_library="$flags_object_library ${variables[$(bootstrap_id flags_object_library-$mode)]}" + fi + + if [[ $flags_object_library_shared == "" ]] ; then + flags_object_library_shared=${variables[$(bootstrap_id flags_object_library_shared-$mode)]} + else + flags_object_library_shared="$flags_object_library_shared ${variables[$(bootstrap_id flags_object_library_shared-$mode)]}" + fi + + if [[ $flags_object_library_static == "" ]] ; then + flags_object_library_static=${variables[$(bootstrap_id flags_object_library_static-$mode)]} + else + flags_object_library_static="$flags_object_library_static ${variables[$(bootstrap_id flags_object_library_static-$mode)]}" + fi + + if [[ $flags_object_program == "" ]] ; then + flags_object_program=${variables[$(bootstrap_id flags_object_program-$mode)]} + else + flags_object_program="$flags_object_program ${variables[$(bootstrap_id flags_object_program-$mode)]}" + fi + + if [[ $flags_object_program_shared == "" ]] ; then + flags_object_program_shared=${variables[$(bootstrap_id flags_object_program_shared-$mode)]} + else + flags_object_program_shared="$flags_object_program_shared ${variables[$(bootstrap_id flags_object_program_shared-$mode)]}" + fi + + if [[ $flags_object_program_static == "" ]] ; then + flags_object_program_static=${variables[$(bootstrap_id flags_object_program_static-$mode)]} + else + flags_object_program_static="$flags_object_program_static ${variables[$(bootstrap_id flags_object_program_static-$mode)]}" + fi + if [[ $flags_program == "" ]] ; then flags_program=${variables[$(bootstrap_id flags_program-$mode)]} else @@ -901,21 +1468,365 @@ bootstrap_operation_build() { else flags_static="$flags_static ${variables[$(bootstrap_id flags_static-$mode)]}" fi +} + +bootstrap_operation_build_prepare_headers() { + if [[ $sources_headers == "" ]] ; then + sources_headers=${variables[$(bootstrap_id build_sources_headers-$mode)]} + else + sources_headers="$sources_headers ${variables[$(bootstrap_id build_sources_headers-$mode)]}" + fi + + if [[ $shared == "yes" ]] ; then + if [[ $sources_headers == "" ]] ; then + sources_headers=${variables[$(bootstrap_id build_sources_headers_shared)]} + else + sources_headers="$sources_headers ${variables[$(bootstrap_id build_sources_headers_shared)]}" + fi + + if [[ $sources_headers == "" ]] ; then + sources_headers=${variables[$(bootstrap_id build_sources_headers_static)]} + else + sources_headers="$sources_headers ${variables[$(bootstrap_id build_sources_headers_static)]}" + fi + fi + + if [[ $static == "yes" ]] ; then + if [[ $sources_headers == "" ]] ; then + sources_headers=${variables[$(bootstrap_id build_sources_headers_shared-$mode)]} + else + sources_headers="$sources_headers ${variables[$(bootstrap_id build_sources_headers_shared-$mode)]}" + fi + + if [[ $sources_headers == "" ]] ; then + sources_headers=${variables[$(bootstrap_id build_sources_headers_static-$mode)]} + else + sources_headers="$sources_headers ${variables[$(bootstrap_id build_sources_headers_static-$mode)]}" + fi + fi + + if [[ ${variables[$(bootstrap_id path_headers-$mode)]} != "" ]] ; then + path_headers=${variables[$(bootstrap_id path_headers-$mode)]} + elif [[ ${variables[$(bootstrap_id path_headers)]} != "" ]] ; then + path_headers=${variables[$(bootstrap_id path_headers)]} + fi + + if [[ $path_headers != "" ]] ; then + path_headers=$(echo $path_headers | sed -e 's|/*$|/|') + fi +} + +bootstrap_operation_build_prepare_libraries() { + if [[ $libraries == "" ]] ; then + libraries=${variables[$(bootstrap_id build_libraries-$mode)]} + else + libraries="${variables[$(bootstrap_id build_libraries-$mode)]} $libraries" + fi + + if [[ $libraries_shared == "" ]] ; then + libraries_shared=${variables[$(bootstrap_id build_libraries_shared-$mode)]} + else + libraries_shared="${variables[$(bootstrap_id build_libraries_shared-$mode)]} $libraries_shared" + fi + + if [[ $libraries_static == "" ]] ; then + libraries_static=${variables[$(bootstrap_id build_libraries_static-$mode)]} + else + libraries_static="${variables[$(bootstrap_id build_libraries_static-$mode)]} $libraries_static" + fi + + if [[ $sources_library == "" ]] ; then + sources_library=${variables[$(bootstrap_id build_sources_library-$mode)]} + else + sources_library="$sources_library ${variables[$(bootstrap_id build_sources_library-$mode)]}" + fi + + if [[ $sources_library_shared == "" ]] ; then + sources_library_shared=${variables[$(bootstrap_id build_sources_library_shared-$mode)]} + else + sources_library_shared="$build_sources_library_shared ${variables[$(bootstrap_id build_sources_library_shared-$mode)]}" + fi + + if [[ $sources_library_static == "" ]] ; then + sources_library_static=${variables[$(bootstrap_id build_sources_library_static-$mode)]} + else + sources_library_static="$build_sources_library_static ${variables[$(bootstrap_id build_sources_library_static-$mode)]}" + fi +} + +bootstrap_operation_build_prepare_objects() { + if [[ $objects_library == "" ]] ; then + objects_library=${variables[$(bootstrap_id build_objects_library-$mode)]} + else + objects_library="${variables[$(bootstrap_id build_objects_library-$mode)]} $objects_library" + fi + + if [[ $objects_library_shared == "" ]] ; then + objects_library_shared=${variables[$(bootstrap_id build_objects_library_shared-$mode)]} + else + objects_library_shared="${variables[$(bootstrap_id build_objects_library_shared-$mode)]} $objects_library_shared" + fi + + if [[ $objects_library_static == "" ]] ; then + objects_library_static=${variables[$(bootstrap_id build_objects_library_static-$mode)]} + else + objects_library_static="${variables[$(bootstrap_id build_objects_library_static-$mode)]} $objects_library_static" + fi + + if [[ $objects_program == "" ]] ; then + objects_program=${variables[$(bootstrap_id build_objects_program-$mode)]} + else + objects_program="${variables[$(bootstrap_id build_objects_program-$mode)]} $objects_program" + fi + + if [[ $objects_program_shared == "" ]] ; then + objects_program_shared=${variables[$(bootstrap_id build_objects_program_shared-$mode)]} + else + objects_program_shared="${variables[$(bootstrap_id build_objects_program_shared-$mode)]} $objects_program_shared" + fi + + if [[ $objects_program_static == "" ]] ; then + objects_program_static=${variables[$(bootstrap_id build_objects_program_static-$mode)]} + else + objects_program_static="${variables[$(bootstrap_id build_objects_program_static-$mode)]} $objects_program_static" + fi + + if [[ $sources_object == "" ]] ; then + sources_object=${variables[$(bootstrap_id build_sources_object-$mode)]} + fi + + if [[ $sources_object_shared == "" ]] ; then + sources_object_shared=${variables[$(bootstrap_id build_sources_object_shared-$mode)]} + fi + + if [[ $sources_object_static == "" ]] ; then + sources_object_static=${variables[$(bootstrap_id build_sources_object_static-$mode)]} + fi +} + +bootstrap_operation_build_prepare_paths() { + if [[ $override_path_sources == "" ]] ; then + if [[ ${variables[$(bootstrap_id path_sources-$mode)]} != "" ]] ; then + path_sources=${variables[$(bootstrap_id path_sources-$mode)]} + elif [[ ${variables[$(bootstrap_id path_sources)]} != "" ]] ; then + path_sources=${variables[$(bootstrap_id path_sources)]} + fi + fi + + if [[ $path_sources != "" ]] ; then + path_sources=$(echo $path_sources | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_sources_object-$mode)]} != "" ]] ; then + path_sources_object=${variables[$(bootstrap_id path_sources_object-$mode)]} + elif [[ ${variables[$(bootstrap_id path_sources_object)]} != "" ]] ; then + path_sources_object=${variables[$(bootstrap_id path_sources_object)]} + fi + + if [[ $path_sources_object != "" ]] ; then + path_sources_object=$(echo $path_sources_object | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_headers-$mode)]} != "" ]] ; then + path_headers=${variables[$(bootstrap_id path_headers-$mode)]} + fi + + if [[ $path_headers != "" ]] ; then + path_headers=$(echo $path_headers | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_standard-$mode)]} != "" ]] ; then + path_standard=${variables[$(bootstrap_id path_standard-$mode)]} + fi + + if [[ $path_standard == "no" ]] ; then + path_language= + else + if [[ ${variables[$(bootstrap_id path_language-$mode)]} != "" ]] ; then + path_language=${variables[$(bootstrap_id path_language-$mode)]} + elif [[ ${variables[$(bootstrap_id path_language)]} != "" ]] ; then + path_language=${variables[$(bootstrap_id path_language)]} + fi + + if [[ $path_language != "" ]] ; then + path_language=$(echo $path_language | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + fi + + if [[ ${variables[$(bootstrap_id path_object_library-$mode)]} != "" ]] ; then + path_object_library=${variables[$(bootstrap_id path_object_library-$mode)]} + fi + + if [[ $path_object_library != "" ]] ; then + path_object_library=$(echo $path_object_library | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_object_program-$mode)]} != "" ]] ; then + path_object_program=${variables[$(bootstrap_id path_object_program-$mode)]} + fi + + if [[ $path_object_program != "" ]] ; then + path_object_program=$(echo $path_object_program | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_library_script-$mode)]} != "" ]] ; then + path_library_script=${variables[$(bootstrap_id path_library_script-$mode)]} + fi + + if [[ $path_library_script != "" ]] ; then + path_library_script=$(echo $path_library_script | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_library_shared-$mode)]} != "" ]] ; then + path_library_shared=${variables[$(bootstrap_id path_library_shared-$mode)]} + fi + + if [[ $path_library_shared != "" ]] ; then + path_library_shared=$(echo $path_library_shared | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_library_static-$mode)]} != "" ]] ; then + path_library_static=${variables[$(bootstrap_id path_library_static-$mode)]} + fi + + if [[ $path_library_static != "" ]] ; then + path_library_static=$(echo $path_library_static | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_object_library_script-$mode)]} != "" ]] ; then + path_object_library_script=${variables[$(bootstrap_id path_object_library_script-$mode)]} + fi + + if [[ $path_object_library_script != "" ]] ; then + path_object_library_script=$(echo $path_object_library_script | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_object_library_shared-$mode)]} != "" ]] ; then + path_object_library_shared=${variables[$(bootstrap_id path_object_library_shared-$mode)]} + fi + + if [[ $path_object_library_shared != "" ]] ; then + path_object_library_shared=$(echo $path_object_library_shared | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_object_library_static-$mode)]} != "" ]] ; then + path_object_library_static=${variables[$(bootstrap_id path_object_library_static-$mode)]} + fi + + if [[ $path_object_library_static != "" ]] ; then + path_object_library_static=$(echo $path_object_library_static | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_object_program_script-$mode)]} != "" ]] ; then + path_object_program_script=${variables[$(bootstrap_id path_object_program_script-$mode)]} + fi + + if [[ $path_object_program_script != "" ]] ; then + path_object_program_script=$(echo $path_object_program_script | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_object_program_shared-$mode)]} != "" ]] ; then + path_object_program_shared=${variables[$(bootstrap_id path_object_program_shared-$mode)]} + fi + + if [[ $path_object_program_shared != "" ]] ; then + path_object_program_shared=$(echo $path_object_program_shared | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_object_program_static-$mode)]} != "" ]] ; then + path_object_program_static=${variables[$(bootstrap_id path_object_program_static-$mode)]} + fi + + if [[ $path_object_program_static != "" ]] ; then + path_object_program_static=$(echo $path_object_program_static | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_object_script-$mode)]} != "" ]] ; then + path_object_script=${variables[$(bootstrap_id path_object_script-$mode)]} + fi + + if [[ $path_object_script != "" ]] ; then + path_object_script=$(echo $path_object_script | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_object_shared-$mode)]} != "" ]] ; then + path_object_shared=${variables[$(bootstrap_id path_object_shared-$mode)]} + fi + + if [[ $path_object_shared != "" ]] ; then + path_object_shared=$(echo $path_object_shared | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_object_static-$mode)]} != "" ]] ; then + path_object_static=${variables[$(bootstrap_id path_object_static-$mode)]} + fi + + if [[ $path_object_static != "" ]] ; then + path_object_static=$(echo $path_object_static | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ $path_object_static != "" ]] ; then + path_object_static=$(echo $path_object_static | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_program_script-$mode)]} != "" ]] ; then + path_program_script=${variables[$(bootstrap_id path_program_script-$mode)]} + fi + + if [[ $path_program_script != "" ]] ; then + path_program_script=$(echo $path_program_script | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_program_shared-$mode)]} != "" ]] ; then + path_program_shared=${variables[$(bootstrap_id path_program_shared-$mode)]} + fi + + if [[ $path_program_shared != "" ]] ; then + path_program_shared=$(echo $path_program_shared | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ ${variables[$(bootstrap_id path_program_static-$mode)]} != "" ]] ; then + path_program_static=${variables[$(bootstrap_id path_program_static-$mode)]} + fi + + if [[ $path_program_static != "" ]] ; then + path_program_static=$(echo $path_program_static | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi + + if [[ $path_program_static != "" ]] ; then + path_program_static=$(echo $path_program_static | sed -e 's|//*|/|g' -e 's|/*$|/|') + fi +} + +bootstrap_operation_build_prepare_programs() { + if [[ $sources_program == "" ]] ; then + sources_program=${variables[$(bootstrap_id build_sources_program-$mode)]} + else + sources_program="$sources_program ${variables[$(bootstrap_id build_sources_program-$mode)]}" + fi + + if [[ $sources_program_shared == "" ]] ; then + sources_program_shared=${variables[$(bootstrap_id build_sources_program_shared-$mode)]} + else + sources_program_shared="$sources_program_shared ${variables[$(bootstrap_id build_sources_program_shared-$mode)]}" + fi - if [[ $path_work != "" ]] ; then - arguments_include="$arguments_include -I${path_work}includes/" - arguments_shared="$arguments_shared -L${path_work}libraries/shared/" - arguments_static="$arguments_static -L${path_work}libraries/static/" + if [[ $sources_program_static == "" ]] ; then + sources_program_static=${variables[$(bootstrap_id build_sources_program_static-$mode)]} + else + sources_program_static="$sources_program_static ${variables[$(bootstrap_id build_sources_program_static-$mode)]}" fi +} - if [[ $defines_override != "" ]] ; then - defines="$defines_override" - defines_library= - defines_program= - defines_shared= - defines_static= +bootstrap_operation_build_prepare_settings() { + if [[ $sources_setting == "" ]] ; then + sources_setting=${variables[$(bootstrap_id build_sources_setting-$mode)]} + else + sources_setting="$sources_setting ${variables[$(bootstrap_id build_sources_setting-$mode)]}" fi +} +bootstrap_operation_build_prepare_shared_static() { if [[ $enable_shared == "yes" ]] ; then shared="yes" search_shared="yes" @@ -932,49 +1843,66 @@ bootstrap_operation_build() { search_static="no" fi + if [[ $search_shared == "no" ]] ; then + arguments_shared= + fi - if [[ $shared == "yes" && -f ${project_built_shared}.built || $static == "yes" && -f ${project_built_static}.built ]] ; then + if [[ $search_static == "no" ]] ; then + arguments_static= + fi +} + +bootstrap_operation_build_validate_build() { + if [[ $compiler == "" ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_warning}WARNING: this project has already been built.$c_reset" + echo -e "${c_error}ERROR: Cannot Build, no '${c_notice}build_compiler${c_error}' specified, such as '${c_notice}gcc${c_error}'.$c_reset" fi - return 0 + let failure=1 fi - if [[ $shared == "yes" ]] ; then - if [[ $sources_headers == "" ]] ; then - sources_headers=${variables[$(bootstrap_id build_sources_headers_shared)]} - else - sources_headers="$sources_headers ${variables[$(bootstrap_id build_sources_headers_shared)]}" + if [[ $indexer == "" ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_error}ERROR: Cannot Build, no '${c_notice}build_indexer${c_error}' specified, such as '${c_notice}ar${c_error}'.$c_reset" fi - if [[ $sources_headers == "" ]] ; then - sources_headers=${variables[$(bootstrap_id build_sources_headers_static)]} - else - sources_headers="$sources_headers ${variables[$(bootstrap_id build_sources_headers_static)]}" - fi + let failure=1 fi +} - if [[ $static == "yes" ]] ; then - if [[ $sources_headers == "" ]] ; then - sources_headers=${variables[$(bootstrap_id build_sources_headers_shared-$mode)]} - else - sources_headers="$sources_headers ${variables[$(bootstrap_id build_sources_headers_shared-$mode)]}" +bootstrap_operation_build_validate_paths() { + if [[ $path_sources == "" || ! -d $path_sources ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_error}ERROR: The sources directory $c_notice$path_sources$c_error is not a valid directory.$c_reset" fi - if [[ $sources_headers == "" ]] ; then - sources_headers=${variables[$(bootstrap_id build_sources_headers_static-$mode)]} - else - sources_headers="$sources_headers ${variables[$(bootstrap_id build_sources_headers_static-$mode)]}" + let failure=1 + fi + + if [[ $failure -eq 0 && $path_sources_object != "" && ! -d $path_sources_object ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_error}ERROR: The sources object directory $c_notice$path_sources_object$c_error is not a valid directory.$c_reset" fi + + let failure=1 + fi +} + +bootstrap_operation_build_validate_search() { + + # When not in search exclusive mode, allow static libraries to be linked into shared libraries if the shared library is not found first. + if [[ $search_exclusive == "no" ]] ; then + arguments_shared="$arguments_shared $arguments_static" fi +} +bootstrap_operation_build_validate_shared_static() { if [[ $shared != "yes" && $static != "yes" ]] ; then if [[ $verbosity != "quiet" ]] ; then echo -e "${c_error}ERROR: Cannot Build, either build_shared or build_static must be set to 'yes'.$c_reset" fi - return 1 + let failure=1 fi if [[ $search_shared != "yes" && $search_static != "yes" ]] ; then @@ -982,267 +1910,125 @@ bootstrap_operation_build() { echo -e "${c_error}ERROR: Cannot Build, either search_shared or search_static must be set to 'yes'.$c_reset" fi - return 1 + let failure=1 fi +} - for i in $sources_library ; do +bootstrap_operation_build_validate_sources() { + for i in $sources_script ; do if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: Cannot Build, invalid source_library path provided: '$i'.$c_reset" + echo -e "${c_error}ERROR: Cannot Build, invalid sources_script path provided: '$i'.$c_reset" fi - return 1 + let failure=1 fi done - for i in $sources_program ; do + for i in $sources_headers ; do if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: Cannot Build, invalid sources_program path provided: '$i'.$c_reset" + echo -e "${c_error}ERROR: Cannot Build, invalid sources_headers path provided: '$i'.$c_reset" fi - return 1 + let failure=1 fi done - for i in $sources_headers ; do + for i in $sources_library ; do if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: Cannot Build, invalid sources_headers path provided: '$i'.$c_reset" + echo -e "${c_error}ERROR: Cannot Build, invalid sources_library path provided: '$i'.$c_reset" fi - return 1 + let failure=1 fi done - for i in $sources_bash ; do + for i in $sources_library_object ; do if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: Cannot Build, invalid sources_bash path provided: '$i'.$c_reset" + echo -e "${c_error}ERROR: Cannot Build, invalid sources_library_object path provided: '$i'.$c_reset" fi - return 1 + let failure=1 fi done - for i in $sources_setting ; do + for i in $sources_program_object ; do if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: Cannot Build, invalid sources_setting path provided: '$i'.$c_reset" + echo -e "${c_error}ERROR: Cannot Build, invalid sources_program_object path provided: '$i'.$c_reset" fi - return 1 + let failure=1 fi done - if [[ $search_shared == "no" ]] ; then - arguments_shared= - fi - - if [[ $search_static == "no" ]] ; then - arguments_static= - fi - - # when not in search exclusive mode, allow static libraries to be linked into shared libraries if the shared library is not found first. - if [[ $search_exclusive == "no" ]] ; then - arguments_shared="$arguments_shared $arguments_static" - fi - - if [[ $compiler == "" ]] ; then - echo -e "${c_error}ERROR: Cannot Build, no '${c_notice}build_compiler${c_error}' specified, such as '${c_notice}gcc${c_error}'.$c_reset" - return 1 - fi - - if [[ $indexer == "" ]] ; then - echo -e "${c_error}ERROR: Cannot Build, no '${c_notice}build_indexer${c_error}' specified, such as '${c_notice}ar${c_error}'.$c_reset" - failure=1 - fi - - if [[ $sources_setting != "" ]] ; then - for i in $sources_setting ; do - directory=$(dirname $i) - - if [[ $directory == "." ]] ; then - cp $verbose -R $path_settings$i ${path_build}settings/ || failure=1 - else - mkdir $verbose -p ${path_build}settings/$directory || failure=1 - - if [[ $failure == "" ]] ; then - cp $verbose -R $path_settings$i ${path_build}settings/${directory}/ || failure=1 - fi - fi - done - fi - - if [[ $failure == "" && $sources_headers != "" ]] ; then - if [[ $path_headers == "" ]] ; then - for i in $sources_headers ; do - directory=$(dirname $i) - - if [[ $directory == "." || $path_headers_preserve != "yes" ]] ; then - cp $verbose -f $path_c$i ${path_build}includes/ || failure=1 - else - mkdir $verbose -p ${path_build}includes/$directory || failure=1 - - if [[ $failure == "" ]] ; then - cp $verbose -f $path_c$i ${path_build}includes/$i || failure=1 - fi - fi - done - elif [[ $path_headers_preserve == "yes" ]] ; then - for i in $sources_headers ; do - directory=$(dirname $i) - - if [[ $directory == "." || $path_headers_preserve != "yes" ]] ; then - cp $verbose -f $path_c$i ${path_build}includes/$path_headers/ || failure=1 - else - mkdir $verbose -p ${path_build}includes/$path_headers/$directory || failure=1 - - if [[ $failure == "" ]] ; then - cp $verbose -f $path_c$i ${path_build}includes/$path_headers/$i || failure=1 - fi - fi - done - else - for i in $sources_headers ; do - cp $verbose -f $path_c$i ${path_build}includes/$path_headers/ || failure=1 - done - fi - fi - - if [[ $failure == "" && $shared == "yes" && ! -f ${project_built_shared}.built ]] ; then - if [[ $sources_library != "" || $sources_library_shared != "" ]] ; then - sources= - for i in $sources_library $sources_library_shared ; do - sources="$sources$path_c$i " - done - - if [[ $verbosity == "verbose" ]] ; then - echo $compiler $sources -shared -Wl,-soname,lib$build_name.so.$version_target -o ${path_build}libraries/shared/lib$build_name.so.$version_file $arguments_shared $arguments_include $libraries $libraries_shared $flags $flags_shared $flags_library $flags_library_shared $defines $defines_shared $defines_library $defines_library_shared + for i in $sources_program ; do + if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_error}ERROR: Cannot Build, invalid sources_program path provided: '$i'.$c_reset" fi - $compiler $sources -shared -Wl,-soname,lib$build_name.so.$version_target -o ${path_build}libraries/shared/lib$build_name.so.$version_file $arguments_shared $arguments_include $libraries $libraries_shared $flags $flags_shared $flags_library $flags_library_shared $defines $defines_shared $defines_library $defines_library_shared || failure=1 - - if [[ $failure == "" ]] ; then - if [[ $file != "major" ]] ; then - if [[ $file == "minor" ]] ; then - ln $verbose -sf lib$build_name.so.$version_file ${path_build}libraries/shared/lib$build_name.so.$major_prefix$major || failure=1 - else - ln $verbose -sf lib$build_name.so.$major_prefix$major$minor_prefix$minor ${path_build}libraries/shared/lib$build_name.so.$major_prefix$major || failure=1 - - if [[ $failure == "" ]] ; then - if [[ $file == "micro" ]] ; then - ln $verbose -sf lib$build_name.so.$version_file ${path_build}libraries/shared/lib$build_name.so.$major_prefix$major$minor_prefix$minor || failure=1 - else - ln $verbose -sf lib$build_name.so.$major_prefix$major$minor_prefix$minor$micro_prefix$micro ${path_build}libraries/shared/lib$build_name.so.$major_prefix$major$minor_prefix$minor || failure=1 - - if [[ $failure == "" ]] ; then - ln $verbose -sf lib$build_name.so.$version_file ${path_build}libraries/shared/lib$build_name.so.$major_prefix$major$minor_prefix$minor_prefix$minor$micro_prefix$micro || failure=1 - fi - fi - fi - fi - fi - - if [[ $failure == "" ]] ; then - ln $verbose -sf lib$build_name.so.$major_prefix$major ${path_build}libraries/shared/lib$build_name.so || failure=1 - fi - fi + let failure=1 fi + done - if [[ $failure == "" && $sources_program != "" ]] ; then - sources= - links= - - if [[ $sources_library != "" || $sources_library_shared != "" ]] ; then - links="-l$build_name " - fi - - for i in $sources_program $sources_program_shared ; do - sources="$sources$path_c$i " - done - - if [[ $verbosity == "verbose" ]] ; then - echo $compiler $sources -o ${path_build}programs/shared/$build_name $arguments_shared $arguments_include $links $libraries $libraries_shared $flags $flags_shared $flags_program $flags_program_shared $defines $defines_shared $defines_program $defines_program_shared + for i in $sources_setting ; do + if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo -e "${c_error}ERROR: Cannot Build, invalid sources_setting path provided: '$i'.$c_reset" fi - $compiler $sources -o ${path_build}programs/shared/$build_name $arguments_shared $arguments_include $links $libraries $libraries_shared $flags $flags_shared $flags_program $flags_program_shared $defines $defines_shared $defines_program $defines_program_shared || failure=1 + let failure=1 fi + done +} - if [[ $failure == "" ]] ; then - touch ${project_built_shared}.built - fi +bootstrap_operation_build_prepare_versions() { + if [[ $file == "" ]] ; then + file="micro" fi - if [[ $failure == "" && $static == "yes" && ! -f ${project_built_static}.built ]] ; then - sources= - if [[ $sources_library != "" || $sources_library_static != "" ]] ; then - for i in $sources_library $sources_library_static ; do - directory=$(dirname $i) - n=$(basename $i | sed -e 's|\.c$||') - - if [[ $directory != "." && ! -d ${path_build}objects/$directory ]] ; then - mkdir $verbose -p ${path_build}objects/$directory - - if [[ $? -ne 0 ]] ; then - failure=1 - break; - fi - fi - - sources="$sources${path_build}objects/$directory/$n.o " - - if [[ $verbosity == "verbose" ]] ; then - echo $compiler $path_c$i -c -static -o ${path_build}objects/$directory/$n.o $arguments_static $arguments_include $libraries $libraries_static $flags $flags_static $flags_library $flags_library_static $defines $defines_static $defines_library $defines_library_static - fi - - $compiler $path_c$i -c -static -o ${path_build}objects/$directory/$n.o $arguments_static $arguments_include $libraries $libraries_static $flags $flags_static $flags_library $flags_library_static $defines $defines_static $defines_library $defines_library_static || failure=1 - - if [[ $failure == "1" ]] ; then - break; - fi - done - - if [[ $failure == "" && ( $sources_library != "" || $sources_library_static != "" ) ]] ; then - - if [[ $verbosity == "verbose" ]] ; then - echo $indexer $indexer_arguments ${path_build}libraries/static/lib$build_name.a $sources - fi - - $indexer $indexer_arguments ${path_build}libraries/static/lib$build_name.a $sources || failure=1 - fi - fi - - if [[ $failure == "" && $sources_program != "" ]] ; then - sources= - links= - - if [[ $sources_library != "" || $sources_library_static != "" ]] ; then - links="-l$build_name " - fi + if [[ $target == "" ]] ; then + target="major" + fi - for i in $sources_program $sources_program_static ; do - sources="$sources$path_c$i " - done + if [[ $major == "" ]] ; then + major_prefix= + fi - if [[ $verbosity == "verbose" ]] ; then - echo $compiler $sources -static -o ${path_build}programs/static/$build_name $arguments_static $arguments_include $links $libraries $libraries_static $flags $flags_static $flags_program $flags_program_static $defines $defines_static $defines_program $defines_program_static - fi + if [[ $minor == "" ]] ; then + minor_prefix= + fi - $compiler $sources -static -o ${path_build}programs/static/$build_name $arguments_static $arguments_include $links $libraries $libraries_static $flags $flags_static $flags_program $flags_program_static $defines $defines_static $defines_program $defines_program_static || failure=1 - fi + if [[ $micro == "" ]] ; then + micro_prefix= + fi - if [[ $failure == "" ]] ; then - touch ${project_built_static}.built - fi + if [[ $nano == "" ]] ; then + nano_prefix= fi - if [[ $failure != "" ]] ; then - if [[ $verbosity != "quiet" ]] ; then - echo -e "${c_error}ERROR: failed to build.$c_reset" - fi + if [[ $file == "major" ]] ; then + version_file="$major_prefix$major" + elif [[ $file == "minor" ]] ; then + version_file="$major_prefix$major$minor_prefix$minor" + elif [[ $file == "micro" ]] ; then + version_file="$major_prefix$major$minor_prefix$minor$micro_prefix$micro" + elif [[ $file == "nano" ]] ; then + version_file="$major_prefix$major$minor_prefix$minor$micro_prefix$micro$nano_prefix$nano" + fi - return 1 + if [[ $target == "major" ]] ; then + version_target="$major_prefix$major" + elif [[ $target == "minor" ]] ; then + version_target="$major_prefix$major$minor_prefix$minor" + elif [[ $target == "micro" ]] ; then + version_target="$major_prefix$major$minor_prefix$minor$micro_prefix$micro" + elif [[ $target == "nano" ]] ; then + version_target="$major_prefix$major$minor_prefix$minor$micro_prefix$micro$nano_prefix$nano" fi } @@ -1278,6 +2064,22 @@ bootstrap_cleanup() { unset bootstrap_load_settings_has unset bootstrap_prepare_build unset bootstrap_operation_build + unset bootstrap_operation_build_prepare_defaults + unset bootstrap_operation_build_prepare_defines + unset bootstrap_operation_build_prepare_flags + unset bootstrap_operation_build_prepare_headers + unset bootstrap_operation_build_prepare_libraries + unset bootstrap_operation_build_prepare_objects + unset bootstrap_operation_build_prepare_paths + unset bootstrap_operation_build_prepare_programs + unset bootstrap_operation_build_prepare_settings + unset bootstrap_operation_build_prepare_shared_static + unset bootstrap_operation_build_prepare_versions + unset bootstrap_operation_build_validate_build + unset bootstrap_operation_build_validate_paths + unset bootstrap_operation_build_validate_search + unset bootstrap_operation_build_validate_shared_static + unset bootstrap_operation_build_validate_sources unset bootstrap_operation_clean unset bootstrap_cleanup } diff --git a/level_0/f_account/data/build/settings b/level_0/f_account/data/build/settings index 0c334d9..62252e4 100644 --- a/level_0/f_account/data/build/settings +++ b/level_0/f_account/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library account.c private-account.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_account/data/build/settings-mocks b/level_0/f_account/data/build/settings-mocks index 7679420..11d9242 100644 --- a/level_0/f_account/data/build/settings-mocks +++ b/level_0/f_account/data/build/settings-mocks @@ -27,14 +27,9 @@ build_libraries_static build_sources_library account.c private-account.c ../../tests/unit/c/mock-account.c build_sources_library_shared build_sources_library_static -build_sources_program -build_sources_program_shared -build_sources_program_static build_sources_headers account.h account-common.h build_sources_headers_shared build_sources_headers_static -build_sources_script -build_sources_setting build_script yes build_shared yes build_static no @@ -44,10 +39,6 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static -path_program_script script -path_program_shared shared -path_program_static static -path_sources path_standard yes search_exclusive yes @@ -58,9 +49,6 @@ defines defines_library defines_library_shared defines_library_static -defines_program -defines_program_shared -defines_program_static defines_static defines_shared @@ -68,9 +56,6 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static -flags_program -fPIE -flags_program_shared -flags_program_static flags_shared flags_static diff --git a/level_0/f_capability/data/build/settings b/level_0/f_capability/data/build/settings index cff3888..c4dfddc 100644 --- a/level_0/f_capability/data/build/settings +++ b/level_0/f_capability/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc -lcap build_libraries-individual -lf_memory -lf_string -lf_type_array build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_staticx +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library capability.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -59,6 +72,9 @@ defines -D_libcap_legacy_only_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -69,6 +85,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_capability/data/build/settings-mocks b/level_0/f_capability/data/build/settings-mocks index 5c9ac99..ba98f02 100644 --- a/level_0/f_capability/data/build/settings-mocks +++ b/level_0/f_capability/data/build/settings-mocks @@ -32,9 +32,6 @@ build_libraries_static build_sources_library capability.c ../../tests/unit/c/mock-capability.c build_sources_library_shared build_sources_library_static -build_sources_program -build_sources_program_shared -build_sources_program_static build_sources_headers capability.h capability-common.h build_sources_headers_shared build_sources_headers_static @@ -49,10 +46,8 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static -path_program_script script -path_program_shared shared -path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -64,9 +59,6 @@ defines -D_libcap_legacy_only_ defines_library defines_library_shared defines_library_static -defines_program -defines_program_shared -defines_program_static defines_static defines_shared @@ -74,9 +66,6 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static -flags_program -fPIE -flags_program_shared -flags_program_static flags_shared flags_static diff --git a/level_0/f_color/data/build/settings b/level_0/f_color/data/build/settings index 83ffde8..df92741 100644 --- a/level_0/f_color/data/build/settings +++ b/level_0/f_color/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library color.c color-common.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_color/data/build/settings-mocks b/level_0/f_color/data/build/settings-mocks index 068a5ce..7d39c54 100644 --- a/level_0/f_color/data/build/settings-mocks +++ b/level_0/f_color/data/build/settings-mocks @@ -27,9 +27,6 @@ build_libraries_static build_sources_library color.c color-common.c ../../tests/unit/c/mock-color.c build_sources_library_shared build_sources_library_static -build_sources_program -build_sources_program_shared -build_sources_program_static build_sources_headers color.h color-common.h build_sources_headers_shared build_sources_headers_static @@ -44,10 +41,8 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static -path_program_script script -path_program_shared shared -path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,9 +53,6 @@ defines defines_library defines_library_shared defines_library_static -defines_program -defines_program_shared -defines_program_static defines_static defines_shared @@ -68,9 +60,6 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static -flags_program -fPIE -flags_program_shared -flags_program_static flags_shared flags_static diff --git a/level_0/f_console/data/build/settings b/level_0/f_console/data/build/settings index b809082..b26fdec 100644 --- a/level_0/f_console/data/build/settings +++ b/level_0/f_console/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library console.c console-common.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_control_group/data/build/settings b/level_0/f_control_group/data/build/settings index 51f0973..9a1c25a 100644 --- a/level_0/f_control_group/data/build/settings +++ b/level_0/f_control_group/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library control_group.c control_group-common.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_conversion/data/build/settings b/level_0/f_conversion/data/build/settings index 0923e71..7459748 100644 --- a/level_0/f_conversion/data/build/settings +++ b/level_0/f_conversion/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library conversion.c conversion-common.c private-conversion.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_conversion/data/build/settings-mocks b/level_0/f_conversion/data/build/settings-mocks index f5661d7..d95d0bb 100644 --- a/level_0/f_conversion/data/build/settings-mocks +++ b/level_0/f_conversion/data/build/settings-mocks @@ -27,9 +27,6 @@ build_libraries_static build_sources_library conversion.c conversion-common.c private-conversion.c ../../tests/unit/c/mock-conversion.c build_sources_library_shared build_sources_library_static -build_sources_program -build_sources_program_shared -build_sources_program_static build_sources_headers conversion.h conversion-common.h build_sources_headers_shared build_sources_headers_static @@ -44,10 +41,8 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static -path_program_script script -path_program_shared shared -path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,9 +53,6 @@ defines defines_library defines_library_shared defines_library_static -defines_program -defines_program_shared -defines_program_static defines_static defines_shared @@ -68,9 +60,6 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static -flags_program -fPIE -flags_program_shared -flags_program_static flags_shared flags_static diff --git a/level_0/f_directory/data/build/settings b/level_0/f_directory/data/build/settings index 91f14da..323b372 100644 --- a/level_0/f_directory/data/build/settings +++ b/level_0/f_directory/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library directory.c private-directory.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_environment/data/build/settings b/level_0/f_environment/data/build/settings index 40796dc..6b3c456 100644 --- a/level_0/f_environment/data/build/settings +++ b/level_0/f_environment/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library environment.c private-environment.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_execute/data/build/settings b/level_0/f_execute/data/build/settings index 81d9959..f0a2504 100644 --- a/level_0/f_execute/data/build/settings +++ b/level_0/f_execute/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library execute.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_file/data/build/settings b/level_0/f_file/data/build/settings index e1c10c1..2e2014b 100644 --- a/level_0/f_file/data/build/settings +++ b/level_0/f_file/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library file.c file-common.c private-file.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_fss/data/build/settings b/level_0/f_fss/data/build/settings index 28f0a01..8217352 100644 --- a/level_0/f_fss/data/build/settings +++ b/level_0/f_fss/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss.c private-fss.c fss-common.c fss_named.c fss_nest.c fss_set.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_iki/data/build/settings b/level_0/f_iki/data/build/settings index abc0ee3..1ef2b75 100644 --- a/level_0/f_iki/data/build/settings +++ b/level_0/f_iki/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library iki.c iki-common.c private-iki.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_limit/data/build/settings b/level_0/f_limit/data/build/settings index 591e151..11f441e 100644 --- a/level_0/f_limit/data/build/settings +++ b/level_0/f_limit/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library limit.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_memory/data/build/settings b/level_0/f_memory/data/build/settings index a5e9ffe..5877e85 100644 --- a/level_0/f_memory/data/build/settings +++ b/level_0/f_memory/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library memory.c memory_structure.c private-memory.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_path/c/path.c b/level_0/f_path/c/path.c index f3bcb6f..f2dc523 100644 --- a/level_0/f_path/c/path.c +++ b/level_0/f_path/c/path.c @@ -153,7 +153,7 @@ extern "C" { directory->string[directory->used++] = f_path_separator_s.string[0]; } - directory->string[directory->used++] = 0; + directory->string[directory->used] = 0; return F_none; } diff --git a/level_0/f_path/data/build/settings b/level_0/f_path/data/build/settings index 4c7ce68..b134b34 100644 --- a/level_0/f_path/data/build/settings +++ b/level_0/f_path/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library path.c path-common.c private-path.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_pipe/data/build/settings b/level_0/f_pipe/data/build/settings index b4ff9e0..aae882d 100644 --- a/level_0/f_pipe/data/build/settings +++ b/level_0/f_pipe/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library pipe.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_print/data/build/settings b/level_0/f_print/data/build/settings index 7ebb4c1..e45c6d6 100644 --- a/level_0/f_print/data/build/settings +++ b/level_0/f_print/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library print.c print_to.c print-common.c private-print.c private-print_to.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_serialize/data/build/settings b/level_0/f_serialize/data/build/settings index 81d95fa..39bf67d 100644 --- a/level_0/f_serialize/data/build/settings +++ b/level_0/f_serialize/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library serialize.c serialize-common.c private-serialize.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_signal/data/build/settings b/level_0/f_signal/data/build/settings index a9a9de2..75b3ccc 100644 --- a/level_0/f_signal/data/build/settings +++ b/level_0/f_signal/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library signal.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_socket/data/build/settings b/level_0/f_socket/data/build/settings index 65f944f..8429973 100644 --- a/level_0/f_socket/data/build/settings +++ b/level_0/f_socket/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library socket.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_status/data/build/settings b/level_0/f_status/data/build/settings index f8df027..3b92f85 100644 --- a/level_0/f_status/data/build/settings +++ b/level_0/f_status/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_status_string/data/build/settings b/level_0/f_status_string/data/build/settings index a516d53..51f97a4 100644 --- a/level_0/f_status_string/data/build/settings +++ b/level_0/f_status_string/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library status_string.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_string/data/build/settings b/level_0/f_string/data/build/settings index f2c7e90..44f81da 100644 --- a/level_0/f_string/data/build/settings +++ b/level_0/f_string/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library string.c string-common.c private-string.c string_dynamic.c string_map.c string_quantity.c string_range.c string_triple.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_thread/data/build/settings b/level_0/f_thread/data/build/settings index c4492b0..ed8750a 100644 --- a/level_0/f_thread/data/build/settings +++ b/level_0/f_thread/data/build/settings @@ -24,9 +24,18 @@ build_libraries -pthread -lc build_libraries-individual -lf_memory -lf_string build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library thread.c private-thread.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_type/data/build/settings b/level_0/f_type/data/build/settings index 074c8f8..4c9ee36 100644 --- a/level_0/f_type/data/build/settings +++ b/level_0/f_type/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_type_array/data/build/settings b/level_0/f_type_array/data/build/settings index 3e3d6b6..1595906 100644 --- a/level_0/f_type_array/data/build/settings +++ b/level_0/f_type_array/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library type_array.c private-type_array.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_0/f_utf/data/build/settings b/level_0/f_utf/data/build/settings index 8f9f0f8..2e700f8 100644 --- a/level_0/f_utf/data/build/settings +++ b/level_0/f_utf/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library utf.c utf-common.c utf_dynamic.c utf_map.c utf_string.c utf_triple.c private-utf.c private-utf-is_unassigned.c private-utf_string.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_1/fl_control_group/data/build/settings b/level_1/fl_control_group/data/build/settings index 5b2b797..19c591f 100644 --- a/level_1/fl_control_group/data/build/settings +++ b/level_1/fl_control_group/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_control_group -lf_file -lf_memory -lf_string build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library control_group.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_1/fl_conversion/data/build/settings b/level_1/fl_conversion/data/build/settings index bbf8c89..60e5166 100644 --- a/level_1/fl_conversion/data/build/settings +++ b/level_1/fl_conversion/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_conversion -lf_memory -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library conversion.c private-conversion.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_1/fl_directory/data/build/settings b/level_1/fl_directory/data/build/settings index 90886f4..cad2924 100644 --- a/level_1/fl_directory/data/build/settings +++ b/level_1/fl_directory/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_directory -lf_file -lf_memory -lf_path -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library directory.c private-directory.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_1/fl_environment/data/build/settings b/level_1/fl_environment/data/build/settings index 79de7e2..217fb5b 100644 --- a/level_1/fl_environment/data/build/settings +++ b/level_1/fl_environment/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_environment -lf_memory -lf_path -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library environment.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_1/fl_execute/data/build/settings b/level_1/fl_execute/data/build/settings index 5d8f187..214fd1f 100644 --- a/level_1/fl_execute/data/build/settings +++ b/level_1/fl_execute/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc -lcap build_libraries-individual -lf_capability -lf_execute -lf_limit -lf_memory -lf_signal -lf_string -lf_type_array build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -59,6 +72,9 @@ defines -D_libcap_legacy_only_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -69,6 +85,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_1/fl_fss/data/build/settings b/level_1/fl_fss/data/build/settings index d51fdf9..faf9f86 100644 --- a/level_1/fl_fss/data/build/settings +++ b/level_1/fl_fss/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_file -lf_fss -lf_memory -lf_string -lf_type_array -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_1/fl_iki/data/build/settings b/level_1/fl_iki/data/build/settings index c5a694b..d04429e 100644 --- a/level_1/fl_iki/data/build/settings +++ b/level_1/fl_iki/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_iki -lf_memory -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library iki.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_1/fl_print/c/private-print.c b/level_1/fl_print/c/private-print.c index f7df626..284ff89 100644 --- a/level_1/fl_print/c/private-print.c +++ b/level_1/fl_print/c/private-print.c @@ -974,7 +974,7 @@ extern "C" { precision = va_arg(*ap, int); } - // @fixme precision and with can be used togethor, see: "'%10.2f'". + // @fixme precision and width can be used together, see: "'%10.2f'". if (flag & F_print_format_flag_width_d) { conversion_data.width = width; } diff --git a/level_1/fl_print/data/build/settings b/level_1/fl_print/data/build/settings index 7def772..44266e7 100644 --- a/level_1/fl_print/data/build/settings +++ b/level_1/fl_print/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_color -lf_conversion -lf_file -lf_memory -lf_print -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library print.c print-common.c private-print.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_1/fl_signal/data/build/settings b/level_1/fl_signal/data/build/settings index 0f39de9..23a28e8 100644 --- a/level_1/fl_signal/data/build/settings +++ b/level_1/fl_signal/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_signal build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library signal.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_1/fl_string/data/build/settings b/level_1/fl_string/data/build/settings index 6ac92ca..d214ca9 100644 --- a/level_1/fl_string/data/build/settings +++ b/level_1/fl_string/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library string.c private-string.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_1/fl_utf/data/build/settings b/level_1/fl_utf/data/build/settings index b517f59..accb21b 100644 --- a/level_1/fl_utf/data/build/settings +++ b/level_1/fl_utf/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library utf.c private-utf.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_1/fl_utf_file/data/build/settings b/level_1/fl_utf_file/data/build/settings index 24620a2..6a2f03f 100644 --- a/level_1/fl_utf_file/data/build/settings +++ b/level_1/fl_utf_file/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_file -lf_memory -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library utf_file.c private-utf_file.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_2/fll_control_group/data/build/settings b/level_2/fll_control_group/data/build/settings index d172acd..b136e3b 100644 --- a/level_2/fll_control_group/data/build/settings +++ b/level_2/fll_control_group/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lfl_control_group -lfl_directory -lf_control_group -lf_directory -lf_file -lf_memory -lf_path -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library control_group.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_2/fll_error/data/build/settings b/level_2/fll_error/data/build/settings index e074b4f..65acc27 100644 --- a/level_2/fll_error/data/build/settings +++ b/level_2/fll_error/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lfl_print -lf_color -lf_console -lf_conversion -lf_file -lf_memory -lf_print -lf_string -lf_type_array -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library error.c error-common.c private-error.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_2/fll_execute/data/build/settings b/level_2/fll_execute/data/build/settings index 5d44187..1369fa4 100644 --- a/level_2/fll_execute/data/build/settings +++ b/level_2/fll_execute/data/build/settings @@ -25,9 +25,18 @@ build_libraries-individual -lfl_control_group -lfl_environment -lf_account -lf_c build_libraries-individual_threadless -lfl_control_group -lfl_environment -lf_account -lf_capability -lf_control_group -lf_environment -lf_execute -lf_file -lf_limit -lf_memory -lf_path -lf_signal -lf_string -lf_type_array -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library execute.c private-execute.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -45,10 +54,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines-individual_threadless -D_di_pthread_support_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -72,12 +88,9 @@ flags-individual -pthread flags_library -fPIC flags_library_shared flags_library_static -flags_program -fPIE -flags_program_shared -flags_program_static -flags_library -fPIC -flags_library_shared -flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_2/fll_file/data/build/settings b/level_2/fll_file/data/build/settings index 07c6e1e..6ffbc4a 100644 --- a/level_2/fll_file/data/build/settings +++ b/level_2/fll_file/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lfl_directory -lf_color -lf_directory -lf_file -lf_memory -lf_path -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library file.c private-file.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_2/fll_fss/data/build/settings b/level_2/fll_fss/data/build/settings index 8e05237..17d1c93 100644 --- a/level_2/fll_fss/data/build/settings +++ b/level_2/fll_fss/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lfl_conversion -lfl_fss -lfl_string -lf_conversion -lf_file -lf_fss -lf_memory -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c fss_payload.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_2/fll_fss_status_string/data/build/settings b/level_2/fll_fss_status_string/data/build/settings index b4fc687..1472562 100644 --- a/level_2/fll_fss_status_string/data/build/settings +++ b/level_2/fll_fss_status_string/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lfl_string -lf_conversion -lf_fss -lf_memory -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss_status_string.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_2/fll_iki/data/build/settings b/level_2/fll_iki/data/build/settings index 712aa59..0270c62 100644 --- a/level_2/fll_iki/data/build/settings +++ b/level_2/fll_iki/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lfl_iki -lf_iki -lf_memory -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library iki.c private-iki.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_2/fll_path/data/build/settings b/level_2/fll_path/data/build/settings index 1b0c135..6db7e83 100644 --- a/level_2/fll_path/data/build/settings +++ b/level_2/fll_path/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_path -lf_string build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library path.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_2/fll_print/data/build/settings b/level_2/fll_print/data/build/settings index ae7e999..ccd7371 100644 --- a/level_2/fll_print/data/build/settings +++ b/level_2/fll_print/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lfl_print -lf_color -lf_conversion -lf_file -lf_memory -lf_print -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library print.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_2/fll_program/data/build/settings b/level_2/fll_program/data/build/settings index 1ad23b6..4b78cf2 100644 --- a/level_2/fll_program/data/build/settings +++ b/level_2/fll_program/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lfl_print -lfl_string -lf_color -lf_console -lf_conversion -lf_file -lf_memory -lf_print -lf_signal -lf_string -lf_type_array -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library program.c program-common.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_2/fll_status_string/data/build/settings b/level_2/fll_status_string/data/build/settings index 769a59b..bf881bf 100644 --- a/level_2/fll_status_string/data/build/settings +++ b/level_2/fll_status_string/data/build/settings @@ -24,9 +24,18 @@ build_libraries -lc build_libraries-individual -lfl_string -lf_conversion -lf_memory -lf_status_string -lf_string -lf_utf build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library status_string.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static @@ -44,10 +53,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -58,6 +71,9 @@ defines defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -68,6 +84,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/byte_dump/data/build/settings b/level_3/byte_dump/data/build/settings index d62b208..d0e7f30 100644 --- a/level_3/byte_dump/data/build/settings +++ b/level_3/byte_dump/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library byte_dump.c common.c private-common.c private-byte_dump.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/control/data/build/settings b/level_3/control/data/build/settings index 58a698a..e389194 100644 --- a/level_3/control/data/build/settings +++ b/level_3/control/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library control.c common.c private-common.c private-control.c private-print.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/controller/c/rule/private-rule.c b/level_3/controller/c/rule/private-rule.c index 36d71a1..b20fec4 100644 --- a/level_3/controller/c/rule/private-rule.c +++ b/level_3/controller/c/rule/private-rule.c @@ -5752,6 +5752,7 @@ extern "C" { } } else { + // @fixme change this to handle UTF-8 characters (cannot use f_print_character_safely() as it is not UTF-8 safe as-is). f_print_character_safely(parameter->string[k], main->output.to.stream); } diff --git a/level_3/controller/data/build/settings b/level_3/controller/data/build/settings index 7717b84..d9004d8 100644 --- a/level_3/controller/data/build/settings +++ b/level_3/controller/data/build/settings @@ -28,6 +28,12 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library controller.c common.c build_sources_library common/private-common.c common/private-cache.c common/private-control.c common/private-entry.c common/private-lock.c common/private-process.c common/private-rule.c common/private-setting.c common/private-task.c common/private-thread.c build_sources_library control/private-control.c control/private-control_print.c @@ -40,6 +46,9 @@ build_sources_library lock/private-lock.c lock/private-lock_print.c build_sources_library thread/private-thread.c thread/private-thread_control.c thread/private-thread_entry.c thread/private-thread_process.c thread/private-thread_rule.c thread/private-thread_signal.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -57,10 +66,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -73,6 +86,9 @@ defines-as_init -D_controller_as_init_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -83,6 +99,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -pthread -Wno-logical-not-parenth flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fake/c/common.c b/level_3/fake/c/common.c index d681c13..9ee2b2b 100644 --- a/level_3/fake/c/common.c +++ b/level_3/fake/c/common.c @@ -133,6 +133,9 @@ extern "C" { f_string_dynamic_resize(0, &main->path_build_libraries_shared); f_string_dynamic_resize(0, &main->path_build_libraries_static); f_string_dynamic_resize(0, &main->path_build_objects); + f_string_dynamic_resize(0, &main->path_build_objects_script); + f_string_dynamic_resize(0, &main->path_build_objects_shared); + f_string_dynamic_resize(0, &main->path_build_objects_static); f_string_dynamic_resize(0, &main->path_build_programs); f_string_dynamic_resize(0, &main->path_build_programs_script); f_string_dynamic_resize(0, &main->path_build_programs_shared); @@ -156,6 +159,12 @@ extern "C" { f_string_dynamic_resize(0, &main->path_sources_cpp); f_string_dynamic_resize(0, &main->path_sources_script); + f_string_dynamic_resize(0, &main->path_sources_object); + f_string_dynamic_resize(0, &main->path_sources_object_bash); + f_string_dynamic_resize(0, &main->path_sources_object_c); + f_string_dynamic_resize(0, &main->path_sources_object_cpp); + f_string_dynamic_resize(0, &main->path_sources_object_script); + f_string_dynamic_resize(0, &main->path_work); f_string_dynamic_resize(0, &main->path_work_includes); f_string_dynamic_resize(0, &main->path_work_libraries); diff --git a/level_3/fake/c/common.h b/level_3/fake/c/common.h index 3d15dea..0088f4a 100644 --- a/level_3/fake/c/common.h +++ b/level_3/fake/c/common.h @@ -476,9 +476,7 @@ extern "C" { mode_t umask; int child; - f_string_dynamics_t define; f_string_dynamic_t fakefile; - f_string_dynamics_t mode; f_string_dynamic_t process; f_string_dynamic_t settings; @@ -490,6 +488,9 @@ extern "C" { f_string_dynamic_t path_build_libraries_shared; f_string_dynamic_t path_build_libraries_static; f_string_dynamic_t path_build_objects; + f_string_dynamic_t path_build_objects_script; + f_string_dynamic_t path_build_objects_shared; + f_string_dynamic_t path_build_objects_static; f_string_dynamic_t path_build_programs; f_string_dynamic_t path_build_programs_script; f_string_dynamic_t path_build_programs_shared; @@ -511,6 +512,12 @@ extern "C" { f_string_dynamic_t path_sources_cpp; f_string_dynamic_t path_sources_script; + f_string_dynamic_t path_sources_object; + f_string_dynamic_t path_sources_object_bash; + f_string_dynamic_t path_sources_object_c; + f_string_dynamic_t path_sources_object_cpp; + f_string_dynamic_t path_sources_object_script; + f_string_dynamic_t path_work; f_string_dynamic_t path_work_includes; f_string_dynamic_t path_work_libraries; @@ -531,6 +538,9 @@ extern "C" { f_string_dynamic_t file_documents_readme; + f_string_dynamics_t define; + f_string_dynamics_t mode; + f_color_context_t context; } fake_main_t; @@ -546,9 +556,7 @@ extern "C" { 0, \ 0, \ 0, \ - f_string_dynamics_t_initialize, \ f_string_dynamic_t_initialize, \ - f_string_dynamics_t_initialize, \ f_string_dynamic_t_initialize, \ f_string_dynamic_t_initialize, \ f_string_dynamic_t_initialize, \ @@ -592,6 +600,16 @@ 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_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_dynamic_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ f_color_context_t_initialize, \ } #endif // _di_fake_main_t_ diff --git a/level_3/fake/c/private-build-library.c b/level_3/fake/c/private-build-library.c index bf48b59..9f94f66 100644 --- a/level_3/fake/c/private-build-library.c +++ b/level_3/fake/c/private-build-library.c @@ -11,7 +11,7 @@ extern "C" { #endif #ifndef _di_fake_build_library_script_ - int fake_build_library_script(fake_main_t * const main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) { + int fake_build_library_script(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) { if (F_status_is_error(*status) || f_file_exists(file_stage) == F_true || *status == F_child) return main->child; @@ -22,10 +22,10 @@ extern "C" { #endif // _di_fake_build_library_script_ #ifndef _di_fake_build_library_shared_ - int fake_build_library_shared(fake_main_t * const main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) { + int fake_build_library_shared(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) { if (F_status_is_error(*status) || f_file_exists(file_stage) == F_true || *status == F_child) return main->child; - if (!data_build.setting.build_sources_library.used) return 0; + if (!data_build->setting.build_sources_library.used && !data_build->setting.build_sources_library_shared.used) return 0; if (main->output.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%r%[Compiling shared library.%]%r", main->output.to.stream, f_string_eol_s, main->context.set.important, main->context.set.important, f_string_eol_s); @@ -33,58 +33,24 @@ extern "C" { f_string_dynamics_t arguments = f_string_dynamics_t_initialize; - { - const f_string_static_t *path_sources = &main->path_sources; - - if (data_build.setting.path_standard) { - path_sources = &main->path_sources_c; - - if (data_build.setting.build_language == fake_build_language_type_cpp_e) { - path_sources = &main->path_sources_cpp; - } - } - else if (main->parameters.array[fake_parameter_path_sources_e].result != f_console_result_additional_e) { - path_sources = &data_build.setting.path_sources; - } - - f_array_length_t i = 0; - f_array_length_t j = 0; - f_string_static_t source = f_string_static_t_initialize; - - const f_string_dynamics_t *sources[2] = { - &data_build.setting.build_sources_library, - &data_build.setting.build_sources_library_shared, - }; - - for (; i < 2; ++i) { - - for (j = 0; j < sources[i]->used; ++j) { - - if (!sources[i]->array[j].used) continue; - - source.used = path_sources->used + sources[i]->array[j].used; + *status = fake_build_objects_add(main, data_build, &main->path_build_objects_shared, &data_build->setting.build_objects_library, &data_build->setting.build_objects_library_shared, &arguments); - char source_string[source.used + 1]; - source.string = source_string; - source_string[source.used] = 0; + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "fake_build_objects_add", F_true); - memcpy(source_string, path_sources->string, path_sources->used); - memcpy(source_string + path_sources->used, sources[i]->array[j].string, sources[i]->array[j].used); + f_string_dynamics_resize(0, &arguments); - *status = fll_execute_arguments_add(source, &arguments); - if (F_status_is_error(*status)) break; - } // for + return 0; + } - if (F_status_is_error(*status)) break; - } // for + *status = fake_build_sources_add(main, data_build, &data_build->setting.build_sources_library, &data_build->setting.build_sources_library_shared, &arguments); - if (F_status_is_error(*status)) { - fll_error_print(main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "fake_build_sources_add", F_true); - f_string_dynamics_resize(0, &arguments); + f_string_dynamics_resize(0, &arguments); - return 0; - } + return 0; } f_string_static_t parameter_file_name = f_string_static_t_initialize; @@ -95,22 +61,22 @@ extern "C" { f_array_length_t strings_length = 1; - parameter_file_name.used = fake_build_parameter_library_name_prefix_s.used + data_build.setting.build_name.used + fake_build_parameter_library_name_suffix_shared_s.used; + parameter_file_name.used = fake_build_parameter_library_name_prefix_s.used + data_build->setting.build_name.used + fake_build_parameter_library_name_suffix_shared_s.used; - if (data_build.setting.version_major.used) { - parameter_file_name_major.used = parameter_file_name.used + data_build.setting.version_major_prefix.used + data_build.setting.version_major.used; + if (data_build->setting.version_major.used) { + parameter_file_name_major.used = parameter_file_name.used + data_build->setting.version_major_prefix.used + data_build->setting.version_major.used; strings_length = 2; - if (data_build.setting.version_minor.used) { - parameter_file_name_minor.used = parameter_file_name_major.used + data_build.setting.version_minor_prefix.used + data_build.setting.version_minor.used; + if (data_build->setting.version_minor.used) { + parameter_file_name_minor.used = parameter_file_name_major.used + data_build->setting.version_minor_prefix.used + data_build->setting.version_minor.used; strings_length = 3; - if (data_build.setting.version_micro.used) { - parameter_file_name_micro.used = parameter_file_name_minor.used + data_build.setting.version_micro_prefix.used + data_build.setting.version_micro.used; + if (data_build->setting.version_micro.used) { + parameter_file_name_micro.used = parameter_file_name_minor.used + data_build->setting.version_micro_prefix.used + data_build->setting.version_micro.used; strings_length = 4; - if (data_build.setting.version_nano.used) { - parameter_file_name_nano.used = parameter_file_name_micro.used + data_build.setting.version_nano_prefix.used + data_build.setting.version_nano.used; + if (data_build->setting.version_nano.used) { + parameter_file_name_nano.used = parameter_file_name_micro.used + data_build->setting.version_nano_prefix.used + data_build->setting.version_nano.used; strings_length = 5; } } @@ -129,106 +95,121 @@ extern "C" { parameter_file_name_micro.string = parameter_file_name_micro_string; parameter_file_name_nano.string = parameter_file_name_nano_string; - parameter_file_name_string[parameter_file_name.used] = 0; - parameter_file_name_major_string[parameter_file_name_major.used] = 0; - parameter_file_name_minor_string[parameter_file_name_minor.used] = 0; - parameter_file_name_micro_string[parameter_file_name_micro.used] = 0; - parameter_file_name_nano_string[parameter_file_name_nano.used] = 0; - - f_string_t strings[5] = { - parameter_file_name_string, - parameter_file_name_major_string, - parameter_file_name_minor_string, - parameter_file_name_micro_string, - parameter_file_name_nano_string, + parameter_file_name.used = 0; + parameter_file_name_major.used = 0; + parameter_file_name_minor.used = 0; + parameter_file_name_micro.used = 0; + parameter_file_name_nano.used = 0; + + f_string_static_t *strings[5] = { + ¶meter_file_name, + ¶meter_file_name_major, + ¶meter_file_name_minor, + ¶meter_file_name_micro, + ¶meter_file_name_nano, }; { - f_array_length_t offset = 0; - uint8_t i = 0; for (; i < strings_length; ++i) { - memcpy(strings[i], fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used); - } // for - offset = fake_build_parameter_library_name_prefix_s.used; + memcpy(strings[i]->string, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used); - for (i = 0; i < strings_length; ++i) { - memcpy(strings[i] + offset, data_build.setting.build_name.string, data_build.setting.build_name.used); + strings[i]->used += fake_build_parameter_library_name_prefix_s.used; } // for - offset += data_build.setting.build_name.used; - for (i = 0; i < strings_length; ++i) { - memcpy(strings[i] + offset, fake_build_parameter_library_name_suffix_shared_s.string, fake_build_parameter_library_name_suffix_shared_s.used); + + memcpy(strings[i]->string + strings[i]->used, data_build->setting.build_name.string, data_build->setting.build_name.used); + + strings[i]->used += data_build->setting.build_name.used; } // for - offset += fake_build_parameter_library_name_suffix_shared_s.used; + for (i = 0; i < strings_length; ++i) { - if (parameter_file_name_major.used) { - if (data_build.setting.version_major_prefix.used) { + memcpy(strings[i]->string + strings[i]->used, fake_build_parameter_library_name_suffix_shared_s.string, fake_build_parameter_library_name_suffix_shared_s.used); + + strings[i]->used += fake_build_parameter_library_name_suffix_shared_s.used; + } // for + + if (data_build->setting.version_major.used) { + if (data_build->setting.version_major_prefix.used) { for (i = 1; i < strings_length; ++i) { - memcpy(strings[i] + offset, data_build.setting.version_major_prefix.string, data_build.setting.version_major_prefix.used); - } // for - offset += data_build.setting.version_major_prefix.used; + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major_prefix.string, data_build->setting.version_major_prefix.used); + + strings[i]->used += data_build->setting.version_major_prefix.used; + } // for } for (i = 1; i < strings_length; ++i) { - memcpy(strings[i] + offset, data_build.setting.version_major.string, data_build.setting.version_major.used); - } // for - offset += data_build.setting.version_major.used; + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major.string, data_build->setting.version_major.used); + + strings[i]->used += data_build->setting.version_major.used; + } // for - if (parameter_file_name_minor.used) { - if (data_build.setting.version_minor_prefix.used) { + if (data_build->setting.version_minor.used) { + if (data_build->setting.version_minor_prefix.used) { for (i = 2; i < strings_length; ++i) { - memcpy(strings[i] + offset, data_build.setting.version_minor_prefix.string, data_build.setting.version_minor_prefix.used); - } // for - offset += data_build.setting.version_minor_prefix.used; + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor_prefix.string, data_build->setting.version_minor_prefix.used); + + strings[i]->used += data_build->setting.version_minor_prefix.used; + } // for } for (i = 2; i < strings_length; ++i) { - memcpy(strings[i] + offset, data_build.setting.version_minor.string, data_build.setting.version_minor.used); - } // for - offset += data_build.setting.version_minor.used; + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor.string, data_build->setting.version_minor.used); + + strings[i]->used += data_build->setting.version_minor.used; + } // for - if (parameter_file_name_micro.used) { - if (data_build.setting.version_micro_prefix.used) { + if (data_build->setting.version_micro.used) { + if (data_build->setting.version_micro_prefix.used) { for (i = 3; i < strings_length; ++i) { - memcpy(strings[i] + offset, data_build.setting.version_micro_prefix.string, data_build.setting.version_micro_prefix.used); - } // for - offset += data_build.setting.version_micro_prefix.used; + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro_prefix.string, data_build->setting.version_micro_prefix.used); + + strings[i]->used += data_build->setting.version_micro_prefix.used; + } // for } for (i = 3; i < strings_length; ++i) { - memcpy(strings[i] + offset, data_build.setting.version_micro.string, data_build.setting.version_micro.used); - } // for - offset += data_build.setting.version_micro.used; + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro.string, data_build->setting.version_micro.used); + + strings[i]->used += data_build->setting.version_micro.used; + } // for - if (parameter_file_name_nano.used) { - if (data_build.setting.version_nano_prefix.used) { + if (data_build->setting.version_nano.used) { + if (data_build->setting.version_nano_prefix.used) { for (i = 4; i < strings_length; ++i) { - memcpy(strings[i] + offset, data_build.setting.version_nano_prefix.string, data_build.setting.version_nano_prefix.used); - } // for - offset += data_build.setting.version_nano_prefix.used; + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano_prefix.string, data_build->setting.version_nano_prefix.used); + + strings[i]->used += data_build->setting.version_nano_prefix.used; + } // for } for (i = 4; i < strings_length; ++i) { - memcpy(strings[i] + offset, data_build.setting.version_nano.string, data_build.setting.version_nano.used); - } // for - offset += data_build.setting.version_nano.used; + memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano.string, data_build->setting.version_nano.used); + + strings[i]->used += data_build->setting.version_nano.used; + } // for } } } } + + parameter_file_name_string[parameter_file_name.used] = 0; + parameter_file_name_major_string[parameter_file_name_major.used] = 0; + parameter_file_name_minor_string[parameter_file_name_minor.used] = 0; + parameter_file_name_micro_string[parameter_file_name_micro.used] = 0; + parameter_file_name_nano_string[parameter_file_name_nano.used] = 0; } { @@ -238,29 +219,29 @@ extern "C" { parameter_file_path.used = main->path_build_libraries_shared.used; parameter_linker.used = fake_build_parameter_library_shared_prefix_s.used; - if (data_build.setting.version_file == fake_build_version_type_major_e) { + if (data_build->setting.version_file == fake_build_version_type_major_e) { parameter_file_path.used += parameter_file_name_major.used; } - else if (data_build.setting.version_file == fake_build_version_type_minor_e) { + else if (data_build->setting.version_file == fake_build_version_type_minor_e) { parameter_file_path.used += parameter_file_name_minor.used; } - else if (data_build.setting.version_file == fake_build_version_type_micro_e) { + else if (data_build->setting.version_file == fake_build_version_type_micro_e) { parameter_file_path.used += parameter_file_name_micro.used; } - else if (data_build.setting.version_file == fake_build_version_type_nano_e) { + else if (data_build->setting.version_file == fake_build_version_type_nano_e) { parameter_file_path.used += parameter_file_name_nano.used; } - if (data_build.setting.version_target == fake_build_version_type_major_e) { + if (data_build->setting.version_target == fake_build_version_type_major_e) { parameter_linker.used += parameter_file_name_major.used; } - else if (data_build.setting.version_target == fake_build_version_type_minor_e) { + else if (data_build->setting.version_target == fake_build_version_type_minor_e) { parameter_linker.used += parameter_file_name_minor.used; } - else if (data_build.setting.version_target == fake_build_version_type_micro_e) { + else if (data_build->setting.version_target == fake_build_version_type_micro_e) { parameter_linker.used += parameter_file_name_micro.used; } - else if (data_build.setting.version_target == fake_build_version_type_nano_e) { + else if (data_build->setting.version_target == fake_build_version_type_nano_e) { parameter_linker.used += parameter_file_name_nano.used; } @@ -276,29 +257,29 @@ extern "C" { memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used); memcpy(parameter_linker_string, fake_build_parameter_library_shared_prefix_s.string, fake_build_parameter_library_shared_prefix_s.used); - if (data_build.setting.version_file == fake_build_version_type_major_e) { + if (data_build->setting.version_file == fake_build_version_type_major_e) { memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_major_string, parameter_file_name_major.used); } - else if (data_build.setting.version_file == fake_build_version_type_minor_e) { + else if (data_build->setting.version_file == fake_build_version_type_minor_e) { memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_minor_string, parameter_file_name_minor.used); } - else if (data_build.setting.version_file == fake_build_version_type_micro_e) { + else if (data_build->setting.version_file == fake_build_version_type_micro_e) { memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_micro_string, parameter_file_name_micro.used); } - else if (data_build.setting.version_file == fake_build_version_type_nano_e) { + else if (data_build->setting.version_file == fake_build_version_type_nano_e) { memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_nano_string, parameter_file_name_nano.used); } - if (data_build.setting.version_target == fake_build_version_type_major_e) { + if (data_build->setting.version_target == fake_build_version_type_major_e) { memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_major_string, parameter_file_name_major.used); } - else if (data_build.setting.version_target == fake_build_version_type_minor_e) { + else if (data_build->setting.version_target == fake_build_version_type_minor_e) { memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_minor_string, parameter_file_name_minor.used); } - else if (data_build.setting.version_target == fake_build_version_type_micro_e) { + else if (data_build->setting.version_target == fake_build_version_type_micro_e) { memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_micro_string, parameter_file_name_micro.used); } - else if (data_build.setting.version_target == fake_build_version_type_nano_e) { + else if (data_build->setting.version_target == fake_build_version_type_nano_e) { memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_nano_string, parameter_file_name_nano.used); } @@ -317,7 +298,7 @@ extern "C" { if (F_status_is_error(*status)) break; } // for - fake_build_arguments_standard_add(main, data_build, F_true, F_true, &arguments, status); + fake_build_arguments_standard_add(main, data_build, F_true, fake_build_type_library_e, &arguments, status); if (F_status_is_error(*status)) { fll_error_print(main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); @@ -329,7 +310,7 @@ extern "C" { } { - const int result = fake_execute(main, data_build.environment, data_build.setting.build_compiler, arguments, status); + const int result = fake_execute(main, data_build->environment, data_build->setting.build_compiler, arguments, status); f_string_dynamics_resize(0, &arguments); @@ -366,7 +347,7 @@ extern "C" { } } - if (data_build.setting.version_file != fake_build_version_type_major_e && parameter_file_name_major.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; { @@ -397,7 +378,7 @@ extern "C" { } } - 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_minor_e && parameter_file_name_minor.used) { { parameter_file_path.used = main->path_build_libraries_shared.used + parameter_file_name_minor.used; @@ -426,7 +407,7 @@ extern "C" { } } - if (data_build.setting.version_file != fake_build_version_type_micro_e && parameter_file_name_micro.used) { + if (data_build->setting.version_file != fake_build_version_type_micro_e && parameter_file_name_micro.used) { parameter_file_path.used = main->path_build_libraries_shared.used + parameter_file_name_micro.used; char parameter_file_path_string[parameter_file_path.used + 1]; @@ -463,10 +444,10 @@ extern "C" { #endif // _di_fake_build_library_shared_ #ifndef _di_fake_build_library_static_ - int fake_build_library_static(fake_main_t * const main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) { + int fake_build_library_static(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) { if (F_status_is_error(*status) || f_file_exists(file_stage) == F_true || *status == F_child) return main->child; - if (!data_build.setting.build_sources_library.used) return 0; + if (!data_build->setting.build_sources_library.used && !data_build->setting.build_sources_library_static.used) return 0; if (main->output.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%r%[Compiling static library.%]%r", main->output.to.stream, f_string_eol_s, main->context.set.important, main->context.set.important, f_string_eol_s); @@ -478,23 +459,22 @@ extern "C" { f_array_length_t i = 0; - for (; i < data_build.setting.build_indexer_arguments.used; ++i) { + for (; i < data_build->setting.build_indexer_arguments.used; ++i) { - if (!data_build.setting.build_indexer_arguments.array[i].used) continue; + if (!data_build->setting.build_indexer_arguments.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.build_indexer_arguments.array[i], &arguments); + *status = fll_execute_arguments_add(data_build->setting.build_indexer_arguments.array[i], &arguments); if (F_status_is_error(*status)) break; } // for if (F_status_is_error_not(*status)) { f_string_static_t destination = f_string_static_t_initialize; destination.used = main->path_build_libraries_static.used + fake_build_parameter_library_name_prefix_s.used; - destination.used += data_build.setting.build_name.used + fake_build_parameter_library_name_suffix_static_s.used; + destination.used += data_build->setting.build_name.used + fake_build_parameter_library_name_suffix_static_s.used; char destination_string[destination.used + 1]; destination.string = destination_string; destination_string[destination.used] = 0; - destination.used = 0; memcpy(destination_string, main->path_build_libraries_static.string, main->path_build_libraries_static.used); @@ -503,8 +483,8 @@ extern "C" { memcpy(destination_string + destination.used, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used); destination.used += fake_build_parameter_library_name_prefix_s.used; - memcpy(destination_string + destination.used, data_build.setting.build_name.string, data_build.setting.build_name.used); - destination.used += data_build.setting.build_name.used; + memcpy(destination_string + destination.used, data_build->setting.build_name.string, data_build->setting.build_name.used); + destination.used += data_build->setting.build_name.used; memcpy(destination_string + destination.used, fake_build_parameter_library_name_suffix_static_s.string, fake_build_parameter_library_name_suffix_static_s.used); destination.used += fake_build_parameter_library_name_suffix_static_s.used; @@ -517,8 +497,8 @@ extern "C" { f_array_length_t j = 0; const f_string_dynamics_t *sources[2] = { - &data_build.setting.build_sources_library, - &data_build.setting.build_sources_library_static, + &data_build->setting.build_sources_library, + &data_build->setting.build_sources_library_static, }; for (i = 0; i < 2; ++i) { @@ -603,7 +583,7 @@ extern "C" { int result = main->child; if (F_status_is_error_not(*status)) { - result = fake_execute(main, data_build.environment, data_build.setting.build_indexer, arguments, status); + result = fake_execute(main, data_build->environment, data_build->setting.build_indexer, arguments, status); } f_string_dynamic_resize(0, &file_name); diff --git a/level_3/fake/c/private-build-library.h b/level_3/fake/c/private-build-library.h index 8e7a093..d90a148 100644 --- a/level_3/fake/c/private-build-library.h +++ b/level_3/fake/c/private-build-library.h @@ -15,10 +15,15 @@ extern "C" { /** * Build the script libraries. * + * If there ever are scripting languages that have a concept of libraries, then this function is here to do the job. + * None of the built in languages support this so this function does nothing. + * + * One potential use of this function could be to construct a script from pieces, effectively building an "library". + * * @param main * The main program data. * @param data_build - * All build related data. + * The build data. * @param mode * The file mode. * @param file_stage @@ -33,7 +38,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_library_script_ - extern int fake_build_library_script(fake_main_t * const main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; + extern int fake_build_library_script(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_build_library_script_ /** @@ -42,7 +47,7 @@ extern "C" { * @param main * The main program data. * @param data_build - * All build related data. + * The build data. * @param mode * The file mode. * @param file_stage @@ -57,7 +62,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_library_shared_ - extern int fake_build_library_shared(fake_main_t * const main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; + extern int fake_build_library_shared(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_build_library_shared_ /** @@ -66,7 +71,7 @@ extern "C" { * @param main * The main program data. * @param data_build - * All build related data. + * The build data. * @param mode * The file mode. * @param file_stage @@ -81,7 +86,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_library_static_ - extern int fake_build_library_static(fake_main_t * const main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; + extern int fake_build_library_static(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_build_library_static_ #ifdef __cplusplus diff --git a/level_3/fake/c/private-build-load.c b/level_3/fake/c/private-build-load.c index 51aaa7e..d6b57e4 100644 --- a/level_3/fake/c/private-build-load.c +++ b/level_3/fake/c/private-build-load.c @@ -11,7 +11,7 @@ extern "C" { #endif #ifndef _di_fake_build_load_environment_ - void fake_build_load_environment(fake_main_t * const main, const fake_build_data_t data_build, f_string_maps_t *environment, f_status_t *status) { + void fake_build_load_environment(fake_main_t * const main, fake_build_data_t * const data_build, f_string_maps_t * const environment, f_status_t * const status) { if (F_status_is_error(*status)) return; @@ -42,8 +42,8 @@ extern "C" { } // for } - if (environment->used + data_build.setting.environment.used > environment->size) { - if (environment->used + data_build.setting.environment.used > f_environment_max_length) { + if (environment->used + data_build->setting.environment.used > environment->size) { + if (environment->used + data_build->setting.environment.used > f_environment_max_length) { if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); @@ -62,7 +62,7 @@ extern "C" { } } - *status = fl_environment_load_names(data_build.setting.environment, environment); + *status = fl_environment_load_names(data_build->setting.environment, environment); if (F_status_is_error(*status)) { fll_error_print(main->error, F_status_set_fine(*status), "fl_environment_load_names", F_true); @@ -71,7 +71,7 @@ extern "C" { #endif // _di_fake_build_load_environment_ #ifndef _di_fake_build_load_setting_ - void fake_build_load_setting(fake_main_t * const main, const f_string_static_t setting_file, fake_build_setting_t *setting, f_status_t *status) { + void fake_build_load_setting(fake_main_t * const main, const f_string_static_t setting_file, fake_build_setting_t * const setting, f_status_t * const status) { if (F_status_is_error(*status)) return; @@ -178,7 +178,7 @@ extern "C" { #endif // _di_fake_build_load_setting_ #ifndef _di_fake_build_load_setting_process_ - void fake_build_load_setting_process(fake_main_t * const main, const bool checks, const f_string_static_t path_file, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t *setting, f_status_t *status) { + void fake_build_load_setting_process(fake_main_t * const main, const bool checks, const f_string_static_t path_file, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t * const setting, f_status_t * const status) { if (F_status_is_error(*status) && buffer.used) return; @@ -196,6 +196,9 @@ extern "C" { 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; + f_string_dynamics_t build_sources_object = f_string_dynamics_t_initialize; + f_string_dynamics_t build_sources_object_shared = f_string_dynamics_t_initialize; + f_string_dynamics_t build_sources_object_static = f_string_dynamics_t_initialize; f_string_dynamics_t build_static = f_string_dynamics_t_initialize; f_string_dynamics_t path_headers = f_string_dynamics_t_initialize; f_string_dynamics_t path_headers_preserve = f_string_dynamics_t_initialize; @@ -203,10 +206,14 @@ extern "C" { f_string_dynamics_t path_library_script = f_string_dynamics_t_initialize; f_string_dynamics_t path_library_shared = f_string_dynamics_t_initialize; f_string_dynamics_t path_library_static = f_string_dynamics_t_initialize; + f_string_dynamics_t path_object_script = f_string_dynamics_t_initialize; + f_string_dynamics_t path_object_shared = f_string_dynamics_t_initialize; + f_string_dynamics_t path_object_static = f_string_dynamics_t_initialize; f_string_dynamics_t path_program_script = f_string_dynamics_t_initialize; f_string_dynamics_t path_program_shared = f_string_dynamics_t_initialize; f_string_dynamics_t path_program_static = f_string_dynamics_t_initialize; f_string_dynamics_t path_sources = f_string_dynamics_t_initialize; + f_string_dynamics_t path_sources_object = f_string_dynamics_t_initialize; f_string_dynamics_t path_standard = f_string_dynamics_t_initialize; f_string_dynamics_t process_post = f_string_dynamics_t_initialize; f_string_dynamics_t process_pre = f_string_dynamics_t_initialize; @@ -233,6 +240,12 @@ extern "C" { fake_build_setting_name_build_libraries_shared_s, fake_build_setting_name_build_libraries_static_s, fake_build_setting_name_build_name_s, + fake_build_setting_name_build_objects_library_s, + fake_build_setting_name_build_objects_library_shared_s, + fake_build_setting_name_build_objects_library_static_s, + fake_build_setting_name_build_objects_program_s, + fake_build_setting_name_build_objects_program_shared_s, + fake_build_setting_name_build_objects_program_static_s, fake_build_setting_name_build_script_s, fake_build_setting_name_build_shared_s, fake_build_setting_name_build_sources_headers_s, @@ -241,6 +254,9 @@ extern "C" { fake_build_setting_name_build_sources_library_s, fake_build_setting_name_build_sources_library_shared_s, fake_build_setting_name_build_sources_library_static_s, + fake_build_setting_name_build_sources_object_s, + fake_build_setting_name_build_sources_object_shared_s, + fake_build_setting_name_build_sources_object_static_s, fake_build_setting_name_build_sources_program_s, fake_build_setting_name_build_sources_program_shared_s, fake_build_setting_name_build_sources_program_static_s, @@ -251,6 +267,9 @@ extern "C" { fake_build_setting_name_defines_library_s, fake_build_setting_name_defines_library_shared_s, fake_build_setting_name_defines_library_static_s, + fake_build_setting_name_defines_object_s, + fake_build_setting_name_defines_object_shared_s, + fake_build_setting_name_defines_object_static_s, fake_build_setting_name_defines_program_s, fake_build_setting_name_defines_program_shared_s, fake_build_setting_name_defines_program_static_s, @@ -261,6 +280,9 @@ extern "C" { fake_build_setting_name_flags_library_s, fake_build_setting_name_flags_library_shared_s, fake_build_setting_name_flags_library_static_s, + fake_build_setting_name_flags_object_s, + fake_build_setting_name_flags_object_shared_s, + fake_build_setting_name_flags_object_static_s, fake_build_setting_name_flags_program_s, fake_build_setting_name_flags_program_shared_s, fake_build_setting_name_flags_program_static_s, @@ -274,10 +296,14 @@ extern "C" { fake_build_setting_name_path_library_script_s, fake_build_setting_name_path_library_shared_s, fake_build_setting_name_path_library_static_s, + fake_build_setting_name_path_object_script_s, + fake_build_setting_name_path_object_shared_s, + fake_build_setting_name_path_object_static_s, fake_build_setting_name_path_program_script_s, fake_build_setting_name_path_program_shared_s, fake_build_setting_name_path_program_static_s, fake_build_setting_name_path_sources_s, + fake_build_setting_name_path_sources_object_s, fake_build_setting_name_path_standard_s, fake_build_setting_name_process_post_s, fake_build_setting_name_process_pre_s, @@ -305,6 +331,12 @@ extern "C" { &setting->build_libraries_shared, &setting->build_libraries_static, &build_name, + &setting->build_objects_library, + &setting->build_objects_library_shared, + &setting->build_objects_library_static, + &setting->build_objects_program, + &setting->build_objects_program_shared, + &setting->build_objects_program_static, &build_script, &build_shared, &setting->build_sources_headers, @@ -313,6 +345,9 @@ extern "C" { &setting->build_sources_library, &setting->build_sources_library_shared, &setting->build_sources_library_static, + &build_sources_object, + &build_sources_object_shared, + &build_sources_object_static, &setting->build_sources_program, &setting->build_sources_program_shared, &setting->build_sources_program_static, @@ -323,6 +358,9 @@ extern "C" { &setting->defines_library, &setting->defines_library_shared, &setting->defines_library_static, + &setting->defines_object, + &setting->defines_object_shared, + &setting->defines_object_static, &setting->defines_program, &setting->defines_program_shared, &setting->defines_program_static, @@ -333,6 +371,9 @@ extern "C" { &setting->flags_library, &setting->flags_library_shared, &setting->flags_library_static, + &setting->flags_object, + &setting->flags_object_shared, + &setting->flags_object_static, &setting->flags_program, &setting->flags_program_shared, &setting->flags_program_static, @@ -346,10 +387,14 @@ extern "C" { &path_library_script, &path_library_shared, &path_library_static, + &path_object_script, + &path_object_shared, + &path_object_static, &path_program_script, &path_program_shared, &path_program_static, &path_sources, + &path_sources_object, &path_standard, &process_post, &process_pre, @@ -438,6 +483,25 @@ extern "C" { F_false, F_false, F_false, + F_false, + F_false, + F_false, + F_false, + F_false, + F_false, + F_false, + F_false, + F_false, + F_false, + F_false, + F_false, + F_false, + F_false, + F_false, + F_false, + F_false, + F_false, + F_false, }; f_string_t function = "fll_fss_snatch_apart"; @@ -450,6 +514,8 @@ extern "C" { f_string_dynamic_t settings_mode_names[fake_build_setting_total_d]; + memset(settings_mode_names, 0, sizeof(f_string_dynamic_t) * fake_build_setting_total_d); + bool found = F_false; f_array_length_t i = 0; @@ -492,8 +558,6 @@ extern "C" { break; } - memset(&settings_mode_names, 0, sizeof(f_string_dynamic_t) * fake_build_setting_total_d); - for (j = 0; j < fake_build_setting_total_d; ++j) { settings_mode_names[j].used = 0; @@ -517,7 +581,7 @@ extern "C" { } if (F_status_is_error(*status)) { - function = "f_string_dynamic_increase_by"; + function = "f_string_dynamic_append"; break; } @@ -531,14 +595,14 @@ extern "C" { } } - for (j = 0; j < fake_build_setting_total_d; ++j) { - f_string_dynamic_resize(0, &settings_mode_names[j]); - } // for - if (F_status_is_error(*status)) break; } // for - // The string "build_libraries" is appended after all modes to help assist with static linker file issues (@todo there should likely be more options to have a postfix linker parameter that can be added here instead, such as "build_libraries_last"). + for (j = 0; j < fake_build_setting_total_d; ++j) { + f_string_dynamic_resize(0, &settings_mode_names[j]); + } // for + + // The string "build_libraries" is appended after all modes to help assist with static linker file issues. if (total_build_libraries) { f_string_static_t temporary[total_build_libraries]; @@ -592,6 +656,9 @@ extern "C" { fake_build_setting_name_build_name_s, fake_build_setting_name_build_script_s, fake_build_setting_name_build_shared_s, + fake_build_setting_name_build_sources_object_s, + fake_build_setting_name_build_sources_object_shared_s, + fake_build_setting_name_build_sources_object_static_s, fake_build_setting_name_build_static_s, fake_build_setting_name_path_headers_s, fake_build_setting_name_path_headers_preserve_s, @@ -599,10 +666,14 @@ extern "C" { fake_build_setting_name_path_library_script_s, fake_build_setting_name_path_library_shared_s, fake_build_setting_name_path_library_static_s, + fake_build_setting_name_path_object_script_s, + fake_build_setting_name_path_object_shared_s, + fake_build_setting_name_path_object_static_s, fake_build_setting_name_path_program_script_s, fake_build_setting_name_path_program_shared_s, fake_build_setting_name_path_program_static_s, fake_build_setting_name_path_sources_s, + fake_build_setting_name_path_sources_object_s, fake_build_setting_name_path_standard_s, fake_build_setting_name_process_post_s, fake_build_setting_name_process_pre_s, @@ -628,6 +699,9 @@ extern "C" { &build_name, &build_script, &build_shared, + &build_sources_object, + &build_sources_object_shared, + &build_sources_object_static, &build_static, &path_headers, &path_headers_preserve, @@ -635,10 +709,14 @@ extern "C" { &path_library_script, &path_library_shared, &path_library_static, + &path_object_script, + &path_object_shared, + &path_object_static, &path_program_script, &path_program_shared, &path_program_static, &path_sources, + &path_sources_object, &path_standard, &process_post, &process_pre, @@ -657,219 +735,326 @@ extern "C" { &version_target, }; - bool * const settings_single_bool[] = { - 0, // build_compiler - 0, // build_indexer - 0, // build_language - 0, // build_name - &setting->build_script, // build_script - &setting->build_shared, // build_shared - &setting->build_static, // build_static - 0, // path_headers - &setting->path_headers_preserve, // path_headers_preserve - 0, // path_language - 0, // path_library_script - 0, // path_library_shared - 0, // path_library_static - 0, // path_program_script - 0, // path_program_shared - 0, // path_program_static - 0, // path_sources - &setting->path_standard, // path_standard - 0, // process_post - 0, // process_pre - &setting->search_exclusive, // search_exclusive - &setting->search_shared, // search_shared - &setting->search_static, // search_static + bool *settings_single_bool[] = { + 0, // build_compiler + 0, // build_indexer + 0, // build_language + 0, // build_name + &setting->build_script, // build_script + &setting->build_shared, // build_shared + 0, // build_sources_object + 0, // build_sources_object_shared + 0, // build_sources_object_static + &setting->build_static, // build_static + 0, // path_headers + &setting->path_headers_preserve, // path_headers_preserve + 0, // path_language + 0, // path_library_script + 0, // path_library_shared + 0, // path_library_static + 0, // path_object_script + 0, // path_object_shared + 0, // path_object_static + 0, // path_program_script + 0, // path_program_shared + 0, // path_program_static + 0, // path_sources + 0, // path_sources_object + &setting->path_standard, // path_standard + 0, // process_post + 0, // process_pre + &setting->search_exclusive, // search_exclusive + &setting->search_shared, // search_shared + &setting->search_static, // search_static + }; + + f_string_dynamic_t *settings_single_destination[] = { + &setting->build_compiler, // build_compiler + &setting->build_indexer, // build_indexer + 0, // build_language + &setting->build_name, // build_name + 0, // build_script + 0, // build_shared + &setting->build_sources_object, // build_sources_object + &setting->build_sources_object_shared, // build_sources_object_shared + &setting->build_sources_object_static, // build_sources_object_static + 0, // build_static + &setting->path_headers, // path_headers + 0, // path_headers_preserve + &setting->path_language, // path_language + &setting->path_library_script, // path_library_script + &setting->path_library_shared, // path_library_shared + &setting->path_library_static, // path_library_static + &setting->path_object_script, // path_object_script + &setting->path_object_shared, // path_object_shared + &setting->path_object_static, // path_object_static + &setting->path_program_script, // path_program_script + &setting->path_program_shared, // path_program_shared + &setting->path_program_static, // path_program_static + &setting->path_sources, // path_sources + &setting->path_sources_object, // path_sources_object + 0, // path_standard + &setting->process_post, // process_post + &setting->process_pre, // process_pre + 0, // search_exclusive + 0, // search_shared + 0, // search_static + 0, // version_file + &setting->version_major, // version_major + &setting->version_major_prefix, // version_major_prefix + &setting->version_micro, // version_micro + &setting->version_micro_prefix, // version_micro_prefix + &setting->version_minor, // version_minor + &setting->version_minor_prefix, // version_minor_prefix + &setting->version_nano, // version_nano + &setting->version_nano_prefix, // version_nano_prefix + 0, // version_target }; - f_string_dynamic_t * const settings_single_destination[] = { - &setting->build_compiler, // build_compiler - &setting->build_indexer, // build_indexer - 0, // build_language - &setting->build_name, // build_name - 0, // build_script - 0, // build_shared - 0, // build_static - &setting->path_headers, // path_headers - 0, // path_headers_preserve - &setting->path_language, // path_language - &setting->path_library_script, // path_library_script - &setting->path_library_shared, // path_library_shared - &setting->path_library_static, // path_library_static - &setting->path_program_script, // path_program_script - &setting->path_program_shared, // path_program_shared - &setting->path_program_static, // path_program_static - &setting->path_sources, // path_sources - 0, // path_standard - &setting->process_post, // process_post - &setting->process_pre, // process_pre - 0, // search_exclusive - 0, // search_shared - 0, // search_static - 0, // version_file - &setting->version_major, // version_major - &setting->version_major_prefix, // version_major_prefix - &setting->version_micro, // version_micro - &setting->version_micro_prefix, // version_micro_prefix - &setting->version_minor, // version_minor - &setting->version_minor_prefix, // version_minor_prefix - &setting->version_nano, // version_nano - &setting->version_nano_prefix, // version_nano_prefix + 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_name + f_string_empty_s, // build_script + f_string_empty_s, // build_shared + f_string_empty_s, // build_sources_object + f_string_empty_s, // build_sources_object_shared + f_string_empty_s, // build_sources_object_static + f_string_empty_s, // build_static + f_string_empty_s, // path_headers + f_string_empty_s, // path_headers_preserve + f_string_empty_s, // path_language + fake_path_part_script_s, // path_library_script + fake_path_part_shared_s, // path_library_shared + fake_path_part_static_s, // path_library_static + fake_path_part_script_s, // path_object_script + fake_path_part_shared_s, // path_object_shared + fake_path_part_static_s, // path_object_static + fake_path_part_script_s, // path_program_script + fake_path_part_shared_s, // path_program_shared + fake_path_part_static_s, // path_program_static + f_string_empty_s, // path_sources + f_string_empty_s, // path_sources_object + fake_build_setting_default_yes_s, // path_standard + f_string_empty_s, // process_post + f_string_empty_s, // process_pre + fake_build_setting_default_yes_s, // search_exclusive + f_string_empty_s, // search_shared + f_string_empty_s, // search_static + f_string_empty_s, // version_file + f_string_empty_s, // version_major + fake_build_setting_default_version_prefix_s, // version_major_prefix + f_string_empty_s, // version_micro + fake_build_setting_default_version_prefix_s, // version_micro_prefix + f_string_empty_s, // version_minor + fake_build_setting_default_version_prefix_s, // version_minor_prefix + f_string_empty_s, // version_nano + fake_build_setting_default_version_prefix_s, // version_nano_prefix + f_string_empty_s, // version_target }; - uint8_t * const settings_single_language[] = { - 0, // build_compiler - 0, // build_indexer - &setting->build_language, // build_language + uint8_t *settings_single_language[] = { + 0, // build_compiler + 0, // build_indexer + &setting->build_language, // build_language }; - uint8_t * const settings_single_version[] = { - 0, // build_compiler - 0, // build_indexer - 0, // build_language - 0, // build_name - 0, // build_script - 0, // build_shared - 0, // build_static - 0, // path_headers - 0, // path_headers_preserve - 0, // path_language - 0, // path_library_script - 0, // path_library_shared - 0, // path_library_static - 0, // path_program_script - 0, // path_program_shared - 0, // path_program_static - 0, // path_sources - 0, // path_standard - 0, // process_post - 0, // process_pre - 0, // search_exclusive - 0, // search_shared - 0, // search_static - &setting->version_file, // version_file - 0, // version_major - 0, // version_major_prefix - 0, // version_micro - 0, // version_micro_prefix - 0, // version_minor - 0, // version_minor_prefix - 0, // version_nano - 0, // version_nano_prefix - &setting->version_target, // version_target + uint8_t *settings_single_version[] = { + 0, // build_compiler + 0, // build_indexer + 0, // build_language + 0, // build_name + 0, // build_script + 0, // build_shared + 0, // build_sources_object + 0, // build_sources_object_shared + 0, // build_sources_object_static + 0, // build_static + 0, // path_headers + 0, // path_headers_preserve + 0, // path_language + 0, // path_library_script + 0, // path_library_shared + 0, // path_library_static + 0, // path_object_script + 0, // path_object_shared + 0, // path_object_static + 0, // path_program_script + 0, // path_program_shared + 0, // path_program_static + 0, // path_sources + 0, // path_sources_object + 0, // path_standard + 0, // process_post + 0, // process_pre + 0, // search_exclusive + 0, // search_shared + 0, // search_static + &setting->version_file, // version_file + 0, // version_major + 0, // version_major_prefix + 0, // version_micro + 0, // version_micro_prefix + 0, // version_minor + 0, // version_minor_prefix + 0, // version_nano + 0, // version_nano_prefix + &setting->version_target, // version_target }; const uint8_t settings_single_version_default[] = { - 0, // build_compiler - 0, // build_indexer - 0, // build_language - 0, // build_name - 0, // build_script - 0, // build_shared - 0, // build_static - 0, // path_headers - 0, // path_headers_preserve - 0, // path_language - 0, // path_library_script - 0, // path_library_shared - 0, // path_library_static - 0, // path_program_script - 0, // path_program_shared - 0, // path_program_static - 0, // path_sources - 0, // path_standard - 0, // process_post - 0, // process_pre - 0, // search_exclusive - 0, // search_shared - 0, // search_static - fake_build_version_type_micro_e, // version_file - 0, // version_major - 0, // version_major_prefix - 0, // version_micro - 0, // version_micro_prefix - 0, // version_minor - 0, // version_minor_prefix - 0, // version_nano - 0, // version_nano_prefix - fake_build_version_type_major_e, // version_target + 0, // build_compiler + 0, // build_indexer + 0, // build_language + 0, // build_name + 0, // build_script + 0, // build_shared + 0, // build_sources_object + 0, // build_sources_object_shared + 0, // build_sources_object_static + 0, // build_static + 0, // path_headers + 0, // path_headers_preserve + 0, // path_language + 0, // path_library_script + 0, // path_library_shared + 0, // path_library_static + 0, // path_object_script + 0, // path_object_shared + 0, // path_object_static + 0, // path_program_script + 0, // path_program_shared + 0, // path_program_static + 0, // path_sources + 0, // path_sources_object + 0, // path_standard + 0, // process_post + 0, // process_pre + 0, // search_exclusive + 0, // search_shared + 0, // search_static + fake_build_version_type_micro_e, // version_file + 0, // version_major + 0, // version_major_prefix + 0, // version_micro + 0, // version_micro_prefix + 0, // version_minor + 0, // version_minor_prefix + 0, // version_nano + 0, // version_nano_prefix + fake_build_version_type_major_e, // version_target }; const f_string_static_t settings_single_version_default_name[] = { - f_string_empty_s, // build_compiler - f_string_empty_s, // build_indexer - f_string_empty_s, // build_language - f_string_empty_s, // build_name - f_string_empty_s, // build_script - f_string_empty_s, // build_shared - f_string_empty_s, // build_static - f_string_empty_s, // path_headers - f_string_empty_s, // path_headers_preserve - f_string_empty_s, // path_language - f_string_empty_s, // path_library_script - f_string_empty_s, // path_library_shared - f_string_empty_s, // path_library_static - f_string_empty_s, // path_program_script - f_string_empty_s, // path_program_shared - f_string_empty_s, // path_program_static - f_string_empty_s, // path_sources - f_string_empty_s, // path_standard - f_string_empty_s, // process_post - f_string_empty_s, // process_pre - f_string_empty_s, // search_exclusive - f_string_empty_s, // search_shared - f_string_empty_s, // search_static - fake_build_version_micro_s, // version_file - f_string_empty_s, // version_major - f_string_empty_s, // version_major_prefix - f_string_empty_s, // version_micro - f_string_empty_s, // version_micro_prefix - f_string_empty_s, // version_minor - f_string_empty_s, // version_minor_prefix - f_string_empty_s, // version_nano - f_string_empty_s, // version_nano_prefix - fake_build_version_major_s, // version_target + f_string_empty_s, // build_compiler + f_string_empty_s, // build_indexer + f_string_empty_s, // build_language + f_string_empty_s, // build_name + f_string_empty_s, // build_script + f_string_empty_s, // build_shared + f_string_empty_s, // build_sources_object + f_string_empty_s, // build_sources_object_shared + f_string_empty_s, // build_sources_object_static + f_string_empty_s, // build_static + f_string_empty_s, // path_headers + f_string_empty_s, // path_headers_preserve + f_string_empty_s, // path_language + f_string_empty_s, // path_library_script + f_string_empty_s, // path_library_shared + f_string_empty_s, // path_library_static + f_string_empty_s, // path_object_script + f_string_empty_s, // path_object_shared + f_string_empty_s, // path_object_static + f_string_empty_s, // path_program_script + f_string_empty_s, // path_program_shared + f_string_empty_s, // path_program_static + f_string_empty_s, // path_sources + f_string_empty_s, // path_sources_object + f_string_empty_s, // path_standard + f_string_empty_s, // process_post + f_string_empty_s, // process_pre + f_string_empty_s, // search_exclusive + f_string_empty_s, // search_shared + f_string_empty_s, // search_static + fake_build_version_micro_s, // version_file + f_string_empty_s, // version_major + f_string_empty_s, // version_major_prefix + f_string_empty_s, // version_micro + f_string_empty_s, // version_micro_prefix + f_string_empty_s, // version_minor + f_string_empty_s, // version_minor_prefix + f_string_empty_s, // version_nano + f_string_empty_s, // version_nano_prefix + 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". const uint8_t settings_single_type[] = { - 3, // build_compiler - 3, // build_indexer - 4, // build_language - 3, // build_name - 1, // build_script - 1, // build_shared - 1, // build_static - 2, // path_headers - 1, // path_headers_preserve - 2, // path_language - 2, // path_library_script - 2, // path_library_shared - 2, // path_library_static - 2, // path_program_script - 2, // path_program_shared - 2, // path_program_static - 2, // path_sources - 1, // path_standard - 3, // process_post - 3, // process_pre - 1, // search_exclusive - 1, // search_shared - 1, // search_static - 5, // version_file - 3, // version_major - 3, // version_major_prefix - 3, // version_micro - 3, // version_micro_prefix - 3, // version_minor - 3, // version_minor_prefix - 3, // version_nano - 3, // version_nano_prefix - 5, // version_target + 3, // build_compiler + 3, // build_indexer + 4, // build_language + 3, // build_name + 1, // build_script + 1, // build_shared + 3, // build_sources_object + 3, // build_sources_object_shared + 3, // build_sources_object_static + 1, // build_static + 2, // path_headers + 1, // path_headers_preserve + 2, // path_language + 2, // path_library_script + 2, // path_library_shared + 2, // path_library_static + 2, // path_object_script + 2, // path_object_shared + 2, // path_object_static + 2, // path_program_script + 2, // path_program_shared + 2, // path_program_static + 2, // path_sources + 2, // path_sources_object + 1, // path_standard + 3, // process_post + 3, // process_pre + 1, // search_exclusive + 1, // search_shared + 1, // search_static + 5, // version_file + 3, // version_major + 3, // version_major_prefix + 3, // version_micro + 3, // version_micro_prefix + 3, // version_minor + 3, // version_minor_prefix + 3, // version_nano + 3, // version_nano_prefix + 5, // version_target }; - for (f_array_length_t i = 0; i < 33; ++i) { + for (f_array_length_t i = 0; i < 40; ++i) { + + // Assign the default for literal and path types. + if (settings_single_string_default[i].used && settings_single_destination[i]) { + settings_single_destination[i]->used = 0; + + *status = f_string_dynamic_append(settings_single_string_default[i], settings_single_destination[i]); + + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true); + + break; + } + + *status = f_string_dynamic_terminate_after(settings_single_destination[i]); + + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true); + + break; + } + } if (!settings_single_source[i]->used) continue; @@ -991,34 +1176,43 @@ extern "C" { } } } - else { + else if (settings_single_destination[i]) { // Replace any potential existing value. settings_single_destination[i]->used = 0; - *status = f_string_dynamic_append_nulless(settings_single_source[i]->array[0], settings_single_destination[i]); + if (settings_single_type[i] == 2) { + *status = f_path_directory_cleanup(settings_single_source[i]->array[0], settings_single_destination[i]); - if (F_status_is_error(*status)) { - fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "f_path_directory_cleanup", F_true); - break; + break; + } } + else { + *status = f_string_dynamic_increase_by(settings_single_source[i]->array[0].used + 1, settings_single_destination[i]); - if (settings_single_type[i] == 2) { - *status = f_string_dynamic_append_assure(f_path_separator_s, settings_single_destination[i]); + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_increase_by", F_true); + + break; + } + + *status = f_string_dynamic_append_nulless(settings_single_source[i]->array[0], settings_single_destination[i]); if (F_status_is_error(*status)) { - fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append_assure", F_true); + fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); break; } - } - *status = f_string_dynamic_terminate_after(settings_single_destination[i]); - if (F_status_is_error(*status)) { - fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true); + *status = f_string_dynamic_terminate_after(settings_single_destination[i]); + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true); - break; + break; + } } } } // for @@ -1060,103 +1254,6 @@ extern "C" { } } } - - // Provide these defaults only if the Object is not defined (this allows for empty Content to exist if the Object is defined). - // In the case of the version prefixes, if the associated version is empty, then instead clear the associated version prefix. - if (F_status_is_error_not(*status)) { - f_string_dynamic_t *prefix[] = { - &setting->version_major_prefix, - &setting->version_minor_prefix, - &setting->version_micro_prefix, - &setting->version_nano_prefix, - }; - - f_string_dynamic_t *version[] = { - &setting->version_major, - &setting->version_minor, - &setting->version_micro, - &setting->version_nano, - }; - - bool has_prefix_object[] = { - settings_matches[61], // version_major_prefix - settings_matches[63], // version_minor_prefix - settings_matches[65], // version_micro_prefix - settings_matches[67], // version_nano_prefix - }; - - const f_string_static_t name_target[] = { - fake_build_version_major_s, - fake_build_version_minor_s, - fake_build_version_micro_s, - fake_build_version_nano_s, - }; - - const f_string_static_t name_object[] = { - fake_build_setting_name_version_major_s, - fake_build_setting_name_version_minor_s, - fake_build_setting_name_version_micro_s, - fake_build_setting_name_version_nano_s, - }; - - const f_string_static_t setting_name[] = { - fake_build_setting_name_version_file_s, - fake_build_setting_name_version_target_s, - }; - - const uint8_t setting_target[] = { - setting->version_file, - setting->version_target, - }; - - f_array_length_t i = 0; - f_array_length_t j = 0; - - for (; i < 4; ++i) { - - if (version[i]->used) { - if (!has_prefix_object[i]) { - prefix[i]->used = 0; - - *status = f_string_dynamic_append(fake_build_setting_default_version_prefix_s, prefix[i]); - - if (F_status_is_error(*status)) { - fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true); - - break; - } - } - } - else if (checks) { - prefix[i]->used = 0; - - for (j = 0; j < 2; ++j) { - - if (setting_target[j] && i + 1 <= setting_target[j]) { - if (main->error.verbosity != f_console_verbosity_quiet_e) { - flockfile(main->error.to.stream); - - fl_print_format("%r%[%QWhen the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, setting_name[j], main->error.notable); - fl_print_format("%[' is set to '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, name_target[setting_target[j] - 1], main->error.notable); - fl_print_format("%[' then the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, name_object[i], main->error.notable); - fl_print_format("%[' Object must have Content.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s); - - funlockfile(main->error.to.stream); - } - - *status = F_status_set_error(F_failure); - - break; - } - } // for - - if (F_status_is_error(*status)) break; - } - } // for - } } f_string_dynamics_resize(0, &build_compiler); @@ -1165,6 +1262,9 @@ extern "C" { f_string_dynamics_resize(0, &build_name); f_string_dynamics_resize(0, &build_script); f_string_dynamics_resize(0, &build_shared); + f_string_dynamics_resize(0, &build_sources_object); + f_string_dynamics_resize(0, &build_sources_object_shared); + f_string_dynamics_resize(0, &build_sources_object_static); f_string_dynamics_resize(0, &build_static); f_string_dynamics_resize(0, &path_headers); f_string_dynamics_resize(0, &path_headers_preserve); @@ -1172,10 +1272,14 @@ extern "C" { f_string_dynamics_resize(0, &path_library_script); f_string_dynamics_resize(0, &path_library_shared); f_string_dynamics_resize(0, &path_library_static); + f_string_dynamics_resize(0, &path_object_script); + f_string_dynamics_resize(0, &path_object_shared); + f_string_dynamics_resize(0, &path_object_static); f_string_dynamics_resize(0, &path_program_script); f_string_dynamics_resize(0, &path_program_shared); f_string_dynamics_resize(0, &path_program_static); f_string_dynamics_resize(0, &path_sources); + f_string_dynamics_resize(0, &path_sources_object); f_string_dynamics_resize(0, &path_standard); f_string_dynamics_resize(0, &process_post); f_string_dynamics_resize(0, &process_pre); @@ -1196,7 +1300,7 @@ extern "C" { #endif // _di_fake_build_load_setting_process_ #ifndef _di_fake_build_load_setting_defaults_ - void fake_build_load_setting_defaults(fake_main_t * const main, fake_build_setting_t *setting, f_status_t *status) { + void fake_build_load_setting_defaults(fake_main_t * const main, fake_build_setting_t * const setting, f_status_t * const status) { if (F_status_is_error(*status)) return; @@ -1335,7 +1439,7 @@ extern "C" { #endif // _di_fake_build_load_setting_defaults_ #ifndef _di_fake_build_load_stage_ - void fake_build_load_stage(fake_main_t * const main, const f_string_static_t settings_file, fake_build_stage_t *stage, f_status_t *status) { + void fake_build_load_stage(fake_main_t * const main, const f_string_static_t settings_file, fake_build_stage_t * const stage, f_status_t * const status) { if (F_status_is_error(*status)) return; @@ -1346,15 +1450,18 @@ extern "C" { } const f_string_static_t names[] = { - fake_build_stage_libraries_script_s, - fake_build_stage_libraries_shared_s, - fake_build_stage_libraries_static_s, + fake_build_stage_library_script_s, + fake_build_stage_library_shared_s, + fake_build_stage_library_static_s, + fake_build_stage_object_script_s, + fake_build_stage_object_shared_s, + fake_build_stage_object_static_s, fake_build_stage_objects_static_s, fake_build_stage_process_post_s, fake_build_stage_process_pre_s, - fake_build_stage_programs_script_s, - fake_build_stage_programs_shared_s, - fake_build_stage_programs_static_s, + fake_build_stage_program_script_s, + fake_build_stage_program_shared_s, + fake_build_stage_program_static_s, fake_build_stage_skeleton_s, fake_build_stage_sources_headers_s, fake_build_stage_sources_script_s, @@ -1362,15 +1469,18 @@ extern "C" { }; f_string_dynamic_t * const values[] = { - &stage->file_libraries_script, - &stage->file_libraries_shared, - &stage->file_libraries_static, + &stage->file_library_script, + &stage->file_library_shared, + &stage->file_library_static, + &stage->file_object_script, + &stage->file_object_shared, + &stage->file_object_static, &stage->file_objects_static, &stage->file_process_post, &stage->file_process_pre, - &stage->file_programs_script, - &stage->file_programs_shared, - &stage->file_programs_static, + &stage->file_program_script, + &stage->file_program_shared, + &stage->file_program_static, &stage->file_skeleton, &stage->file_sources_headers, &stage->file_sources_script, @@ -1398,46 +1508,30 @@ extern "C" { *status = f_string_dynamic_append_nulless(main->path_build_stage, values[i]); - if (F_status_is_error(*status)) { - fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); - - break; - } - - if (main->process.used) { + if (F_status_is_error_not(*status) && main->process.used) { *status = f_string_dynamic_append_nulless(main->process, values[i]); - if (F_status_is_error(*status)) { - fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); - - break; - } - - *status = f_string_dynamic_append(fake_build_stage_separate_s, values[i]); - - if (F_status_is_error(*status)) { - fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true); - - break; - } + *status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]); } - *status = f_string_dynamic_append(names[i], values[i]); + if (F_status_is_error_not(*status)) { + *status = f_string_dynamic_append_nulless(names[i], values[i]); + } if (F_status_is_error_not(*status)) { - *status = f_string_dynamic_append(fake_build_stage_separate_s, values[i]); + *status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]); } if (F_status_is_error_not(*status)) { - *status = f_string_dynamic_append(settings_file_base, values[i]); + *status = f_string_dynamic_append_nulless(settings_file_base, values[i]); } if (F_status_is_error_not(*status)) { - *status = f_string_dynamic_append(fake_build_stage_built_s, values[i]); + *status = f_string_dynamic_append_nulless(fake_build_stage_built_s, values[i]); } if (F_status_is_error(*status)) { - fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); break; } diff --git a/level_3/fake/c/private-build-load.h b/level_3/fake/c/private-build-load.h index 21b4a37..c70c1a3 100644 --- a/level_3/fake/c/private-build-load.h +++ b/level_3/fake/c/private-build-load.h @@ -32,7 +32,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_load_setting_ - extern void fake_build_load_setting(fake_main_t * const main, const f_string_static_t setting_file, fake_build_setting_t *setting, f_status_t *status) F_attribute_visibility_internal_d; + extern void fake_build_load_setting(fake_main_t * const main, const f_string_static_t setting_file, fake_build_setting_t * const setting, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_build_load_setting_ /** @@ -56,7 +56,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_load_setting_defaults_ - extern void fake_build_load_setting_defaults(fake_main_t * const main, fake_build_setting_t *setting, f_status_t *status) F_attribute_visibility_internal_d; + extern void fake_build_load_setting_defaults(fake_main_t * const main, fake_build_setting_t * const setting, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_build_load_setting_defaults_ /** @@ -84,10 +84,20 @@ extern "C" { * @return * F_none on success. * - * Status codes (with error bit) are returned on any problem. + * Errors (with error bit) from: f_path_directory_cleanup(). + * Errors (with error bit) from: f_string_dynamic_append(). + * Errors (with error bit) from: f_string_dynamic_increase_by(). + * Errors (with error bit) from: f_string_dynamic_terminate_after(). + * Errors (with error bit) from: fll_fss_snatch_apart(). + * + * @see f_path_directory_cleanup() + * @see f_string_dynamic_append() + * @see f_string_dynamic_increase_by() + * @see f_string_dynamic_terminate_after() + * @see fll_fss_snatch_apart() */ #ifndef _di_fake_build_load_setting_process_ - extern void fake_build_load_setting_process(fake_main_t * const main, const bool checks, const f_string_static_t path_file, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t *setting, f_status_t *status) F_attribute_visibility_internal_d; + extern void fake_build_load_setting_process(fake_main_t * const main, const bool checks, const f_string_static_t path_file, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t * const setting, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_build_load_setting_process_ /** @@ -96,7 +106,7 @@ extern "C" { * @param main * The main program data. * @param data_build - * All build related data. + * The build data. * @param environment * The environment data. * @param status @@ -108,7 +118,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_load_environment_ - extern void fake_build_load_environment(fake_main_t * const main, const fake_build_data_t data_build, f_string_maps_t *environment, f_status_t *status) F_attribute_visibility_internal_d; + extern void fake_build_load_environment(fake_main_t * const main, fake_build_data_t * const data_build, f_string_maps_t * const environment, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_build_load_environment_ /** @@ -129,7 +139,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_load_stage_ - extern void fake_build_load_stage(fake_main_t * const main, const f_string_static_t settings_file, fake_build_stage_t *stage, f_status_t *status) F_attribute_visibility_internal_d; + extern void fake_build_load_stage(fake_main_t * const main, const f_string_static_t settings_file, fake_build_stage_t * const stage, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_build_load_stage_ #ifdef __cplusplus diff --git a/level_3/fake/c/private-build-object.c b/level_3/fake/c/private-build-object.c new file mode 100644 index 0000000..5dd5575 --- /dev/null +++ b/level_3/fake/c/private-build-object.c @@ -0,0 +1,168 @@ +#include "fake.h" +#include "private-common.h" +#include "private-fake.h" +#include "private-build.h" +#include "private-build-object.h" +#include "private-make.h" +#include "private-print.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_fake_build_object_script_ + int fake_build_object_script(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) { + + if (F_status_is_error(*status) || f_file_exists(file_stage) == F_true || *status == F_child) return main->child; + + fake_build_touch(main, file_stage, status); + + return 0; + } +#endif // _di_fake_build_object_script_ + +#ifndef _di_fake_build_object_shared_ + int fake_build_object_shared(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) { + + if (F_status_is_error(*status) || f_file_exists(file_stage) == F_true || *status == F_child) return main->child; + if (!data_build->setting.build_sources_object.used && !data_build->setting.build_sources_object_shared.used) return 0; + + if (main->output.verbosity != f_console_verbosity_quiet_e) { + fll_print_format("%r%[Compiling shared object.%]%r", main->output.to.stream, f_string_eol_s, main->context.set.important, main->context.set.important, f_string_eol_s); + } + + f_string_dynamics_t arguments = f_string_dynamics_t_initialize; + + *status = fake_build_sources_object_add(main, data_build, &data_build->setting.build_sources_object, &data_build->setting.build_sources_object_shared, &arguments); + + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "fake_build_sources_object_add", F_true); + + f_string_dynamics_resize(0, &arguments); + + return 0; + } + + { + f_string_static_t parameter_file_name_path = f_string_static_t_initialize; + parameter_file_name_path.used = main->path_build_objects_shared.used + data_build->setting.build_name.used + fake_build_parameter_object_name_suffix_s.used; + + char 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, main->path_build_objects_shared.string, main->path_build_objects_shared.used); + memcpy(parameter_file_name_path_string + main->path_build_objects_shared.used, data_build->setting.build_name.string, data_build->setting.build_name.used); + memcpy(parameter_file_name_path_string + main->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used); + + const f_string_static_t values[] = { + fake_build_parameter_object_compile_s, + fake_build_parameter_object_output_s, + parameter_file_name_path, + }; + + for (uint8_t i = 0; i < 3; ++i) { + + if (!values[i].used) continue; + + *status = fll_execute_arguments_add(values[i], &arguments); + if (F_status_is_error(*status)) break; + } // for + } + + fake_build_arguments_standard_add(main, data_build, F_true, fake_build_type_object_e, &arguments, status); + + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "fake_build_arguments_standard_add", F_true); + + macro_f_string_dynamics_t_delete_simple(arguments); + + return 0; + } + + int result = fake_execute(main, data_build->environment, data_build->setting.build_compiler, arguments, status); + + macro_f_string_dynamics_t_delete_simple(arguments); + + if (F_status_is_error_not(*status) && *status != F_child) { + fake_build_touch(main, file_stage, status); + } + + return result; + } +#endif // _di_fake_build_object_shared_ + +#ifndef _di_fake_build_object_static_ + int fake_build_object_static(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) { + + if (F_status_is_error(*status) || f_file_exists(file_stage) == F_true || *status == F_child) return main->child; + if (!data_build->setting.build_sources_object.used && !data_build->setting.build_sources_object_static.used) return 0; + + if (main->output.verbosity != f_console_verbosity_quiet_e) { + fll_print_format("%r%[Compiling static object.%]%r", main->output.to.stream, f_string_eol_s, main->context.set.important, main->context.set.important, f_string_eol_s); + } + + f_string_dynamics_t arguments = f_string_dynamics_t_initialize; + + *status = fake_build_sources_object_add(main, data_build, &data_build->setting.build_sources_object, &data_build->setting.build_sources_object_static, &arguments); + + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "fake_build_sources_object_add", F_true); + + f_string_dynamics_resize(0, &arguments); + + return 0; + } + + { + f_string_static_t parameter_file_name_path = f_string_static_t_initialize; + parameter_file_name_path.used = main->path_build_objects_static.used + data_build->setting.build_name.used + fake_build_parameter_object_name_suffix_s.used; + + char 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, main->path_build_objects_static.string, main->path_build_objects_static.used); + memcpy(parameter_file_name_path_string + main->path_build_objects_static.used, data_build->setting.build_name.string, data_build->setting.build_name.used); + memcpy(parameter_file_name_path_string + main->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used); + + const f_string_static_t values[] = { + fake_build_parameter_object_compile_s, + fake_build_parameter_object_output_s, + parameter_file_name_path, + }; + + for (uint8_t i = 0; i < 3; ++i) { + + if (!values[i].used) continue; + + *status = fll_execute_arguments_add(values[i], &arguments); + if (F_status_is_error(*status)) break; + } // for + } + + fake_build_arguments_standard_add(main, data_build, F_false, fake_build_type_object_e, &arguments, status); + + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "fake_build_arguments_standard_add", F_true); + + macro_f_string_dynamics_t_delete_simple(arguments); + + return 0; + } + + int result = fake_execute(main, data_build->environment, data_build->setting.build_compiler, arguments, status); + + macro_f_string_dynamics_t_delete_simple(arguments); + + if (F_status_is_error_not(*status) && *status != F_child) { + fake_build_touch(main, file_stage, status); + } + + return result; + } +#endif // _di_fake_build_object_static_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/fake/c/private-build-object.h b/level_3/fake/c/private-build-object.h new file mode 100644 index 0000000..80f1799 --- /dev/null +++ b/level_3/fake/c/private-build-object.h @@ -0,0 +1,102 @@ +/** + * FLL - Level 3 + * + * Project: Featureless Make + * API Version: 0.5 + * Licenses: lgpl-2.1-or-later + */ +#ifndef _PRIVATE_build_object_h +#define _PRIVATE_build_object_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Build the script objects. + * + * If there ever are scripting languages that have a concept of objects, then this function is here to do the job. + * None of the built in languages support this so this function does nothing. + * + * One potential use of this function could be to construct a script from pieces, effectively building an "object". + * + * @param main + * The main program data. + * @param data_build + * The build data. + * @param mode + * The file mode. + * @param file_stage + * The specific stage file path. + * @param status + * F_none on success. + * + * Status codes (with error bit) are returned on any problem. + * + * @return + * The return code of the execution process. + * This generally is only needed when F_child is returned, where this holds the return status of the child process. + */ +#ifndef _di_fake_build_object_script_ + extern int fake_build_object_script(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; +#endif // _di_fake_build_object_script_ + +/** + * Build the shared objects. + * + * Object files can be compiled differently between shared and static such that a shared object might be compiled with -fPIC and a static object might not be. + * This represents an object being compiled with the intent to be used in a shared library or program. + * + * @param main + * The main program data. + * @param data_build + * The build data. + * @param mode + * The file mode. + * @param file_stage + * The specific stage file path. + * @param status + * F_none on success. + * + * Status codes (with error bit) are returned on any problem. + * + * @return + * The return code of the execution process. + * This generally is only needed when F_child is returned, where this holds the return status of the child process. + */ +#ifndef _di_fake_build_object_shared_ + extern int fake_build_object_shared(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; +#endif // _di_fake_build_object_shared_ + +/** + * Build the static objects. + * + * Object files can be compiled differently between shared and static such that a shared object might be compiled with -fPIC and a static object might not be. + * This represents an object being compiled with the intent to be used in a static library or program. + * + * @param main + * The main program data. + * @param data_build + * The build data. + * @param mode + * The file mode. + * @param file_stage + * The specific stage file path. + * @param status + * F_none on success. + * + * Status codes (with error bit) are returned on any problem. + * + * @return + * The return code of the execution process. + * This generally is only needed when F_child is returned, where this holds the return status of the child process. + */ +#ifndef _di_fake_build_object_static_ + extern int fake_build_object_static(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; +#endif // _di_fake_build_object_static_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _PRIVATE_build_object_h diff --git a/level_3/fake/c/private-build-objects.c b/level_3/fake/c/private-build-objects.c index a6adfdd..1a16245 100644 --- a/level_3/fake/c/private-build-objects.c +++ b/level_3/fake/c/private-build-objects.c @@ -11,18 +11,29 @@ extern "C" { #endif #ifndef _di_fake_build_objects_static_ - int fake_build_objects_static(fake_main_t * const main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) { + int fake_build_objects_static(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) { if (F_status_is_error(*status) || f_file_exists(file_stage) == F_true || *status == F_child) return main->child; - if (!data_build.setting.build_sources_library.used) return 0; + if (!data_build->setting.build_sources_library.used) return 0; if (main->output.verbosity != f_console_verbosity_quiet_e) { - fll_print_format("%r%[Compiling static objects.%]%r", main->output.to.stream, f_string_eol_s, main->context.set.important, main->context.set.important, f_string_eol_s); + fll_print_format("%r%[Compiling objects for static library.%]%r", main->output.to.stream, f_string_eol_s, main->context.set.important, main->context.set.important, f_string_eol_s); + } + + f_string_dynamics_t arguments = f_string_dynamics_t_initialize; + + *status = fake_build_objects_add(main, data_build, &main->path_build_objects_static, &data_build->setting.build_objects_library, &data_build->setting.build_objects_library_static, &arguments); + + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "fake_build_objects_add", F_true); + + f_string_dynamics_resize(0, &arguments); + + return 0; } f_string_dynamic_t file_name = f_string_dynamic_t_initialize; f_string_dynamic_t destination_path = f_string_dynamic_t_initialize; - f_string_dynamics_t arguments = f_string_dynamics_t_initialize; f_string_static_t destination = f_string_static_t_initialize; f_string_static_t source = f_string_static_t_initialize; @@ -30,20 +41,20 @@ extern "C" { int result = main->child; - if (data_build.setting.path_standard) { + if (data_build->setting.path_standard) { path_sources = &main->path_sources_c; - if (data_build.setting.build_language == fake_build_language_type_cpp_e) { + if (data_build->setting.build_language == fake_build_language_type_cpp_e) { path_sources = &main->path_sources_cpp; } } else if (main->parameters.array[fake_parameter_path_sources_e].result != f_console_result_additional_e) { - path_sources = &data_build.setting.path_sources; + path_sources = &data_build->setting.path_sources; } const f_string_dynamics_t *sources[2] = { - &data_build.setting.build_sources_library, - &data_build.setting.build_sources_library_static, + &data_build->setting.build_sources_library, + &data_build->setting.build_sources_library_static, }; f_array_length_t i = 0; @@ -192,7 +203,7 @@ extern "C" { if (F_status_is_error(*status)) break; } // for - fake_build_arguments_standard_add(main, data_build, F_false, F_true, &arguments, status); + fake_build_arguments_standard_add(main, data_build, F_false, fake_build_type_library_e, &arguments, status); if (F_status_is_error(*status)) { fll_error_print(main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); @@ -200,7 +211,7 @@ extern "C" { break; } - result = fake_execute(main, data_build.environment, data_build.setting.build_compiler, arguments, status); + result = fake_execute(main, data_build->environment, data_build->setting.build_compiler, arguments, status); macro_f_string_dynamics_t_delete_simple(arguments); diff --git a/level_3/fake/c/private-build-objects.h b/level_3/fake/c/private-build-objects.h index 4857b11..20e8a33 100644 --- a/level_3/fake/c/private-build-objects.h +++ b/level_3/fake/c/private-build-objects.h @@ -13,12 +13,15 @@ extern "C" { #endif /** - * Build the static objects. + * Build static options that are needed when building a static library. + * + * This is neither the "build_sources_object" nor the "build_sources_object_static" property. + * Instead, this converts the "build_sources_library" and the "build_sources_library_static" into a static object file so that the indexer program (such as GNU ar) can combine these into a static file. * * @param main * The main program data. * @param data_build - * All build related data. + * The build data. * @param mode * The file mode. * @param file_stage @@ -33,7 +36,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_objects_static_ - extern int fake_build_objects_static(fake_main_t * const main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; + extern int fake_build_objects_static(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_build_objects_static_ #ifdef __cplusplus diff --git a/level_3/fake/c/private-build-program.c b/level_3/fake/c/private-build-program.c index 77c176d..b273e2b 100644 --- a/level_3/fake/c/private-build-program.c +++ b/level_3/fake/c/private-build-program.c @@ -11,7 +11,7 @@ extern "C" { #endif #ifndef _di_fake_build_program_script_ - int fake_build_program_script(fake_main_t * const main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) { + int fake_build_program_script(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) { if (F_status_is_error(*status) || f_file_exists(file_stage) == F_true || *status == F_child) return main->child; @@ -22,10 +22,10 @@ extern "C" { #endif // _di_fake_build_program_script_ #ifndef _di_fake_build_program_shared_ - int fake_build_program_shared(fake_main_t * const main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) { + int fake_build_program_shared(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) { if (F_status_is_error(*status) || f_file_exists(file_stage) == F_true || *status == F_child) return main->child; - if (!data_build.setting.build_sources_program.used) return 0; + if (!data_build->setting.build_sources_program.used && !data_build->setting.build_sources_program_shared.used) return 0; if (main->output.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%r%[Compiling shared program.%]%r", main->output.to.stream, f_string_eol_s, main->context.set.important, main->context.set.important, f_string_eol_s); @@ -33,61 +33,36 @@ extern "C" { f_string_dynamics_t arguments = f_string_dynamics_t_initialize; - { - const f_string_static_t *path_sources = &main->path_sources; - - if (data_build.setting.path_standard) { - path_sources = &main->path_sources_c; - - if (data_build.setting.build_language == fake_build_language_type_cpp_e) { - path_sources = &main->path_sources_cpp; - } - } - else if (main->parameters.array[fake_parameter_path_sources_e].result != f_console_result_additional_e) { - path_sources = &data_build.setting.path_sources; - } - - f_string_static_t source = f_string_static_t_initialize; - - const f_string_dynamics_t *sources[2] = { - &data_build.setting.build_sources_program, - &data_build.setting.build_sources_program_shared, - }; - - f_array_length_t i = 0; - f_array_length_t j = 0; + *status = fake_build_objects_add(main, data_build, &main->path_build_objects_shared, &data_build->setting.build_objects_program, &data_build->setting.build_objects_program_shared, &arguments); - for (; i < 2; ++i) { + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "fake_build_objects_add", F_true); - for (j = 0; j < sources[i]->used; ++j) { + f_string_dynamics_resize(0, &arguments); - source.used = path_sources->used + sources[i]->array[j].used; + return 0; + } - char source_string[source.used + 1]; - source.string = source_string; - source_string[source.used] = 0; + *status = fake_build_sources_add(main, data_build, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_shared, &arguments); - memcpy(source_string, path_sources->string, path_sources->used); - memcpy(source_string + path_sources->used, sources[i]->array[j].string, sources[i]->array[j].used); + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "fake_build_sources_add", F_true); - *status = fll_execute_arguments_add(source, &arguments); - if (F_status_is_error(*status)) break; - } // for + f_string_dynamics_resize(0, &arguments); - if (F_status_is_error(*status)) break; - } // for + return 0; } 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 = main->path_build_programs_shared.used + data_build.setting.build_name.used; + parameter_file_name_path.used = main->path_build_programs_shared.used + data_build->setting.build_name.used; char 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, main->path_build_programs_shared.string, main->path_build_programs_shared.used); - memcpy(parameter_file_name_path_string + main->path_build_programs_shared.used, data_build.setting.build_name.string, data_build.setting.build_name.used); + memcpy(parameter_file_name_path_string + main->path_build_programs_shared.used, data_build->setting.build_name.string, data_build->setting.build_name.used); const f_string_static_t values[] = { fake_build_parameter_library_output_s, @@ -104,21 +79,21 @@ extern "C" { } // If project-specific library sources exist, then the -lbuild_name needs to be added to the arguments. - if (F_status_is_error_not(*status) && data_build.setting.build_sources_library.used) { + if (F_status_is_error_not(*status) && data_build->setting.build_sources_library.used) { f_string_static_t link_project_library = f_string_static_t_initialize; - link_project_library.used = fake_build_parameter_library_link_file_s.used + data_build.setting.build_name.used; + link_project_library.used = fake_build_parameter_library_link_file_s.used + data_build->setting.build_name.used; char link_project_library_string[link_project_library.used + 1]; link_project_library.string = link_project_library_string; link_project_library_string[link_project_library.used] = 0; memcpy(link_project_library_string, fake_build_parameter_library_link_file_s.string, fake_build_parameter_library_link_file_s.used); - memcpy(link_project_library_string + fake_build_parameter_library_link_file_s.used, data_build.setting.build_name.string, data_build.setting.build_name.used); + memcpy(link_project_library_string + fake_build_parameter_library_link_file_s.used, data_build->setting.build_name.string, data_build->setting.build_name.used); *status = fll_execute_arguments_add(link_project_library, &arguments); } - fake_build_arguments_standard_add(main, data_build, F_true, F_false, &arguments, status); + fake_build_arguments_standard_add(main, data_build, F_true, fake_build_type_program_e, &arguments, status); if (F_status_is_error(*status)) { fll_error_print(main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); @@ -128,7 +103,7 @@ extern "C" { return 0; } - int result = fake_execute(main, data_build.environment, data_build.setting.build_compiler, arguments, status); + int result = fake_execute(main, data_build->environment, data_build->setting.build_compiler, arguments, status); macro_f_string_dynamics_t_delete_simple(arguments); @@ -141,10 +116,10 @@ extern "C" { #endif // _di_fake_build_program_shared_ #ifndef _di_fake_build_program_static_ - int fake_build_program_static(fake_main_t * const main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) { + int fake_build_program_static(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) { if (F_status_is_error(*status) || f_file_exists(file_stage) == F_true || *status == F_child) return main->child; - if (!data_build.setting.build_sources_program.used) return 0; + if (!data_build->setting.build_sources_program.used && !data_build->setting.build_sources_program_static.used) return 0; if (main->output.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%r%[Compiling static program.%]%r", main->output.to.stream, f_string_eol_s, main->context.set.important, main->context.set.important, f_string_eol_s); @@ -152,56 +127,29 @@ extern "C" { f_string_dynamics_t arguments = f_string_dynamics_t_initialize; - { - const f_string_static_t *path_sources = &main->path_sources; - - if (data_build.setting.path_standard) { - path_sources = &main->path_sources_c; + *status = fake_build_objects_add(main, data_build, &main->path_build_objects_static, &data_build->setting.build_objects_program, &data_build->setting.build_objects_program_static, &arguments); - if (data_build.setting.build_language == fake_build_language_type_cpp_e) { - path_sources = &main->path_sources_cpp; - } - } - else if (main->parameters.array[fake_parameter_path_sources_e].result != f_console_result_additional_e) { - path_sources = &data_build.setting.path_sources; - } - - f_string_static_t source = f_string_static_t_initialize; - - const f_string_dynamics_t *sources[2] = { - &data_build.setting.build_sources_program, - &data_build.setting.build_sources_program_static, - }; - - f_array_length_t i = 0; - f_array_length_t j = 0; - - for (; i < 2; ++i) { - - for (j = 0; j < sources[i]->used; ++j) { + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "fake_build_objects_add", F_true); - if (!sources[i]->array[j].used) continue; + f_string_dynamics_resize(0, &arguments); - source.used = path_sources->used + sources[i]->array[j].used; + return 0; + } - char source_string[source.used + 1]; - source.string = source_string; - source_string[source.used] = 0; + *status = fake_build_sources_add(main, data_build, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_static, &arguments); - memcpy(source_string, path_sources->string, path_sources->used); - memcpy(source_string + path_sources->used, sources[i]->array[j].string, sources[i]->array[j].used); + if (F_status_is_error(*status)) { + fll_error_print(main->error, F_status_set_fine(*status), "fake_build_sources_add", F_true); - *status = fll_execute_arguments_add(source, &arguments); - if (F_status_is_error(*status)) break; - } // for + f_string_dynamics_resize(0, &arguments); - if (F_status_is_error(*status)) break; - } // for + return 0; } - if (F_status_is_error_not(*status)) { + { f_string_static_t source_library = f_string_static_t_initialize; - source_library.used = main->path_build_libraries_static.used + fake_build_parameter_library_name_prefix_s.used + data_build.setting.build_name.used + fake_build_parameter_library_name_suffix_static_s.used; + source_library.used = main->path_build_libraries_static.used + fake_build_parameter_library_name_prefix_s.used + data_build->setting.build_name.used + fake_build_parameter_library_name_suffix_static_s.used; char source_library_string[source_library.used + 1]; source_library.string = source_library_string; @@ -209,29 +157,29 @@ extern "C" { source_library.used = 0; // Only include the library if there are sources that would result in it being built. - if (data_build.setting.build_sources_library.used) { + if (data_build->setting.build_sources_library.used) { memcpy(source_library_string, main->path_build_libraries_static.string, main->path_build_libraries_static.used); source_library.used += main->path_build_libraries_static.used; memcpy(source_library_string + source_library.used, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used); source_library.used += fake_build_parameter_library_name_prefix_s.used; - memcpy(source_library_string + source_library.used, data_build.setting.build_name.string, data_build.setting.build_name.used); - source_library.used += data_build.setting.build_name.used; + memcpy(source_library_string + source_library.used, data_build->setting.build_name.string, data_build->setting.build_name.used); + source_library.used += data_build->setting.build_name.used; memcpy(source_library_string + source_library.used, fake_build_parameter_library_name_suffix_static_s.string, fake_build_parameter_library_name_suffix_static_s.used); source_library.used += fake_build_parameter_library_name_suffix_static_s.used; } f_string_static_t parameter_file_name_path = f_string_static_t_initialize; - parameter_file_name_path.used = main->path_build_programs_static.used + data_build.setting.build_name.used; + parameter_file_name_path.used = main->path_build_programs_static.used + data_build->setting.build_name.used; char 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, main->path_build_programs_static.string, main->path_build_programs_static.used); - memcpy(parameter_file_name_path_string + main->path_build_programs_static.used, data_build.setting.build_name.string, data_build.setting.build_name.used); + memcpy(parameter_file_name_path_string + main->path_build_programs_static.used, data_build->setting.build_name.string, data_build->setting.build_name.used); const f_string_static_t values[] = { source_library, @@ -249,7 +197,7 @@ extern "C" { } // for } - fake_build_arguments_standard_add(main, data_build, F_false, F_false, &arguments, status); + fake_build_arguments_standard_add(main, data_build, F_false, fake_build_type_program_e, &arguments, status); if (F_status_is_error(*status)) { fll_error_print(main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true); @@ -259,7 +207,7 @@ extern "C" { return 0; } - int result = fake_execute(main, data_build.environment, data_build.setting.build_compiler, arguments, status); + int result = fake_execute(main, data_build->environment, data_build->setting.build_compiler, arguments, status); macro_f_string_dynamics_t_delete_simple(arguments); diff --git a/level_3/fake/c/private-build-program.h b/level_3/fake/c/private-build-program.h index 39e02e1..afe7bca 100644 --- a/level_3/fake/c/private-build-program.h +++ b/level_3/fake/c/private-build-program.h @@ -15,10 +15,16 @@ extern "C" { /** * Build the script programs. * + * If there ever are scripting languages that have a concept of programs, then this function is here to do the job. + * None of the built in languages support this so this function does nothing. + * + * A script is often referred to as a program, but in this context "script" and "program" are not the same. + * One potential use of this function could be to construct a script from pieces, effectively building a "program". + * * @param main * The main program data. * @param data_build - * All build related data. + * The build data. * @param mode * The file mode. * @param file_stage @@ -33,7 +39,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_program_script_ - extern int fake_build_program_script(fake_main_t * const main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; + extern int fake_build_program_script(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_build_program_script_ /** @@ -42,7 +48,7 @@ extern "C" { * @param main * The main program data. * @param data_build - * All build related data. + * The build data. * @param mode * The file mode. * @param file_stage @@ -57,7 +63,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_program_shared_ - extern int fake_build_program_shared(fake_main_t * const main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; + extern int fake_build_program_shared(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_build_program_shared_ /** @@ -66,7 +72,7 @@ extern "C" { * @param main * The main program data. * @param data_build - * All build related data. + * The build data. * @param mode * The file mode. * @param file_stage @@ -81,7 +87,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_program_static_ - extern int fake_build_program_static(fake_main_t * const main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; + extern int fake_build_program_static(fake_main_t * const main, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_build_program_static_ #ifdef __cplusplus diff --git a/level_3/fake/c/private-build-skeleton.c b/level_3/fake/c/private-build-skeleton.c index 13daf9e..f161007 100644 --- a/level_3/fake/c/private-build-skeleton.c +++ b/level_3/fake/c/private-build-skeleton.c @@ -11,33 +11,26 @@ extern "C" { #endif #ifndef _di_fake_build_skeleton_ - void fake_build_skeleton(fake_main_t * const main, const fake_build_data_t data_build, const mode_t mode, const f_string_static_t file_stage, f_status_t *status) { + void fake_build_skeleton(fake_main_t * const main, fake_build_data_t * const data_build, const mode_t mode, const f_string_static_t file_stage, f_status_t * const status) { if (F_status_is_error(*status) || f_file_exists(file_stage) == F_true || *status == F_child) return; f_string_static_t path_headers = f_string_static_t_initialize; - f_array_length_t directory_headers_length = main->path_build_includes.used + data_build.setting.path_headers.used; + path_headers.used = main->path_build_includes.used + data_build->setting.path_headers.used; - char directory_headers[directory_headers_length + 1]; + char path_headers_string[path_headers.used + 1]; + path_headers.string = path_headers_string; - if (data_build.setting.path_headers.used) { - memcpy(directory_headers, main->path_build_includes.string, main->path_build_includes.used); - memcpy(directory_headers + main->path_build_includes.used, data_build.setting.path_headers.string, data_build.setting.path_headers.used); - - directory_headers[directory_headers_length] = 0; - - path_headers.string = directory_headers; - path_headers.used = directory_headers_length; - path_headers.size = directory_headers_length + 1; + if (data_build->setting.path_headers.used) { + memcpy(path_headers_string, main->path_build_includes.string, main->path_build_includes.used); + memcpy(path_headers_string + main->path_build_includes.used, data_build->setting.path_headers.string, data_build->setting.path_headers.used); } else { - directory_headers[0] = 0; - - path_headers.string = directory_headers; path_headers.used = 0; - path_headers.size = directory_headers_length + 1; } + path_headers_string[path_headers.used] = 0; + const f_string_static_t *directorys[] = { &main->path_build, &main->path_build_documents, @@ -47,6 +40,9 @@ extern "C" { &main->path_build_libraries_shared, &main->path_build_libraries_static, &main->path_build_objects, + &main->path_build_objects_script, + &main->path_build_objects_shared, + &main->path_build_objects_static, &main->path_build_programs, &main->path_build_programs_script, &main->path_build_programs_shared, @@ -60,11 +56,14 @@ extern "C" { fll_print_format("%r%[Creating base build directories.%]%r", main->output.to.stream, f_string_eol_s, main->context.set.important, main->context.set.important, f_string_eol_s); } - for (uint8_t i = 0; i < 15; ++i) { + bool created = F_false; + + for (uint8_t i = 0; i < 18; ++i) { if (!directorys[i]->used) continue; - // @todo implement this in a common function and use across project for creating parent directories. + created = F_false; + for (f_array_length_t j = 0; j < directorys[i]->used; ++j) { if (directorys[i]->string[j] != f_path_separator_s.string[0]) continue; @@ -81,6 +80,8 @@ extern "C" { if (*status == F_file_found_not) { *status = f_directory_create(*directorys[i], mode); + + created = F_true; } directorys[i]->string[j] = f_path_separator_s.string[0]; @@ -88,22 +89,32 @@ extern "C" { if (F_status_is_error(*status)) break; } // for - if (F_status_is_fine(*status)) { - *status = f_directory_create(*directorys[i], mode); + if (F_status_is_fine(*status) && directorys[i]->string[directorys[i]->used - 1] != f_path_separator_s.string[0]) { + *status = f_directory_exists(*directorys[i]); + + if (F_status_is_error_not(*status)) { + if (*status == F_false) { + *status = f_directory_create(*directorys[i], mode); + + created = F_true; + } + } } if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_file_found) { *status = F_none; + continue; } fll_error_file_print(main->error, F_status_set_fine(*status), "f_directory_create", F_true, *directorys[i], f_file_operation_create_s, fll_error_file_type_directory_e); + return; } - if (main->error.verbosity == f_console_verbosity_verbose_e) { - fll_print_format("Created directory '%Q'.%r", main->output.to.stream, directorys[i], f_string_eol_s); + if (created && main->error.verbosity == f_console_verbosity_verbose_e) { + fll_print_format("Created directory '%Q'.%r", main->output.to.stream, *directorys[i], f_string_eol_s); } } // for diff --git a/level_3/fake/c/private-build-skeleton.h b/level_3/fake/c/private-build-skeleton.h index 5a64a3d..4761044 100644 --- a/level_3/fake/c/private-build-skeleton.h +++ b/level_3/fake/c/private-build-skeleton.h @@ -32,7 +32,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_skeleton_ - extern void fake_build_skeleton(fake_main_t * const main, const fake_build_data_t data_build, const mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; + extern void fake_build_skeleton(fake_main_t * const main, fake_build_data_t * const data_build, const mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_build_skeleton_ #ifdef __cplusplus diff --git a/level_3/fake/c/private-build.c b/level_3/fake/c/private-build.c index 39db92f..c12731b 100644 --- a/level_3/fake/c/private-build.c +++ b/level_3/fake/c/private-build.c @@ -4,6 +4,7 @@ #include "private-build.h" #include "private-build-library.h" #include "private-build-load.h" +#include "private-build-object.h" #include "private-build-objects.h" #include "private-build-program.h" #include "private-build-skeleton.h" @@ -23,44 +24,46 @@ extern "C" { #endif // _di_fake_build_strings_ #ifndef _di_fake_build_arguments_standard_add_ - void fake_build_arguments_standard_add(fake_main_t * const main, const fake_build_data_t data_build, const bool is_shared, const bool is_library, f_string_dynamics_t *arguments, f_status_t *status) { + void fake_build_arguments_standard_add(fake_main_t * const main, fake_build_data_t * const data_build, const bool is_shared, const uint8_t type, f_string_dynamics_t *arguments, f_status_t *status) { if (F_status_is_error(*status)) return; - f_array_length_t build_libraries_length = fake_build_parameter_library_link_path_s.used + main->path_build_libraries_shared.used; + { + f_array_length_t build_libraries_length = fake_build_parameter_library_link_path_s.used + main->path_build_libraries_shared.used; - char build_libraries[build_libraries_length + 1]; + char build_libraries[build_libraries_length + 1]; - memcpy(build_libraries, fake_build_parameter_library_link_path_s.string, fake_build_parameter_library_link_path_s.used); + memcpy(build_libraries, fake_build_parameter_library_link_path_s.string, fake_build_parameter_library_link_path_s.used); - if (is_shared) { - memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used); - } - else { - memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_static.string, main->path_build_libraries_static.used); - } + if (is_shared) { + memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used); + } + else { + memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_static.string, main->path_build_libraries_static.used); + } - build_libraries[build_libraries_length] = 0; + build_libraries[build_libraries_length] = 0; - f_array_length_t build_includes_length = fake_build_parameter_library_include_s.used + main->path_build_includes.used; + f_array_length_t build_includes_length = fake_build_parameter_library_include_s.used + main->path_build_includes.used; - char build_includes[build_includes_length + 1]; + char build_includes[build_includes_length + 1]; - memcpy(build_includes, fake_build_parameter_library_include_s.string, fake_build_parameter_library_include_s.used); - memcpy(build_includes + fake_build_parameter_library_include_s.used, main->path_build_includes.string, main->path_build_includes.used); + memcpy(build_includes, fake_build_parameter_library_include_s.string, fake_build_parameter_library_include_s.used); + memcpy(build_includes + fake_build_parameter_library_include_s.used, main->path_build_includes.string, main->path_build_includes.used); - const f_string_static_t values[] = { - macro_f_string_static_t_initialize(build_libraries, 0, build_libraries_length), - macro_f_string_static_t_initialize(build_includes, 0, build_includes_length), - }; + const f_string_static_t values[] = { + macro_f_string_static_t_initialize(build_libraries, 0, build_libraries_length), + macro_f_string_static_t_initialize(build_includes, 0, build_includes_length), + }; - for (uint8_t i = 0; i < 2; ++i) { + for (uint8_t 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 (main->path_work.used && F_status_is_error_not(*status)) { f_string_static_t buffer = f_string_static_t_initialize; @@ -78,7 +81,7 @@ extern "C" { *status = fll_execute_arguments_add(buffer, arguments); } - if (data_build.setting.search_shared && (is_shared || !data_build.setting.search_exclusive) && F_status_is_error_not(*status)) { + if (data_build->setting.search_shared && (is_shared || !data_build->setting.search_exclusive) && F_status_is_error_not(*status)) { buffer.used = fake_build_parameter_library_link_path_s.used + main->path_work_libraries_shared.used; char buffer_string[buffer.used + 1]; @@ -91,7 +94,7 @@ extern "C" { *status = fll_execute_arguments_add(buffer, arguments); } - if (data_build.setting.search_static && (!is_shared || !data_build.setting.search_exclusive) && F_status_is_error_not(*status)) { + if (data_build->setting.search_static && (!is_shared || !data_build->setting.search_exclusive) && F_status_is_error_not(*status)) { buffer.used = fake_build_parameter_library_link_path_s.used + main->path_work_libraries_static.used; char buffer_string[buffer.used + 1]; @@ -107,176 +110,226 @@ extern "C" { f_array_length_t i = 0; - for (i = 0; i < data_build.setting.build_libraries.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.build_libraries.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.build_libraries.array[i].used) continue; + if (!data_build->setting.build_libraries.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.build_libraries.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.build_libraries.array[i], arguments); } // for if (is_shared) { - for (i = 0; i < data_build.setting.build_libraries_shared.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.build_libraries_shared.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.build_libraries_shared.array[i].used) continue; + if (!data_build->setting.build_libraries_shared.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.build_libraries_shared.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.build_libraries_shared.array[i], arguments); } // for } else { - for (i = 0; i < data_build.setting.build_libraries_static.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.build_libraries_static.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.build_libraries_static.array[i].used) continue; + if (!data_build->setting.build_libraries_static.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.build_libraries_static.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.build_libraries_static.array[i], arguments); } // for } - for (i = 0; i < data_build.setting.flags.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.flags.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.flags.array[i].used) continue; + if (!data_build->setting.flags.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.flags.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.flags.array[i], arguments); } // for if (is_shared) { - for (i = 0; i < data_build.setting.flags_shared.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.flags_shared.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.flags_shared.array[i].used) continue; + if (!data_build->setting.flags_shared.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.flags_shared.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.flags_shared.array[i], arguments); } // for } else { - for (i = 0; i < data_build.setting.flags_static.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.flags_static.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.flags_static.array[i].used) continue; + if (!data_build->setting.flags_static.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.flags_static.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.flags_static.array[i], arguments); } // for } - if (is_library) { - for (i = 0; i < data_build.setting.flags_library.used && F_status_is_error_not(*status); ++i) { + if (type == fake_build_type_library_e) { + for (i = 0; i < data_build->setting.flags_library.used && F_status_is_error_not(*status); ++i) { + + if (!data_build->setting.flags_library.array[i].used) continue; - if (!data_build.setting.flags_library.array[i].used) continue; + *status = fll_execute_arguments_add(data_build->setting.flags_library.array[i], arguments); + } // for + + if (is_shared) { + for (i = 0; i < data_build->setting.flags_library_shared.used && F_status_is_error_not(*status); ++i) { + + if (!data_build->setting.flags_library_shared.array[i].used) continue; + + *status = fll_execute_arguments_add(data_build->setting.flags_library_shared.array[i], arguments); + } // for + } + else { + for (i = 0; i < data_build->setting.flags_library_static.used && F_status_is_error_not(*status); ++i) { - *status = fll_execute_arguments_add(data_build.setting.flags_library.array[i], arguments); + if (!data_build->setting.flags_library_static.array[i].used) continue; + + *status = fll_execute_arguments_add(data_build->setting.flags_library_static.array[i], arguments); + } // for + } + } + else if (type == fake_build_type_object_e) { + for (i = 0; i < data_build->setting.flags_object.used && F_status_is_error_not(*status); ++i) { + + if (!data_build->setting.flags_object.array[i].used) continue; + + *status = fll_execute_arguments_add(data_build->setting.flags_object.array[i], arguments); } // for if (is_shared) { - for (i = 0; i < data_build.setting.flags_library_shared.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.flags_object_shared.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.flags_library_shared.array[i].used) continue; + if (!data_build->setting.flags_object_shared.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.flags_library_shared.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.flags_object_shared.array[i], arguments); } // for } else { - for (i = 0; i < data_build.setting.flags_library_static.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.flags_object_static.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.flags_library_static.array[i].used) continue; + if (!data_build->setting.flags_object_static.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.flags_library_static.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.flags_object_static.array[i], arguments); } // for } } else { - for (i = 0; i < data_build.setting.flags_program.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.flags_program.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.flags_program.array[i].used) continue; + if (!data_build->setting.flags_program.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.flags_program.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.flags_program.array[i], arguments); } // for if (is_shared) { - for (i = 0; i < data_build.setting.flags_program_shared.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.flags_program_shared.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.flags_program_shared.array[i].used) continue; + if (!data_build->setting.flags_program_shared.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.flags_program_shared.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.flags_program_shared.array[i], arguments); } // for } else { - for (i = 0; i < data_build.setting.flags_program_static.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.flags_program_static.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.flags_program_static.array[i].used) continue; + if (!data_build->setting.flags_program_static.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.flags_program_static.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.flags_program_static.array[i], arguments); } // for } } - for (i = 0; i < data_build.setting.defines.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.defines.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.defines.array[i].used) continue; + if (!data_build->setting.defines.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.defines.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.defines.array[i], arguments); } // for if (is_shared) { - for (i = 0; i < data_build.setting.defines_shared.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.defines_shared.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.defines_shared.array[i].used) continue; + if (!data_build->setting.defines_shared.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.defines_shared.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.defines_shared.array[i], arguments); } // for } else { - for (i = 0; i < data_build.setting.defines_static.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.defines_static.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.defines_static.array[i].used) continue; + if (!data_build->setting.defines_static.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.defines_static.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.defines_static.array[i], arguments); } // for } - if (is_library) { - for (i = 0; i < data_build.setting.defines_library.used && F_status_is_error_not(*status); ++i) { + if (type == fake_build_type_library_e) { + for (i = 0; i < data_build->setting.defines_library.used && F_status_is_error_not(*status); ++i) { + + if (!data_build->setting.defines_library.array[i].used) continue; - if (!data_build.setting.defines_library.array[i].used) continue; + *status = fll_execute_arguments_add(data_build->setting.defines_library.array[i], arguments); + } // for + + if (is_shared) { + for (i = 0; i < data_build->setting.defines_library_shared.used && F_status_is_error_not(*status); ++i) { + + if (!data_build->setting.defines_library_shared.array[i].used) continue; + + *status = fll_execute_arguments_add(data_build->setting.defines_library_shared.array[i], arguments); + } // for + } + else { + for (i = 0; i < data_build->setting.defines_library_static.used && F_status_is_error_not(*status); ++i) { - *status = fll_execute_arguments_add(data_build.setting.defines_library.array[i], arguments); + if (!data_build->setting.defines_library_static.array[i].used) continue; + + *status = fll_execute_arguments_add(data_build->setting.defines_library_static.array[i], arguments); + } // for + } + } + else if (type == fake_build_type_object_e) { + for (i = 0; i < data_build->setting.defines_object.used && F_status_is_error_not(*status); ++i) { + + if (!data_build->setting.defines_object.array[i].used) continue; + + *status = fll_execute_arguments_add(data_build->setting.defines_object.array[i], arguments); } // for if (is_shared) { - for (i = 0; i < data_build.setting.defines_library_shared.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.defines_object_shared.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.defines_library_shared.array[i].used) continue; + if (!data_build->setting.defines_object_shared.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.defines_library_shared.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.defines_object_shared.array[i], arguments); } // for } else { - for (i = 0; i < data_build.setting.defines_library_static.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.defines_object_static.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.defines_library_static.array[i].used) continue; + if (!data_build->setting.defines_object_static.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.defines_library_static.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.defines_object_static.array[i], arguments); } // for } } else { - for (i = 0; i < data_build.setting.defines_program.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.defines_program.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.defines_program.array[i].used) continue; + if (!data_build->setting.defines_program.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.defines_program.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.defines_program.array[i], arguments); } // for if (is_shared) { - for (i = 0; i < data_build.setting.defines_program_shared.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.defines_program_shared.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.defines_program_shared.array[i].used) continue; + if (!data_build->setting.defines_program_shared.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.defines_program_shared.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.defines_program_shared.array[i], arguments); } // for } else { - for (i = 0; i < data_build.setting.defines_program_static.used && F_status_is_error_not(*status); ++i) { + for (i = 0; i < data_build->setting.defines_program_static.used && F_status_is_error_not(*status); ++i) { - if (!data_build.setting.defines_program_static.array[i].used) continue; + if (!data_build->setting.defines_program_static.array[i].used) continue; - *status = fll_execute_arguments_add(data_build.setting.defines_program_static.array[i], arguments); + *status = fll_execute_arguments_add(data_build->setting.defines_program_static.array[i], arguments); } // for } } @@ -369,10 +422,10 @@ extern "C" { if (*status == F_true) { destination_directory.used = 0; - *status = f_string_dynamic_append(destination, &destination_directory); + *status = f_string_dynamic_append_nulless(destination, &destination_directory); if (F_status_is_error(*status)) { - fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); break; } @@ -522,7 +575,7 @@ extern "C" { #endif // _di_fake_build_copy_ #ifndef _di_fake_build_execute_process_script_ - int fake_build_execute_process_script(fake_main_t * const main, const fake_build_data_t data_build, const f_string_static_t process_script, const f_string_static_t file_stage, f_status_t *status) { + int fake_build_execute_process_script(fake_main_t * const main, fake_build_data_t * const data_build, const f_string_static_t process_script, const f_string_static_t file_stage, f_status_t *status) { if (F_status_is_error(*status) || f_file_exists(file_stage) == F_true || *status == F_child) return main->child; if (!process_script.used) return 0; @@ -697,7 +750,7 @@ extern "C" { f_signal_set_empty(&signals.block); f_signal_set_fill(&signals.block_not); - fl_execute_parameter_t parameter = macro_fl_execute_parameter_t_initialize(FL_execute_parameter_option_path_d, 0, &data_build.environment, &signals, 0); + fl_execute_parameter_t parameter = macro_fl_execute_parameter_t_initialize(FL_execute_parameter_option_path_d, 0, &data_build->environment, &signals, 0); *status = fll_execute_program(path, arguments, ¶meter, 0, (void *) &return_code); @@ -772,6 +825,44 @@ extern "C" { } #endif // _di_fake_build_get_file_name_without_extension_ +#ifndef _di_fake_build_objects_add_ + f_status_t fake_build_objects_add(fake_main_t * const main, fake_build_data_t * const data_build, const f_string_static_t *path, const f_string_statics_t *generic, const f_string_statics_t *specific, f_string_dynamics_t *arguments) { + + f_status_t status = F_none; + f_array_length_t i = 0; + f_array_length_t j = 0; + + f_string_static_t source = f_string_static_t_initialize; + + const f_string_statics_t *sources[2] = { + generic, + specific, + }; + + for (; i < 2; ++i) { + + for (j = 0; j < sources[i]->used; ++j) { + + if (!sources[i]->array[j].used) continue; + + source.used = path->used + sources[i]->array[j].used; + + char source_string[source.used + 1]; + source.string = source_string; + source_string[source.used] = 0; + + memcpy(source_string, path->string, path->used); + memcpy(source_string + path->used, sources[i]->array[j].string, sources[i]->array[j].used); + + status = fll_execute_arguments_add(source, arguments); + if (F_status_is_error(status)) return status; + } // for + } // for + + return F_none; + } +#endif // _di_fake_build_objects_add_ + #ifndef _di_fake_build_operate_ f_status_t fake_build_operate(const f_string_static_t setting_file, fake_main_t *main) { @@ -803,18 +894,20 @@ extern "C" { fake_build_load_stage(main, setting_file, &stage, &status); - fake_build_load_environment(main, data_build, &data_build.environment, &status); + fake_build_load_environment(main, &data_build, &data_build.environment, &status); - fake_build_skeleton(main, data_build, mode.directory, stage.file_skeleton, &status); + fake_build_skeleton(main, &data_build, mode.directory, stage.file_skeleton, &status); - main->child = fake_build_execute_process_script(main, data_build, data_build.setting.process_pre, stage.file_process_pre, &status); + main->child = fake_build_execute_process_script(main, &data_build, data_build.setting.process_pre, stage.file_process_pre, &status); fake_build_copy(main, mode, fake_build_setting_files_s, main->path_data_settings, main->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) { - fake_build_library_script(main, data_build, mode, stage.file_libraries_script, &status); + fake_build_object_script(main, &data_build, mode, stage.file_object_script, &status); - fake_build_program_script(main, data_build, mode, stage.file_programs_script, &status); + fake_build_library_script(main, &data_build, mode, stage.file_library_script, &status); + + fake_build_program_script(main, &data_build, mode, stage.file_program_script, &status); if (data_build.setting.build_script) { fake_build_copy(main, mode, fake_build_scripts_s, main->path_sources_script, main->path_build_programs_script, data_build.setting.build_sources_script, stage.file_sources_script, 0, &status); @@ -835,48 +928,47 @@ extern "C" { path_sources = data_build.setting.path_sources; } - const f_array_length_t path_sources_base_length = path_sources.used; - f_string_static_t path_headers = f_string_static_t_initialize; - f_array_length_t directory_headers_length = main->path_build_includes.used + data_build.setting.path_headers.used; + path_headers.used = main->path_build_includes.used + data_build.setting.path_headers.used; - char directory_headers[directory_headers_length + 1]; + char path_headers_string[path_headers.used + 1]; + path_headers.string = path_headers_string; - memcpy(directory_headers, main->path_build_includes.string, main->path_build_includes.used); + memcpy(path_headers_string, main->path_build_includes.string, main->path_build_includes.used); if (data_build.setting.path_headers.used) { - memcpy(directory_headers + main->path_build_includes.used, data_build.setting.path_headers.string, data_build.setting.path_headers.used); + memcpy(path_headers_string + main->path_build_includes.used, data_build.setting.path_headers.string, data_build.setting.path_headers.used); } - directory_headers[directory_headers_length] = 0; + path_headers_string[path_headers.used] = 0; - path_headers.string = directory_headers; - path_headers.used = directory_headers_length; - path_headers.size = directory_headers_length + 1; - - fake_build_copy(main, mode, fake_build_header_files_s, path_sources, path_headers, data_build.setting.build_sources_headers, stage.file_sources_headers, data_build.setting.path_headers_preserve ? path_sources_base_length : 0, &status); + fake_build_copy(main, mode, fake_build_header_files_s, path_sources, path_headers, data_build.setting.build_sources_headers, stage.file_sources_headers, data_build.setting.path_headers_preserve ? path_headers.used : 0, &status); if (data_build.setting.build_shared) { - fake_build_copy(main, mode, fake_build_header_files_shared_s, path_sources, path_headers, data_build.setting.build_sources_headers_shared, stage.file_sources_headers, data_build.setting.path_headers_preserve ? path_sources_base_length : 0, &status); + fake_build_copy(main, mode, fake_build_header_files_shared_s, path_sources, path_headers, data_build.setting.build_sources_headers_shared, stage.file_sources_headers, data_build.setting.path_headers_preserve ? path_headers.used : 0, &status); } if (data_build.setting.build_static) { - fake_build_copy(main, mode, fake_build_header_files_static_s, path_sources, path_headers, data_build.setting.build_sources_headers_static, stage.file_sources_headers, data_build.setting.path_headers_preserve ? path_sources_base_length : 0, &status); + fake_build_copy(main, mode, fake_build_header_files_static_s, path_sources, path_headers, data_build.setting.build_sources_headers_static, stage.file_sources_headers, data_build.setting.path_headers_preserve ? path_headers.used : 0, &status); } } if (data_build.setting.build_shared) { - main->child = fake_build_library_shared(main, data_build, mode, stage.file_libraries_shared, &status); + main->child = fake_build_object_shared(main, &data_build, mode, stage.file_object_shared, &status); + + main->child = fake_build_library_shared(main, &data_build, mode, stage.file_library_shared, &status); - main->child = fake_build_program_shared(main, data_build, mode, stage.file_programs_shared, &status); + main->child = fake_build_program_shared(main, &data_build, mode, stage.file_program_shared, &status); } if (data_build.setting.build_static) { - main->child = fake_build_objects_static(main, data_build, mode, stage.file_objects_static, &status); + main->child = fake_build_object_static(main, &data_build, mode, stage.file_object_static, &status); - main->child = fake_build_library_static(main, data_build, mode, stage.file_libraries_static, &status); + main->child = fake_build_objects_static(main, &data_build, mode, stage.file_objects_static, &status); - main->child = fake_build_program_static(main, data_build, mode, stage.file_programs_static, &status); + main->child = fake_build_library_static(main, &data_build, mode, stage.file_library_static, &status); + + main->child = fake_build_program_static(main, &data_build, mode, stage.file_program_static, &status); } if (data_build.setting.build_script) { @@ -884,7 +976,7 @@ extern "C" { } } - fake_build_execute_process_script(main, data_build, data_build.setting.process_post, stage.file_process_post, &status); + fake_build_execute_process_script(main, &data_build, data_build.setting.process_post, stage.file_process_post, &status); macro_fake_build_main_delete_simple(data_build); macro_fake_build_stage_t_delete_simple(stage); @@ -893,6 +985,108 @@ extern "C" { } #endif // _di_fake_build_operate_ +#ifndef _di_fake_build_sources_add_ + f_status_t fake_build_sources_add(fake_main_t * const main, fake_build_data_t * const data_build, const f_string_statics_t *generic, const f_string_statics_t *specific, f_string_dynamics_t *arguments) { + + f_status_t status = F_none; + f_array_length_t i = 0; + f_array_length_t j = 0; + + f_string_static_t source = f_string_static_t_initialize; + + // @fixme review this, these paths (like path_sources_object) need to be build on a per-settings basis rather than using a global value. + f_string_dynamic_t *path_sources = &main->path_sources; + const f_string_statics_t *sources[2] = { + generic, + specific, + }; + + if (data_build->setting.path_standard) { + if (data_build->setting.build_language == fake_build_language_type_c_e) { + path_sources = &main->path_sources_c; + } + else { + path_sources = &main->path_sources_cpp; + } + } + else if (main->parameters.array[fake_parameter_path_sources_e].result != f_console_result_additional_e) { + path_sources = &data_build->setting.path_sources; + } + + for (; i < 2; ++i) { + + for (j = 0; j < sources[i]->used; ++j) { + + if (!sources[i]->array[j].used) continue; + + source.used = path_sources->used + sources[i]->array[j].used; + + char source_string[source.used + 1]; + source.string = source_string; + source_string[source.used] = 0; + + memcpy(source_string, path_sources->string, path_sources->used); + memcpy(source_string + path_sources->used, sources[i]->array[j].string, sources[i]->array[j].used); + + status = fll_execute_arguments_add(source, arguments); + if (F_status_is_error(status)) return status; + } // for + } // for + + return F_none; + } +#endif // _di_fake_build_sources_add_ + +#ifndef _di_fake_build_sources_object_add_ + f_status_t fake_build_sources_object_add(fake_main_t * const main, fake_build_data_t * const data_build, const f_string_static_t *generic, const f_string_static_t *specific, f_string_dynamics_t *arguments) { + + if (!generic->used && !specific->used) return F_none; + + f_status_t status = F_none; + + f_string_static_t source = f_string_static_t_initialize; + f_string_dynamic_t *path_sources = &main->path_sources_object; + + // @fixme review this, these paths (like path_sources_object) need to be build on a per-settings basis rather than using a global value. + if (data_build->setting.path_standard) { + if (data_build->setting.build_language == fake_build_language_type_c_e) { + path_sources = &main->path_sources_object_c; + } + else { + path_sources = &main->path_sources_object_cpp; + } + } + else if (main->parameters.array[fake_parameter_path_sources_e].result != f_console_result_additional_e) { + path_sources = &data_build->setting.path_sources_object; + } + + if (specific->used) { + source.used = path_sources->used + specific->used; + } + else { + source.used = path_sources->used + generic->used; + } + + char source_string[source.used + 1]; + source.string = source_string; + source_string[source.used] = 0; + + memcpy(source_string, path_sources->string, path_sources->used); + + if (specific->used) { + memcpy(source_string + path_sources->used, specific->string, specific->used); + } + else { + memcpy(source_string + path_sources->used, generic->string, generic->used); + } + + status = fll_execute_arguments_add(source, arguments); + if (F_status_is_error(status)) return status; + + return F_none; + } +#endif // _di_fake_build_sources_object_add_ + #ifndef _di_fake_build_touch_ void fake_build_touch(fake_main_t * const main, const f_string_dynamic_t file, f_status_t *status) { diff --git a/level_3/fake/c/private-build.h b/level_3/fake/c/private-build.h index f824d5e..732a9be 100644 --- a/level_3/fake/c/private-build.h +++ b/level_3/fake/c/private-build.h @@ -33,6 +33,22 @@ extern "C" { #endif // _di_fake_build_strings_ /** + * Build Types. + * + * fake_build_type_*: + * - library: A library build type. + * - object: An object build type. + * - program: A program build type. + */ +#ifndef _di_fake_build_types_ + enum { + fake_build_type_library_e = 1, + fake_build_type_object_e, + fake_build_type_program_e, + }; +#endif // _di_fake_build_types_ + +/** * Add the standard arguments for building a library/program. * * @param main @@ -42,9 +58,8 @@ extern "C" { * @param is_shared * Set to TRUE to designate that this is adding for a shared library/program. * Set to FALSE to designate that this is adding for a static library/program. - * @param is_library - * Set to TRUE to designate that this is adding for a library. - * Set to FALSE to designate that this is adding for a program. + * @param type + * A build type from the fake_build_type_* enumeration. * @param arguments * The arguments array to append to. * @param status @@ -53,7 +68,7 @@ extern "C" { * @see fll_execute_arguments_add() */ #ifndef _di_fake_build_arguments_standard_add_ - extern void fake_build_arguments_standard_add(fake_main_t * const main, const fake_build_data_t data_build, const bool is_shared, const bool is_library, f_string_dynamics_t *arguments, f_status_t *status) F_attribute_visibility_internal_d; + extern void fake_build_arguments_standard_add(fake_main_t * const main, fake_build_data_t * const data_build, const bool is_shared, const uint8_t type, f_string_dynamics_t *arguments, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_arguments_standard_add_ /** @@ -100,7 +115,7 @@ extern "C" { * @param main * The main program data. * @param data_build - * All build related main. + * The build data. * @param process_script * The setting_data file name fo the appropriate process script. * This is expected to be either setting.process_pre or setting.process_post. @@ -116,7 +131,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_execute_process_script_ - extern int fake_build_execute_process_script(fake_main_t * const main, const fake_build_data_t data_build, const f_string_static_t process_script, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; + extern int fake_build_execute_process_script(fake_main_t * const main, fake_build_data_t * const data_build, const f_string_static_t process_script, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_execute_process_script_ /** @@ -139,6 +154,32 @@ extern "C" { #endif // _di_fake_build_get_file_name_without_extension_ /** + * Add the pre-compiled objects to the execute arguments array (such as "build_objects_library"). + * + * @param main + * The main program data. + * @param data_build + * The build data. + * @param path + * The sub-path to find the object files within. + * @param generic + * The generic sources to add. + * @param specific + * The specific sources to add. + * @param arguments + * The execute arguments array being updated. + * + * @return + * F_none on success. + * + * Status codes (with error bit) are returned on any problem. + */ +#ifndef _di_fake_build_objects_add_ + extern f_status_t fake_build_objects_add(fake_main_t * const main, fake_build_data_t * const data_build, const f_string_static_t *path, const f_string_statics_t *generic, const f_string_statics_t *specific, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d; +#endif // _di_fake_build_objects_add_ + + +/** * Execute the build operation. * * @param setting_file @@ -157,6 +198,52 @@ extern "C" { #endif // _di_fake_build_operate_ /** + * Add the sources to the execute arguments array. + * + * @param main + * The main program data. + * @param data_build + * The build data. + * @param generic + * The generic sources to add. + * @param specific + * The specific sources to add. + * @param arguments + * The execute arguments array being updated. + * + * @return + * F_none on success. + * + * Status codes (with error bit) are returned on any problem. + */ +#ifndef _di_fake_build_sources_add_ + extern f_status_t fake_build_sources_add(fake_main_t * const main, fake_build_data_t * const data_build, const f_string_statics_t *generic, const f_string_statics_t *specific, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d; +#endif // _di_fake_build_sources_add_ + +/** + * Add the sources object to the execute arguments array. + * + * @param main + * The main program data. + * @param data_build + * The build data. + * @param generic + * The generic sources to add. + * @param specific + * The specific sources to add. + * @param arguments + * The execute arguments array being updated. + * + * @return + * F_none on success. + * + * Status codes (with error bit) are returned on any problem. + */ +#ifndef _di_fake_build_sources_object_add_ + extern f_status_t fake_build_sources_object_add(fake_main_t * const main, fake_build_data_t * const data_build, const f_string_static_t *generic, const f_string_static_t *specific, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d; +#endif // _di_fake_build_sources_object_add_ + +/** * Touch the given build stage file, but only if there are no current errors in status. * * @param main diff --git a/level_3/fake/c/private-common.c b/level_3/fake/c/private-common.c index a6b0ae0..153ee77 100644 --- a/level_3/fake/c/private-common.c +++ b/level_3/fake/c/private-common.c @@ -7,6 +7,12 @@ extern "C" { #endif #ifndef _di_fake_build_setting_t_ + const f_string_static_t fake_build_setting_default_ar_s = macro_f_string_static_t_initialize(FAKE_build_setting_default_ar_s, 0, FAKE_build_setting_default_ar_s_length); + const f_string_static_t fake_build_setting_default_gcc_s = macro_f_string_static_t_initialize(FAKE_build_setting_default_gcc_s, 0, FAKE_build_setting_default_gcc_s_length); + const f_string_static_t fake_build_setting_default_version_s = macro_f_string_static_t_initialize(FAKE_build_setting_default_version_s, 0, FAKE_build_setting_default_version_s_length); + const f_string_static_t fake_build_setting_default_version_prefix_s = macro_f_string_static_t_initialize(FAKE_build_setting_default_version_prefix_s, 0, FAKE_build_setting_default_version_prefix_s_length); + 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_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); @@ -15,6 +21,12 @@ extern "C" { 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); const f_string_static_t fake_build_setting_name_build_name_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_name_s, 0, FAKE_build_setting_name_build_name_s_length); + const f_string_static_t fake_build_setting_name_build_objects_library_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_objects_library_s, 0, FAKE_build_setting_name_build_objects_library_s_length); + const f_string_static_t fake_build_setting_name_build_objects_library_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_objects_library_shared_s, 0, FAKE_build_setting_name_build_objects_library_shared_s_length); + const f_string_static_t fake_build_setting_name_build_objects_library_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_objects_library_static_s, 0, FAKE_build_setting_name_build_objects_library_static_s_length); + const f_string_static_t fake_build_setting_name_build_objects_program_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_objects_program_s, 0, FAKE_build_setting_name_build_objects_program_s_length); + const f_string_static_t fake_build_setting_name_build_objects_program_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_objects_program_shared_s, 0, FAKE_build_setting_name_build_objects_program_shared_s_length); + const f_string_static_t fake_build_setting_name_build_objects_program_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_objects_program_static_s, 0, FAKE_build_setting_name_build_objects_program_static_s_length); const f_string_static_t fake_build_setting_name_build_script_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_script_s, 0, FAKE_build_setting_name_build_script_s_length); const f_string_static_t fake_build_setting_name_build_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_shared_s, 0, FAKE_build_setting_name_build_shared_s_length); const f_string_static_t fake_build_setting_name_build_sources_headers_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_headers_s, 0, FAKE_build_setting_name_build_sources_headers_s_length); @@ -23,6 +35,9 @@ extern "C" { const f_string_static_t fake_build_setting_name_build_sources_library_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_library_s, 0, FAKE_build_setting_name_build_sources_library_s_length); const f_string_static_t fake_build_setting_name_build_sources_library_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_library_shared_s, 0, FAKE_build_setting_name_build_sources_library_shared_s_length); const f_string_static_t fake_build_setting_name_build_sources_library_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_library_static_s, 0, FAKE_build_setting_name_build_sources_library_static_s_length); + const f_string_static_t fake_build_setting_name_build_sources_object_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_object_s, 0, FAKE_build_setting_name_build_sources_object_s_length); + const f_string_static_t fake_build_setting_name_build_sources_object_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_object_shared_s, 0, FAKE_build_setting_name_build_sources_object_shared_s_length); + const f_string_static_t fake_build_setting_name_build_sources_object_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_object_static_s, 0, FAKE_build_setting_name_build_sources_object_static_s_length); const f_string_static_t fake_build_setting_name_build_sources_program_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_program_s, 0, FAKE_build_setting_name_build_sources_program_s_length); const f_string_static_t fake_build_setting_name_build_sources_program_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_program_shared_s, 0, FAKE_build_setting_name_build_sources_program_shared_s_length); const f_string_static_t fake_build_setting_name_build_sources_program_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_program_static_s, 0, FAKE_build_setting_name_build_sources_program_static_s_length); @@ -33,6 +48,9 @@ extern "C" { const f_string_static_t fake_build_setting_name_defines_library_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_library_s, 0, FAKE_build_setting_name_defines_library_s_length); const f_string_static_t fake_build_setting_name_defines_library_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_library_shared_s, 0, FAKE_build_setting_name_defines_library_shared_s_length); const f_string_static_t fake_build_setting_name_defines_library_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_library_static_s, 0, FAKE_build_setting_name_defines_library_static_s_length); + const f_string_static_t fake_build_setting_name_defines_object_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_object_s, 0, FAKE_build_setting_name_defines_object_s_length); + const f_string_static_t fake_build_setting_name_defines_object_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_object_shared_s, 0, FAKE_build_setting_name_defines_object_shared_s_length); + const f_string_static_t fake_build_setting_name_defines_object_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_object_static_s, 0, FAKE_build_setting_name_defines_object_static_s_length); const f_string_static_t fake_build_setting_name_defines_program_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_program_s, 0, FAKE_build_setting_name_defines_program_s_length); const f_string_static_t fake_build_setting_name_defines_program_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_program_shared_s, 0, FAKE_build_setting_name_defines_program_shared_s_length); const f_string_static_t fake_build_setting_name_defines_program_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_program_static_s, 0, FAKE_build_setting_name_defines_program_static_s_length); @@ -43,6 +61,9 @@ extern "C" { const f_string_static_t fake_build_setting_name_flags_library_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_library_s, 0, FAKE_build_setting_name_flags_library_s_length); const f_string_static_t fake_build_setting_name_flags_library_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_library_shared_s, 0, FAKE_build_setting_name_flags_library_shared_s_length); const f_string_static_t fake_build_setting_name_flags_library_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_library_static_s, 0, FAKE_build_setting_name_flags_library_static_s_length); + const f_string_static_t fake_build_setting_name_flags_object_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_object_s, 0, FAKE_build_setting_name_flags_object_s_length); + const f_string_static_t fake_build_setting_name_flags_object_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_object_shared_s, 0, FAKE_build_setting_name_flags_object_shared_s_length); + const f_string_static_t fake_build_setting_name_flags_object_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_object_static_s, 0, FAKE_build_setting_name_flags_object_static_s_length); const f_string_static_t fake_build_setting_name_flags_program_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_program_s, 0, FAKE_build_setting_name_flags_program_s_length); const f_string_static_t fake_build_setting_name_flags_program_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_program_shared_s, 0, FAKE_build_setting_name_flags_program_shared_s_length); const f_string_static_t fake_build_setting_name_flags_program_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_program_static_s, 0, FAKE_build_setting_name_flags_program_static_s_length); @@ -56,10 +77,14 @@ extern "C" { const f_string_static_t fake_build_setting_name_path_library_script_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_library_script_s, 0, FAKE_build_setting_name_path_library_script_s_length); const f_string_static_t fake_build_setting_name_path_library_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_library_shared_s, 0, FAKE_build_setting_name_path_library_shared_s_length); const f_string_static_t fake_build_setting_name_path_library_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_library_static_s, 0, FAKE_build_setting_name_path_library_static_s_length); + const f_string_static_t fake_build_setting_name_path_object_script_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_object_script_s, 0, FAKE_build_setting_name_path_object_script_s_length); + const f_string_static_t fake_build_setting_name_path_object_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_object_shared_s, 0, FAKE_build_setting_name_path_object_shared_s_length); + const f_string_static_t fake_build_setting_name_path_object_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_object_static_s, 0, FAKE_build_setting_name_path_object_static_s_length); const f_string_static_t fake_build_setting_name_path_program_script_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_program_script_s, 0, FAKE_build_setting_name_path_program_script_s_length); const f_string_static_t fake_build_setting_name_path_program_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_program_shared_s, 0, FAKE_build_setting_name_path_program_shared_s_length); const f_string_static_t fake_build_setting_name_path_program_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_program_static_s, 0, FAKE_build_setting_name_path_program_static_s_length); const f_string_static_t fake_build_setting_name_path_sources_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_sources_s, 0, FAKE_build_setting_name_path_sources_s_length); + const f_string_static_t fake_build_setting_name_path_sources_object_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_sources_object_s, 0, FAKE_build_setting_name_path_sources_object_s_length); const f_string_static_t fake_build_setting_name_path_standard_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_standard_s, 0, FAKE_build_setting_name_path_standard_s_length); const f_string_static_t fake_build_setting_name_process_post_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_process_post_s, 0, FAKE_build_setting_name_process_post_s_length); const f_string_static_t fake_build_setting_name_process_pre_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_process_pre_s, 0, FAKE_build_setting_name_process_pre_s_length); @@ -76,22 +101,22 @@ extern "C" { const f_string_static_t fake_build_setting_name_version_nano_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_nano_s, 0, FAKE_build_setting_name_version_nano_s_length); const f_string_static_t fake_build_setting_name_version_nano_prefix_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_nano_prefix_s, 0, FAKE_build_setting_name_version_nano_prefix_s_length); const f_string_static_t fake_build_setting_name_version_target_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_target_s, 0, FAKE_build_setting_name_version_target_s_length); - - const f_string_static_t fake_build_setting_default_version_s = macro_f_string_static_t_initialize(FAKE_build_setting_default_version_s, 0, FAKE_build_setting_default_version_s_length); - const f_string_static_t fake_build_setting_default_version_prefix_s = macro_f_string_static_t_initialize(FAKE_build_setting_default_version_prefix_s, 0, FAKE_build_setting_default_version_prefix_s_length); #endif // _di_fake_build_setting_t_ #ifndef _di_fake_build_stage_t_ const f_string_static_t fake_build_stage_built_s = macro_f_string_static_t_initialize(FAKE_build_stage_built_s, 0, FAKE_build_stage_built_s_length); - const f_string_static_t fake_build_stage_libraries_script_s = macro_f_string_static_t_initialize(FAKE_build_stage_libraries_script_s, 0, FAKE_build_stage_libraries_script_s_length); - const f_string_static_t fake_build_stage_libraries_shared_s = macro_f_string_static_t_initialize(FAKE_build_stage_libraries_shared_s, 0, FAKE_build_stage_libraries_shared_s_length); - const f_string_static_t fake_build_stage_libraries_static_s = macro_f_string_static_t_initialize(FAKE_build_stage_libraries_static_s, 0, FAKE_build_stage_libraries_static_s_length); + const f_string_static_t fake_build_stage_library_script_s = macro_f_string_static_t_initialize(FAKE_build_stage_library_script_s, 0, FAKE_build_stage_library_script_s_length); + const f_string_static_t fake_build_stage_library_shared_s = macro_f_string_static_t_initialize(FAKE_build_stage_library_shared_s, 0, FAKE_build_stage_library_shared_s_length); + const f_string_static_t fake_build_stage_library_static_s = macro_f_string_static_t_initialize(FAKE_build_stage_library_static_s, 0, FAKE_build_stage_library_static_s_length); + const f_string_static_t fake_build_stage_object_script_s = macro_f_string_static_t_initialize(FAKE_build_stage_object_script_s, 0, FAKE_build_stage_object_script_s_length); + const f_string_static_t fake_build_stage_object_shared_s = macro_f_string_static_t_initialize(FAKE_build_stage_object_shared_s, 0, FAKE_build_stage_object_shared_s_length); + const f_string_static_t fake_build_stage_object_static_s = macro_f_string_static_t_initialize(FAKE_build_stage_object_static_s, 0, FAKE_build_stage_object_static_s_length); const f_string_static_t fake_build_stage_objects_static_s = macro_f_string_static_t_initialize(FAKE_build_stage_objects_static_s, 0, FAKE_build_stage_objects_static_s_length); const f_string_static_t fake_build_stage_process_post_s = macro_f_string_static_t_initialize(FAKE_build_stage_process_post_s, 0, FAKE_build_stage_process_post_s_length); const f_string_static_t fake_build_stage_process_pre_s = macro_f_string_static_t_initialize(FAKE_build_stage_process_pre_s, 0, FAKE_build_stage_process_pre_s_length); - const f_string_static_t fake_build_stage_programs_script_s = macro_f_string_static_t_initialize(FAKE_build_stage_programs_script_s, 0, FAKE_build_stage_programs_script_s_length); - const f_string_static_t fake_build_stage_programs_shared_s = macro_f_string_static_t_initialize(FAKE_build_stage_programs_shared_s, 0, FAKE_build_stage_programs_shared_s_length); - const f_string_static_t fake_build_stage_programs_static_s = macro_f_string_static_t_initialize(FAKE_build_stage_programs_static_s, 0, FAKE_build_stage_programs_static_s_length); + const f_string_static_t fake_build_stage_program_script_s = macro_f_string_static_t_initialize(FAKE_build_stage_program_script_s, 0, FAKE_build_stage_program_script_s_length); + const f_string_static_t fake_build_stage_program_shared_s = macro_f_string_static_t_initialize(FAKE_build_stage_program_shared_s, 0, FAKE_build_stage_program_shared_s_length); + const f_string_static_t fake_build_stage_program_static_s = macro_f_string_static_t_initialize(FAKE_build_stage_program_static_s, 0, FAKE_build_stage_program_static_s_length); const f_string_static_t fake_build_stage_separate_s = macro_f_string_static_t_initialize(FAKE_build_stage_separate_s, 0, FAKE_build_stage_separate_s_length); const f_string_static_t fake_build_stage_skeleton_s = macro_f_string_static_t_initialize(FAKE_build_stage_skeleton_s, 0, FAKE_build_stage_skeleton_s_length); const f_string_static_t fake_build_stage_sources_headers_s = macro_f_string_static_t_initialize(FAKE_build_stage_sources_headers_s, 0, FAKE_build_stage_sources_headers_s_length); diff --git a/level_3/fake/c/private-common.h b/level_3/fake/c/private-common.h index f6c7ee3..ca2a97b 100644 --- a/level_3/fake/c/private-common.h +++ b/level_3/fake/c/private-common.h @@ -33,15 +33,22 @@ extern "C" { f_string_dynamic_t build_compiler; f_string_dynamic_t build_indexer; f_string_dynamic_t build_name; + f_string_dynamic_t build_sources_object; + f_string_dynamic_t build_sources_object_shared; + f_string_dynamic_t build_sources_object_static; f_string_dynamic_t path_headers; f_string_dynamic_t path_language; f_string_dynamic_t path_library_script; f_string_dynamic_t path_library_shared; f_string_dynamic_t path_library_static; + f_string_dynamic_t path_object_script; + f_string_dynamic_t path_object_shared; + f_string_dynamic_t path_object_static; f_string_dynamic_t path_program_script; f_string_dynamic_t path_program_shared; f_string_dynamic_t path_program_static; f_string_dynamic_t path_sources; + f_string_dynamic_t path_sources_object; f_string_dynamic_t process_post; f_string_dynamic_t process_pre; f_string_dynamic_t version_major; @@ -57,6 +64,12 @@ extern "C" { f_string_dynamics_t build_libraries; f_string_dynamics_t build_libraries_shared; f_string_dynamics_t build_libraries_static; + f_string_dynamics_t build_objects_library; + f_string_dynamics_t build_objects_library_shared; + f_string_dynamics_t build_objects_library_static; + f_string_dynamics_t build_objects_program; + f_string_dynamics_t build_objects_program_shared; + f_string_dynamics_t build_objects_program_static; f_string_dynamics_t build_sources_headers; f_string_dynamics_t build_sources_headers_shared; f_string_dynamics_t build_sources_headers_static; @@ -72,6 +85,9 @@ extern "C" { f_string_dynamics_t defines_library; f_string_dynamics_t defines_library_shared; f_string_dynamics_t defines_library_static; + f_string_dynamics_t defines_object; + f_string_dynamics_t defines_object_shared; + f_string_dynamics_t defines_object_static; f_string_dynamics_t defines_program; f_string_dynamics_t defines_program_shared; f_string_dynamics_t defines_program_static; @@ -82,6 +98,9 @@ extern "C" { f_string_dynamics_t flags_library; f_string_dynamics_t flags_library_shared; f_string_dynamics_t flags_library_static; + f_string_dynamics_t flags_object; + f_string_dynamics_t flags_object_shared; + f_string_dynamics_t flags_object_static; f_string_dynamics_t flags_program; f_string_dynamics_t flags_program_shared; f_string_dynamics_t flags_program_static; @@ -125,6 +144,25 @@ 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_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, \ @@ -167,15 +205,22 @@ extern "C" { 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_name) \ + macro_f_string_dynamic_t_delete_simple(setting.build_sources_object) \ + macro_f_string_dynamic_t_delete_simple(setting.build_sources_object_shared) \ + macro_f_string_dynamic_t_delete_simple(setting.build_sources_object_static) \ macro_f_string_dynamic_t_delete_simple(setting.path_headers) \ macro_f_string_dynamic_t_delete_simple(setting.path_language) \ macro_f_string_dynamic_t_delete_simple(setting.path_library_script) \ macro_f_string_dynamic_t_delete_simple(setting.path_library_shared) \ macro_f_string_dynamic_t_delete_simple(setting.path_library_static) \ + macro_f_string_dynamic_t_delete_simple(setting.path_object_script) \ + macro_f_string_dynamic_t_delete_simple(setting.path_object_shared) \ + macro_f_string_dynamic_t_delete_simple(setting.path_object_static) \ macro_f_string_dynamic_t_delete_simple(setting.path_program_script) \ macro_f_string_dynamic_t_delete_simple(setting.path_program_shared) \ macro_f_string_dynamic_t_delete_simple(setting.path_program_static) \ macro_f_string_dynamic_t_delete_simple(setting.path_sources) \ + macro_f_string_dynamic_t_delete_simple(setting.path_sources_object) \ macro_f_string_dynamic_t_delete_simple(setting.process_post) \ macro_f_string_dynamic_t_delete_simple(setting.process_pre) \ macro_f_string_dynamic_t_delete_simple(setting.version_major) \ @@ -190,6 +235,12 @@ extern "C" { macro_f_string_dynamics_t_delete_simple(setting.build_libraries) \ macro_f_string_dynamics_t_delete_simple(setting.build_libraries_shared) \ macro_f_string_dynamics_t_delete_simple(setting.build_libraries_static) \ + macro_f_string_dynamics_t_delete_simple(setting.build_objects_library) \ + macro_f_string_dynamics_t_delete_simple(setting.build_objects_library_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.build_objects_library_static) \ + macro_f_string_dynamics_t_delete_simple(setting.build_objects_program) \ + macro_f_string_dynamics_t_delete_simple(setting.build_objects_program_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.build_objects_program_static) \ macro_f_string_dynamics_t_delete_simple(setting.build_sources_headers) \ macro_f_string_dynamics_t_delete_simple(setting.build_sources_headers_shared) \ macro_f_string_dynamics_t_delete_simple(setting.build_sources_headers_static) \ @@ -205,6 +256,9 @@ extern "C" { macro_f_string_dynamics_t_delete_simple(setting.defines_library) \ macro_f_string_dynamics_t_delete_simple(setting.defines_library_shared) \ macro_f_string_dynamics_t_delete_simple(setting.defines_library_static) \ + macro_f_string_dynamics_t_delete_simple(setting.defines_object) \ + macro_f_string_dynamics_t_delete_simple(setting.defines_object_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.defines_object_static) \ macro_f_string_dynamics_t_delete_simple(setting.defines_program) \ macro_f_string_dynamics_t_delete_simple(setting.defines_program_shared) \ macro_f_string_dynamics_t_delete_simple(setting.defines_program_static) \ @@ -215,6 +269,9 @@ extern "C" { macro_f_string_dynamics_t_delete_simple(setting.flags_library) \ macro_f_string_dynamics_t_delete_simple(setting.flags_library_shared) \ macro_f_string_dynamics_t_delete_simple(setting.flags_library_static) \ + macro_f_string_dynamics_t_delete_simple(setting.flags_object) \ + macro_f_string_dynamics_t_delete_simple(setting.flags_object_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.flags_object_static) \ macro_f_string_dynamics_t_delete_simple(setting.flags_program) \ macro_f_string_dynamics_t_delete_simple(setting.flags_program_shared) \ macro_f_string_dynamics_t_delete_simple(setting.flags_program_static) \ @@ -223,6 +280,12 @@ extern "C" { macro_f_string_dynamics_t_delete_simple(setting.modes) \ macro_f_string_dynamics_t_delete_simple(setting.modes_default) + #define FAKE_build_setting_default_ar_s "ar" + #define FAKE_build_setting_default_gcc_s "gcc" + #define FAKE_build_setting_default_version_s "0" + #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" @@ -231,6 +294,12 @@ extern "C" { #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_headers_s "build_sources_headers" @@ -239,6 +308,9 @@ extern "C" { #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" @@ -249,6 +321,9 @@ extern "C" { #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" @@ -259,6 +334,9 @@ extern "C" { #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" @@ -272,10 +350,14 @@ extern "C" { #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_object_s "path_sources_object" #define FAKE_build_setting_name_path_standard_s "path_standard" #define FAKE_build_setting_name_process_post_s "process_post" #define FAKE_build_setting_name_process_pre_s "process_pre" @@ -293,6 +375,12 @@ extern "C" { #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 + #define FAKE_build_setting_default_version_s_length 1 + #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 @@ -301,6 +389,12 @@ extern "C" { #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_headers_s_length 21 @@ -309,6 +403,9 @@ extern "C" { #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 @@ -320,6 +417,9 @@ extern "C" { #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 @@ -329,6 +429,9 @@ extern "C" { #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 @@ -342,10 +445,14 @@ extern "C" { #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_object_s_length 19 #define FAKE_build_setting_name_path_standard_s_length 13 #define FAKE_build_setting_name_process_post_s_length 12 #define FAKE_build_setting_name_process_pre_s_length 11 @@ -363,6 +470,12 @@ extern "C" { #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; + extern const f_string_static_t fake_build_setting_default_version_s; + extern const f_string_static_t fake_build_setting_default_version_prefix_s; + 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_indexer_s; extern const f_string_static_t fake_build_setting_name_build_indexer_arguments_s; @@ -371,6 +484,12 @@ extern "C" { 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; extern const f_string_static_t fake_build_setting_name_build_name_s; + extern const f_string_static_t fake_build_setting_name_build_objects_library_s; + extern const f_string_static_t fake_build_setting_name_build_objects_library_shared_s; + extern const f_string_static_t fake_build_setting_name_build_objects_library_static_s; + extern const f_string_static_t fake_build_setting_name_build_objects_program_s; + extern const f_string_static_t fake_build_setting_name_build_objects_program_shared_s; + extern const f_string_static_t fake_build_setting_name_build_objects_program_static_s; extern const f_string_static_t fake_build_setting_name_build_script_s; extern const f_string_static_t fake_build_setting_name_build_shared_s; extern const f_string_static_t fake_build_setting_name_build_sources_headers_s; @@ -379,6 +498,9 @@ extern "C" { extern const f_string_static_t fake_build_setting_name_build_sources_library_s; extern const f_string_static_t fake_build_setting_name_build_sources_library_shared_s; extern const f_string_static_t fake_build_setting_name_build_sources_library_static_s; + extern const f_string_static_t fake_build_setting_name_build_sources_object_s; + extern const f_string_static_t fake_build_setting_name_build_sources_object_shared_s; + extern const f_string_static_t fake_build_setting_name_build_sources_object_static_s; extern const f_string_static_t fake_build_setting_name_build_sources_program_s; extern const f_string_static_t fake_build_setting_name_build_sources_program_shared_s; extern const f_string_static_t fake_build_setting_name_build_sources_program_static_s; @@ -389,6 +511,9 @@ extern "C" { extern const f_string_static_t fake_build_setting_name_defines_library_s; extern const f_string_static_t fake_build_setting_name_defines_library_shared_s; extern const f_string_static_t fake_build_setting_name_defines_library_static_s; + extern const f_string_static_t fake_build_setting_name_defines_object_s; + extern const f_string_static_t fake_build_setting_name_defines_object_shared_s; + extern const f_string_static_t fake_build_setting_name_defines_object_static_s; extern const f_string_static_t fake_build_setting_name_defines_program_s; extern const f_string_static_t fake_build_setting_name_defines_program_shared_s; extern const f_string_static_t fake_build_setting_name_defines_program_static_s; @@ -399,6 +524,9 @@ extern "C" { extern const f_string_static_t fake_build_setting_name_flags_library_s; extern const f_string_static_t fake_build_setting_name_flags_library_shared_s; extern const f_string_static_t fake_build_setting_name_flags_library_static_s; + extern const f_string_static_t fake_build_setting_name_flags_object_s; + extern const f_string_static_t fake_build_setting_name_flags_object_shared_s; + extern const f_string_static_t fake_build_setting_name_flags_object_static_s; extern const f_string_static_t fake_build_setting_name_flags_program_s; extern const f_string_static_t fake_build_setting_name_flags_program_shared_s; extern const f_string_static_t fake_build_setting_name_flags_program_static_s; @@ -412,10 +540,14 @@ extern "C" { extern const f_string_static_t fake_build_setting_name_path_library_script_s; extern const f_string_static_t fake_build_setting_name_path_library_shared_s; extern const f_string_static_t fake_build_setting_name_path_library_static_s; + extern const f_string_static_t fake_build_setting_name_path_object_script_s; + extern const f_string_static_t fake_build_setting_name_path_object_shared_s; + extern const f_string_static_t fake_build_setting_name_path_object_static_s; extern const f_string_static_t fake_build_setting_name_path_program_script_s; extern const f_string_static_t fake_build_setting_name_path_program_shared_s; extern const f_string_static_t fake_build_setting_name_path_program_static_s; extern const f_string_static_t fake_build_setting_name_path_sources_s; + extern const f_string_static_t fake_build_setting_name_path_sources_object_s; extern const f_string_static_t fake_build_setting_name_path_standard_s; extern const f_string_static_t fake_build_setting_name_process_post_s; extern const f_string_static_t fake_build_setting_name_process_pre_s; @@ -433,29 +565,23 @@ 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 69 - - #define FAKE_build_setting_default_version_s "0" - #define FAKE_build_setting_default_version_prefix_s "." - - #define FAKE_build_setting_default_version_s_length 1 - #define FAKE_build_setting_default_version_prefix_s_length 1 - - extern const f_string_static_t fake_build_setting_default_version_s; - extern const f_string_static_t fake_build_setting_default_version_prefix_s; + #define fake_build_setting_total_d 88 #endif // _di_fake_build_setting_t_ #ifndef _di_fake_build_stage_t_ typedef struct { - f_string_dynamic_t file_libraries_script; - f_string_dynamic_t file_libraries_shared; - f_string_dynamic_t file_libraries_static; + f_string_dynamic_t file_library_script; + f_string_dynamic_t file_library_shared; + f_string_dynamic_t file_library_static; + f_string_dynamic_t file_object_script; + f_string_dynamic_t file_object_shared; + f_string_dynamic_t file_object_static; f_string_dynamic_t file_objects_static; f_string_dynamic_t file_process_post; f_string_dynamic_t file_process_pre; - f_string_dynamic_t file_programs_script; - f_string_dynamic_t file_programs_shared; - f_string_dynamic_t file_programs_static; + f_string_dynamic_t file_program_script; + f_string_dynamic_t file_program_shared; + f_string_dynamic_t file_program_static; f_string_dynamic_t file_skeleton; f_string_dynamic_t file_sources_headers; f_string_dynamic_t file_sources_script; @@ -476,35 +602,44 @@ 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_dynamic_t_initialize, \ } - #define fake_build_stage_total_d 13 + #define fake_build_stage_total_d 16 #define macro_fake_build_stage_t_delete_simple(stage) \ - macro_f_string_dynamic_t_delete_simple(stage.file_libraries_script) \ - macro_f_string_dynamic_t_delete_simple(stage.file_libraries_shared) \ - macro_f_string_dynamic_t_delete_simple(stage.file_libraries_static) \ + macro_f_string_dynamic_t_delete_simple(stage.file_library_script) \ + macro_f_string_dynamic_t_delete_simple(stage.file_library_shared) \ + macro_f_string_dynamic_t_delete_simple(stage.file_library_static) \ + macro_f_string_dynamic_t_delete_simple(stage.file_object_script) \ + macro_f_string_dynamic_t_delete_simple(stage.file_object_shared) \ + macro_f_string_dynamic_t_delete_simple(stage.file_object_static) \ macro_f_string_dynamic_t_delete_simple(stage.file_objects_static) \ macro_f_string_dynamic_t_delete_simple(stage.file_process_post) \ macro_f_string_dynamic_t_delete_simple(stage.file_process_pre) \ - macro_f_string_dynamic_t_delete_simple(stage.file_programs_script) \ - macro_f_string_dynamic_t_delete_simple(stage.file_programs_shared) \ - macro_f_string_dynamic_t_delete_simple(stage.file_programs_static) \ + macro_f_string_dynamic_t_delete_simple(stage.file_program_script) \ + macro_f_string_dynamic_t_delete_simple(stage.file_program_shared) \ + macro_f_string_dynamic_t_delete_simple(stage.file_program_static) \ macro_f_string_dynamic_t_delete_simple(stage.file_skeleton) \ macro_f_string_dynamic_t_delete_simple(stage.file_sources_headers) \ macro_f_string_dynamic_t_delete_simple(stage.file_sources_script) \ macro_f_string_dynamic_t_delete_simple(stage.file_sources_settings) #define FAKE_build_stage_built_s ".built" - #define FAKE_build_stage_libraries_script_s "libraries_script" - #define FAKE_build_stage_libraries_shared_s "libraries_shared" - #define FAKE_build_stage_libraries_static_s "libraries_static" + #define FAKE_build_stage_library_script_s "library_script" + #define FAKE_build_stage_library_shared_s "library_shared" + #define FAKE_build_stage_library_static_s "library_static" + #define FAKE_build_stage_object_script_s "object_script" + #define FAKE_build_stage_object_shared_s "object_shared" + #define FAKE_build_stage_object_static_s "object_static" #define FAKE_build_stage_objects_static_s "objects_static" #define FAKE_build_stage_process_post_s "process_post" #define FAKE_build_stage_process_pre_s "process_pre" - #define FAKE_build_stage_programs_script_s "programs_script" - #define FAKE_build_stage_programs_shared_s "programs_shared" - #define FAKE_build_stage_programs_static_s "programs_static" + #define FAKE_build_stage_program_script_s "program_script" + #define FAKE_build_stage_program_shared_s "program_shared" + #define FAKE_build_stage_program_static_s "program_static" #define FAKE_build_stage_separate_s "-" #define FAKE_build_stage_skeleton_s "skeleton" #define FAKE_build_stage_sources_headers_s "sources_headers" @@ -512,15 +647,18 @@ extern "C" { #define FAKE_build_stage_sources_settings_s "sources_settings" #define FAKE_build_stage_built_s_length 6 - #define FAKE_build_stage_libraries_script_s_length 16 - #define FAKE_build_stage_libraries_shared_s_length 16 - #define FAKE_build_stage_libraries_static_s_length 16 + #define FAKE_build_stage_library_script_s_length 14 + #define FAKE_build_stage_library_shared_s_length 14 + #define FAKE_build_stage_library_static_s_length 14 + #define FAKE_build_stage_object_script_s_length 13 + #define FAKE_build_stage_object_shared_s_length 13 + #define FAKE_build_stage_object_static_s_length 13 #define FAKE_build_stage_objects_static_s_length 14 #define FAKE_build_stage_process_post_s_length 12 #define FAKE_build_stage_process_pre_s_length 11 - #define FAKE_build_stage_programs_script_s_length 15 - #define FAKE_build_stage_programs_shared_s_length 15 - #define FAKE_build_stage_programs_static_s_length 15 + #define FAKE_build_stage_program_script_s_length 14 + #define FAKE_build_stage_program_shared_s_length 14 + #define FAKE_build_stage_program_static_s_length 14 #define FAKE_build_stage_separate_s_length 1 #define FAKE_build_stage_skeleton_s_length 8 #define FAKE_build_stage_sources_headers_s_length 15 @@ -528,15 +666,18 @@ extern "C" { #define FAKE_build_stage_sources_settings_s_length 16 extern const f_string_static_t fake_build_stage_built_s; - extern const f_string_static_t fake_build_stage_libraries_script_s; - extern const f_string_static_t fake_build_stage_libraries_shared_s; - extern const f_string_static_t fake_build_stage_libraries_static_s; + extern const f_string_static_t fake_build_stage_library_script_s; + extern const f_string_static_t fake_build_stage_library_shared_s; + extern const f_string_static_t fake_build_stage_library_static_s; + extern const f_string_static_t fake_build_stage_object_script_s; + extern const f_string_static_t fake_build_stage_object_shared_s; + extern const f_string_static_t fake_build_stage_object_static_s; extern const f_string_static_t fake_build_stage_objects_static_s; extern const f_string_static_t fake_build_stage_process_post_s; extern const f_string_static_t fake_build_stage_process_pre_s; - extern const f_string_static_t fake_build_stage_programs_script_s; - extern const f_string_static_t fake_build_stage_programs_shared_s; - extern const f_string_static_t fake_build_stage_programs_static_s; + extern const f_string_static_t fake_build_stage_program_script_s; + extern const f_string_static_t fake_build_stage_program_shared_s; + extern const f_string_static_t fake_build_stage_program_static_s; extern const f_string_static_t fake_build_stage_separate_s; extern const f_string_static_t fake_build_stage_skeleton_s; extern const f_string_static_t fake_build_stage_sources_headers_s; diff --git a/level_3/fake/c/private-fake-path_generate.c b/level_3/fake/c/private-fake-path_generate.c index bbfae4d..d6ada65 100644 --- a/level_3/fake/c/private-fake-path_generate.c +++ b/level_3/fake/c/private-fake-path_generate.c @@ -21,12 +21,14 @@ extern "C" { &main->path_build, &main->path_data, &main->path_sources, + &main->path_sources_object, }; const uint8_t parameters_size[] = { 7, 2, 4, + 4, }; f_string_dynamic_t *parameters_value_0[] = { @@ -51,13 +53,26 @@ extern "C" { &main->path_sources_script, }; + f_string_dynamic_t *parameters_value_3[] = { + &main->path_sources_object_bash, + &main->path_sources_object_c, + &main->path_sources_object_cpp, + &main->path_sources_object_script, + }; + f_string_dynamic_t **const parameters_value[] = { parameters_value_0, parameters_value_1, parameters_value_2, + parameters_value_3, }; - for (i = 0; i < 3; ++i) { + for (i = 0; i < 4; ++i) { + + // Initialize all string lengths to 0. + for (uint8_t j = 0; j < parameters_size[i]; ++j) { + parameters_value[i][j]->used = 0; + } // for status = fake_path_generate_string_dynamic(main, *parameters_source[i], parameters_value[i], parameters_size[i]); @@ -86,6 +101,10 @@ extern "C" { fake_path_part_c_s, fake_path_part_cpp_s, fake_path_part_script_s, + fake_path_part_bash_s, + fake_path_part_c_s, + fake_path_part_cpp_s, + fake_path_part_script_s, }; f_string_dynamic_t * const parameters_value[] = { @@ -104,9 +123,13 @@ extern "C" { &main->path_sources_c, &main->path_sources_cpp, &main->path_sources_script, + &main->path_sources_object_bash, + &main->path_sources_object_c, + &main->path_sources_object_cpp, + &main->path_sources_object_script, }; - for (i = 0; i < 15; ++i) { + for (i = 0; i < 19; ++i) { status = f_string_dynamic_append_nulless(parameters_source[i], parameters_value[i]); @@ -121,6 +144,7 @@ extern "C" { { const f_string_dynamic_t *parameters_source[] = { &main->path_build_libraries, + &main->path_build_objects, &main->path_build_programs, &main->path_data_build, &main->path_documents, @@ -129,6 +153,7 @@ extern "C" { const uint8_t parameters_size[] = { 3, 3, + 3, 6, 1, }; @@ -140,12 +165,18 @@ extern "C" { }; f_string_dynamic_t *parameters_value_1[] = { + &main->path_build_objects_script, + &main->path_build_objects_shared, + &main->path_build_objects_static, + }; + + f_string_dynamic_t *parameters_value_2[] = { &main->path_build_programs_script, &main->path_build_programs_shared, &main->path_build_programs_static, }; - f_string_dynamic_t *parameters_value_2[] = { + f_string_dynamic_t *parameters_value_3[] = { &main->file_data_build_defines, &main->file_data_build_dependencies, &main->file_data_build_fakefile, @@ -154,7 +185,7 @@ extern "C" { &main->file_data_build_settings, }; - f_string_dynamic_t *parameters_value_3[] = { + f_string_dynamic_t *parameters_value_4[] = { &main->file_documents_readme, }; @@ -163,9 +194,10 @@ extern "C" { parameters_value_1, parameters_value_2, parameters_value_3, + parameters_value_4, }; - for (i = 0; i < 4; ++i) { + for (i = 0; i < 5; ++i) { status = fake_path_generate_string_dynamic(main, *parameters_source[i], parameters_value[i], parameters_size[i]); @@ -194,6 +226,9 @@ extern "C" { fake_path_part_script_s, fake_path_part_shared_s, fake_path_part_static_s, + fake_path_part_script_s, + fake_path_part_shared_s, + fake_path_part_static_s, fake_file_defines_s, fake_file_dependencies_s, fake_file_process_post_s, @@ -207,6 +242,9 @@ extern "C" { &main->path_build_libraries_script, &main->path_build_libraries_shared, &main->path_build_libraries_static, + &main->path_build_objects_script, + &main->path_build_objects_shared, + &main->path_build_objects_static, &main->path_build_programs_script, &main->path_build_programs_shared, &main->path_build_programs_static, @@ -219,7 +257,7 @@ extern "C" { &main->file_documents_readme, }; - for (i = 0; i < 13; ++i) { + for (i = 0; i < 16; ++i) { status = f_string_dynamic_append_nulless(parameters_source[i], parameters_value[i]); @@ -359,6 +397,9 @@ extern "C" { &main->path_build_libraries_shared, &main->path_build_libraries_static, &main->path_build_objects, + &main->path_build_objects_script, + &main->path_build_objects_shared, + &main->path_build_objects_static, &main->path_build_programs, &main->path_build_programs_script, &main->path_build_programs_shared, @@ -388,7 +429,7 @@ extern "C" { &main->file_documents_readme, }; - for (i = 0; i < 34; ++i) { + for (i = 0; i < 37; ++i) { if (!parameters_value[i]->used) continue; diff --git a/level_3/fake/c/private-fake-path_generate.h b/level_3/fake/c/private-fake-path_generate.h index 9962728..3f6b9fb 100644 --- a/level_3/fake/c/private-fake-path_generate.h +++ b/level_3/fake/c/private-fake-path_generate.h @@ -30,6 +30,8 @@ extern "C" { /** * Generate all appropriate paths based on runtime information from dynamic strings. * + * The given source is applied to each destination. + * * @param main * The main program data. * @param source diff --git a/level_3/fake/c/private-fake.c b/level_3/fake/c/private-fake.c index 6abc2cc..0f1ca1c 100644 --- a/level_3/fake/c/private-fake.c +++ b/level_3/fake/c/private-fake.c @@ -11,7 +11,7 @@ extern "C" { #endif #ifndef _di_fake_execute_ - int fake_execute(fake_main_t * const main, const f_string_maps_t environment, const f_string_static_t program, const f_string_statics_t arguments, f_status_t *status) { + int fake_execute(fake_main_t * const main, const f_string_maps_t environment, const f_string_static_t program, const f_string_statics_t arguments, f_status_t * const status) { if (F_status_is_error(*status)) return 1; @@ -89,7 +89,7 @@ extern "C" { #endif // _di_fake_execute_ #ifndef _di_fake_file_buffer_ - f_status_t fake_file_buffer(fake_main_t * const main, const f_string_static_t path_file, f_string_dynamic_t *buffer) { + f_status_t fake_file_buffer(fake_main_t * const main, const f_string_static_t path_file, f_string_dynamic_t * const buffer) { f_file_t file = f_file_t_initialize; f_string_t name_function = "f_file_exists"; diff --git a/level_3/fake/c/private-fake.h b/level_3/fake/c/private-fake.h index 369dbb2..9eadbd2 100644 --- a/level_3/fake/c/private-fake.h +++ b/level_3/fake/c/private-fake.h @@ -35,7 +35,7 @@ extern "C" { * F_interrupt (with error bit) on receiving a terminate process signal, such as an interrupt signal. */ #ifndef _di_fake_execute_ - extern int fake_execute(fake_main_t * const main, const f_string_maps_t environment, const f_string_static_t program, const f_string_statics_t arguments, f_status_t *status) F_attribute_visibility_internal_d; + extern int fake_execute(fake_main_t * const main, const f_string_maps_t environment, const f_string_static_t program, const f_string_statics_t arguments, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_execute_ /** @@ -56,7 +56,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_file_buffer_ - extern f_status_t fake_file_buffer(fake_main_t * const main, const f_string_static_t path_file, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d; + extern f_status_t fake_file_buffer(fake_main_t * const main, const f_string_static_t path_file, f_string_dynamic_t * const buffer) F_attribute_visibility_internal_d; #endif // _di_fake_file_buffer_ /** diff --git a/level_3/fake/c/private-make-load_fakefile.c b/level_3/fake/c/private-make-load_fakefile.c index ab13138..22b1892 100644 --- a/level_3/fake/c/private-make-load_fakefile.c +++ b/level_3/fake/c/private-make-load_fakefile.c @@ -15,7 +15,7 @@ extern "C" { #endif #ifndef _di_fake_make_load_fakefile_ - void fake_make_load_fakefile(fake_make_data_t * const data_make, f_status_t *status) { + void fake_make_load_fakefile(fake_make_data_t * const data_make, f_status_t * const status) { if (F_status_is_error(*status)) return; @@ -537,10 +537,10 @@ extern "C" { // Include the terminating NULL when copying. ++name_define.used; - status = f_string_dynamic_append(name_define, &data_make->setting_build.environment.array[data_make->setting_build.environment.used]); + status = f_string_dynamic_append_nulless(name_define, &data_make->setting_build.environment.array[data_make->setting_build.environment.used]); if (F_status_is_error(status)) { - fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); + fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true); break; } diff --git a/level_3/fake/c/private-make-load_fakefile.h b/level_3/fake/c/private-make-load_fakefile.h index 9205b51..b6a01b9 100644 --- a/level_3/fake/c/private-make-load_fakefile.h +++ b/level_3/fake/c/private-make-load_fakefile.h @@ -31,7 +31,7 @@ extern "C" { * @see fake_build_load_setting() */ #ifndef _di_fake_make_load_fakefile_ - extern void fake_make_load_fakefile(fake_make_data_t * const data_make, f_status_t *status) F_attribute_visibility_internal_d; + extern void fake_make_load_fakefile(fake_make_data_t * const data_make, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_make_load_fakefile_ /** diff --git a/level_3/fake/c/private-make-load_parameters.c b/level_3/fake/c/private-make-load_parameters.c index 5813c63..171f7ea 100644 --- a/level_3/fake/c/private-make-load_parameters.c +++ b/level_3/fake/c/private-make-load_parameters.c @@ -13,7 +13,7 @@ extern "C" { #endif #ifndef _di_fake_make_load_parameters_ - void fake_make_load_parameters(fake_make_data_t * const data_make, f_status_t *status) { + void fake_make_load_parameters(fake_make_data_t * const data_make, f_status_t * const status) { if (F_status_is_error(*status)) return; @@ -210,22 +210,22 @@ extern "C" { } if (console[i]->type == f_console_type_normal_e) { - *status = f_string_dynamic_append(f_console_symbol_short_enable_s, &destination[i]->array[destination[i]->used]); + *status = f_string_dynamic_append_nulless(f_console_symbol_short_enable_s, &destination[i]->array[destination[i]->used]); } else if (console[i]->type == f_console_type_inverse_e) { - *status = f_string_dynamic_append(f_console_symbol_short_disable_s, &destination[i]->array[destination[i]->used]); + *status = f_string_dynamic_append_nulless(f_console_symbol_short_disable_s, &destination[i]->array[destination[i]->used]); } if (F_status_is_error_not(*status)) { - *status = f_string_dynamic_append(parameter[i], &destination[i]->array[destination[i]->used]); + *status = f_string_dynamic_append_nulless(parameter[i], &destination[i]->array[destination[i]->used]); } if (F_status_is_error_not(*status)) { - *status = f_string_dynamic_append(destination[i]->array[destination[i]->used], &destination_option[i]->array[destination_option[i]->used]); + *status = f_string_dynamic_append_nulless(destination[i]->array[destination[i]->used], &destination_option[i]->array[destination_option[i]->used]); } if (F_status_is_error(*status)) { - fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true); + fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); return; } @@ -241,14 +241,14 @@ extern "C" { return; } - *status = f_string_dynamic_append(source[i]->array[j], &destination[i]->array[destination[i]->used]); + *status = f_string_dynamic_append_nulless(source[i]->array[j], &destination[i]->array[destination[i]->used]); if (F_status_is_error_not(*status)) { - *status = f_string_dynamic_append(source[i]->array[j], &destination_value[i]->array[destination_value[i]->used]); + *status = f_string_dynamic_append_nulless(source[i]->array[j], &destination_value[i]->array[destination_value[i]->used]); } if (F_status_is_error(*status)) { - fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true); + fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); return; } @@ -349,22 +349,22 @@ extern "C" { } if (console[i]->type == f_console_type_normal_e) { - *status = f_string_dynamic_append(f_console_symbol_short_enable_s, &destination[i]->array[destination[i]->used]); + *status = f_string_dynamic_append_nulless(f_console_symbol_short_enable_s, &destination[i]->array[destination[i]->used]); } else if (console[i]->type == f_console_type_inverse_e) { - *status = f_string_dynamic_append(f_console_symbol_short_disable_s, &destination[i]->array[destination[i]->used]); + *status = f_string_dynamic_append_nulless(f_console_symbol_short_disable_s, &destination[i]->array[destination[i]->used]); } if (F_status_is_error_not(*status)) { - *status = f_string_dynamic_append(parameter[i], &destination[i]->array[destination[i]->used]); + *status = f_string_dynamic_append_nulless(parameter[i], &destination[i]->array[destination[i]->used]); } if (F_status_is_error_not(*status)) { - *status = f_string_dynamic_append(destination[i]->array[destination[i]->used], &destination_option[i]->array[destination_option[i]->used]); + *status = f_string_dynamic_append_nulless(destination[i]->array[destination[i]->used], &destination_option[i]->array[destination_option[i]->used]); } if (F_status_is_error(*status)) { - fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true); + fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); return; } @@ -380,14 +380,14 @@ extern "C" { return; } - *status = f_string_dynamic_append(*source[i], &destination[i]->array[destination[i]->used]); + *status = f_string_dynamic_append_nulless(*source[i], &destination[i]->array[destination[i]->used]); if (F_status_is_error_not(*status)) { - *status = f_string_dynamic_append(*source[i], &destination_value[i]->array[destination_value[i]->used]); + *status = f_string_dynamic_append_nulless(*source[i], &destination_value[i]->array[destination_value[i]->used]); } if (F_status_is_error(*status)) { - fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true); + fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); return; } diff --git a/level_3/fake/c/private-make-load_parameters.h b/level_3/fake/c/private-make-load_parameters.h index 0ef21e3..a519e31 100644 --- a/level_3/fake/c/private-make-load_parameters.h +++ b/level_3/fake/c/private-make-load_parameters.h @@ -27,7 +27,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_load_parameters_ - extern void fake_make_load_parameters(fake_make_data_t * const data_make, f_status_t *status) F_attribute_visibility_internal_d; + extern void fake_make_load_parameters(fake_make_data_t * const data_make, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_make_load_parameters_ #ifdef __cplusplus diff --git a/level_3/fake/c/private-make-operate.c b/level_3/fake/c/private-make-operate.c index 5abbe13..7ed6334 100644 --- a/level_3/fake/c/private-make-operate.c +++ b/level_3/fake/c/private-make-operate.c @@ -25,7 +25,7 @@ extern "C" { } if (main->output.verbosity != f_console_verbosity_quiet_e) { - fll_print_format("%r%[Making.%]%r", main->output.to.stream, f_string_eol_s, main->context.set.important, main->context.set.important, f_string_eol_s); + fll_print_format("%r%[Now making.%]%r", main->output.to.stream, f_string_eol_s, main->context.set.important, main->context.set.important, f_string_eol_s); } f_status_t status = F_none; @@ -138,7 +138,7 @@ extern "C" { #endif // _di_fake_make_operate_ #ifndef _di_fake_make_operate_expand_ - void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_array_length_t operation, const f_fss_content_t content, const f_fss_quotes_t quotes, f_string_dynamics_t *arguments, f_status_t *status) { + void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_array_length_t operation, const f_fss_content_t content, const f_fss_quotes_t quotes, f_string_dynamics_t * const arguments, f_status_t * const status) { if (F_status_is_error(*status)) return; if (!content.used) return; @@ -569,7 +569,7 @@ extern "C" { #endif // _di_fake_make_operate_expand_ #ifndef _di_fake_make_operate_expand_build_ - f_status_t fake_make_operate_expand_build(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t *arguments) { + f_status_t fake_make_operate_expand_build(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t * const arguments) { f_status_t status = F_none; f_string_dynamic_t value = f_string_dynamic_t_initialize; @@ -691,7 +691,7 @@ extern "C" { if (status == F_equal_to) { unmatched = F_false; - status = f_string_dynamic_append(dynamic_value[i], &value); + status = f_string_dynamic_append_nulless(dynamic_value[i], &value); break; } @@ -833,7 +833,7 @@ extern "C" { #endif // _di_fake_make_operate_expand_build_ #ifndef _di_fake_make_operate_expand_context_ - f_status_t fake_make_operate_expand_context(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t *arguments) { + f_status_t fake_make_operate_expand_context(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t * const arguments) { f_status_t status = F_none; const f_string_static_t *context = 0; @@ -899,7 +899,7 @@ extern "C" { #endif // _di_fake_make_operate_expand_context_ #ifndef _di_fake_make_operate_expand_environment_ - f_status_t fake_make_operate_expand_environment(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t *arguments) { + f_status_t fake_make_operate_expand_environment(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t * const arguments) { f_status_t status = F_none; @@ -948,7 +948,7 @@ extern "C" { #endif // _di_fake_make_operate_expand_environment_ #ifndef _di_fake_make_operate_section_ - int fake_make_operate_section(fake_make_data_t * const data_make, const f_array_length_t id_section, f_array_lengths_t *section_stack, f_status_t *status) { + int fake_make_operate_section(fake_make_data_t * const data_make, const f_array_length_t id_section, f_array_lengths_t * const section_stack, f_status_t * const status) { if (F_status_is_error(*status) || *status == F_child) return data_make->main->child; diff --git a/level_3/fake/c/private-make-operate.h b/level_3/fake/c/private-make-operate.h index 3a028d4..85c9eae 100644 --- a/level_3/fake/c/private-make-operate.h +++ b/level_3/fake/c/private-make-operate.h @@ -55,7 +55,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_expand_ - extern void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_array_length_t operation, const f_fss_content_t content, const f_fss_quotes_t quoteds, f_string_dynamics_t *arguments, f_status_t *status) F_attribute_visibility_internal_d; + extern void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_array_length_t operation, const f_fss_content_t content, const f_fss_quotes_t quoteds, f_string_dynamics_t * const arguments, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_expand_ /** @@ -79,7 +79,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_expand_context_ - extern f_status_t fake_make_operate_expand_context(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_expand_context(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t * const arguments) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_expand_context_ /** @@ -111,7 +111,7 @@ extern "C" { * @see f_string_dynamics_increase() */ #ifndef _di_fake_make_operate_expand_environment_ - extern f_status_t fake_make_operate_expand_environment(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_expand_environment(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t * const arguments) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_expand_environment_ /** @@ -133,7 +133,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_expand_build_ - extern f_status_t fake_make_operate_expand_build(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_expand_build(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t * const arguments) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_expand_build_ /** @@ -159,7 +159,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_make_operate_section_ - int fake_make_operate_section(fake_make_data_t * const data_make, const f_array_length_t id_section, f_array_lengths_t *section_stack, f_status_t *status) F_attribute_visibility_internal_d; + int fake_make_operate_section(fake_make_data_t * const data_make, const f_array_length_t id_section, f_array_lengths_t *section_stack, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_section_ #ifdef __cplusplus diff --git a/level_3/fake/c/private-make-operate_process.c b/level_3/fake/c/private-make-operate_process.c index b21e7dd..769c805 100644 --- a/level_3/fake/c/private-make-operate_process.c +++ b/level_3/fake/c/private-make-operate_process.c @@ -15,7 +15,7 @@ extern "C" { #endif #ifndef _di_fake_make_operate_process_ - int fake_make_operate_process(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_dynamics_t arguments, const bool success, fake_state_process_t *state_process, f_array_lengths_t *section_stack, f_status_t *status) { + int fake_make_operate_process(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_dynamics_t arguments, const bool success, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack, f_status_t * const status) { if (*status == F_child) return data_make->main->child; diff --git a/level_3/fake/c/private-make-operate_process.h b/level_3/fake/c/private-make-operate_process.h index 8ac9dc7..65be39c 100644 --- a/level_3/fake/c/private-make-operate_process.h +++ b/level_3/fake/c/private-make-operate_process.h @@ -39,7 +39,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_make_operate_process_ - extern int fake_make_operate_process(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_dynamics_t arguments, const bool success, fake_state_process_t *state_process, f_array_lengths_t *section_stack, f_status_t *status) F_attribute_visibility_internal_d; + extern int fake_make_operate_process(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_dynamics_t arguments, const bool success, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_ /** diff --git a/level_3/fake/c/private-make-operate_process_type.c b/level_3/fake/c/private-make-operate_process_type.c index dcdcc15..f00daa1 100644 --- a/level_3/fake/c/private-make-operate_process_type.c +++ b/level_3/fake/c/private-make-operate_process_type.c @@ -1176,10 +1176,10 @@ extern "C" { return status; } - status = f_string_dynamic_append(arguments.array[0], &data_make->setting_make.parameter.array[data_make->setting_make.parameter.used].name); + status = f_string_dynamic_append_nulless(arguments.array[0], &data_make->setting_make.parameter.array[data_make->setting_make.parameter.used].name); if (F_status_is_error(status)) { - fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); + fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true); return status; } @@ -1208,10 +1208,10 @@ extern "C" { for (f_array_length_t j = 0; j < data_make->setting_make.parameter.array[i].value.size; ++j) { - status = f_string_dynamic_append(arguments.array[j + 1], &data_make->setting_make.parameter.array[i].value.array[j]); + status = f_string_dynamic_append_nulless(arguments.array[j + 1], &data_make->setting_make.parameter.array[i].value.array[j]); if (F_status_is_error(status)) { - fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); + fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true); return status; } @@ -1300,10 +1300,10 @@ extern "C" { // Copy the entire real path, including the trailing NULL. ++data_make->path_cache.used; - status = f_string_dynamic_append(data_make->path_cache, &data_make->path.stack.array[data_make->path.stack.used]); + status = f_string_dynamic_append_nulless(data_make->path_cache, &data_make->path.stack.array[data_make->path.stack.used]); if (F_status_is_error(status)) { - fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); + fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true); return status; } diff --git a/level_3/fake/c/private-make-operate_validate.c b/level_3/fake/c/private-make-operate_validate.c index 7f0d47b..23fcee9 100644 --- a/level_3/fake/c/private-make-operate_validate.c +++ b/level_3/fake/c/private-make-operate_validate.c @@ -14,7 +14,7 @@ extern "C" { #endif #ifndef _di_fake_make_operate_validate_ - void fake_make_operate_validate(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_dynamics_t arguments, fake_state_process_t *state_process, f_array_lengths_t *section_stack, f_status_t *status) { + void fake_make_operate_validate(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_dynamics_t arguments, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack, f_status_t * const status) { if (F_status_is_error(*status)) return; diff --git a/level_3/fake/c/private-make-operate_validate.h b/level_3/fake/c/private-make-operate_validate.h index 28b56dd..617ae7b 100644 --- a/level_3/fake/c/private-make-operate_validate.h +++ b/level_3/fake/c/private-make-operate_validate.h @@ -35,7 +35,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_validate_ - extern void fake_make_operate_validate(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_dynamics_t arguments, fake_state_process_t *state_process, f_array_lengths_t *section_stack, f_status_t *status) F_attribute_visibility_internal_d; + extern void fake_make_operate_validate(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_dynamics_t arguments, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_validate_ /** diff --git a/level_3/fake/data/build/settings b/level_3/fake/data/build/settings index 2cbe90d..596d730 100644 --- a/level_3/fake/data/build/settings +++ b/level_3/fake/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static -build_sources_library fake.c common.c private-build.c private-build-library.c private-build-load.c private-build-objects.c private-build-program.c private-build-skeleton.c private-clean.c private-common.c private-make.c private-fake.c private-fake-path_generate.c private-make-load_fakefile.c private-make-load_parameters.c private-make-operate.c private-make-operate_process.c private-make-operate_process_type.c private-make-operate_validate.c private-print.c private-skeleton.c +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static +build_sources_library fake.c common.c private-build.c private-build-library.c private-build-load.c private-build-object.c private-build-objects.c private-build-program.c private-build-skeleton.c private-clean.c private-common.c private-make.c private-fake.c private-fake-path_generate.c private-make-load_fakefile.c private-make-load_parameters.c private-make-operate.c private-make-operate_process.c private-make-operate_process_type.c private-make-operate_validate.c private-print.c private-skeleton.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -pthread -Wno-logical-not-parenth flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fake/data/projects/example-objects/data/build/fakefile b/level_3/fake/data/projects/example-objects/data/build/fakefile new file mode 100644 index 0000000..2262c7a --- /dev/null +++ b/level_3/fake/data/projects/example-objects/data/build/fakefile @@ -0,0 +1,11 @@ +# fss-0005 iki-0002 +# +# This is an example using objects. +# This file builds all of the other parts together. + +main: + build settings-f + build settings-a + build settings-k + build settings-e + build settings diff --git a/level_3/fake/data/projects/example-objects/data/build/settings b/level_3/fake/data/projects/example-objects/data/build/settings new file mode 100644 index 0000000..f4916ed --- /dev/null +++ b/level_3/fake/data/projects/example-objects/data/build/settings @@ -0,0 +1,22 @@ +# fss-0001 +# +# This is an example using objects. + +build_name example-objects + +version_major 0 +version_minor 0 +version_micro 1 +version_file micro +version_target major + +build_libraries -lc +build_objects_program f.o a.o k.o e.o +build_sources_program fake.c +build_script no + +path_sources sources +path_standard no + +flags -z now -g -fdiagnostics-color=always +flags_object_shared -fPIC diff --git a/level_3/fake/data/projects/example-objects/data/build/settings-a b/level_3/fake/data/projects/example-objects/data/build/settings-a new file mode 100644 index 0000000..6fb8f86 --- /dev/null +++ b/level_3/fake/data/projects/example-objects/data/build/settings-a @@ -0,0 +1,21 @@ +# fss-0001 +# +# This is an example using objects. + +build_name a + +version_major 0 +version_minor 0 +version_micro 1 +version_file micro +version_target major + +build_libraries -lc +build_sources_object a.c +build_script no + +path_sources_object sources_object +path_standard no + +flags -z now -g -fdiagnostics-color=always +flags_object_shared -fPIC diff --git a/level_3/fake/data/projects/example-objects/data/build/settings-e b/level_3/fake/data/projects/example-objects/data/build/settings-e new file mode 100644 index 0000000..f454c2f --- /dev/null +++ b/level_3/fake/data/projects/example-objects/data/build/settings-e @@ -0,0 +1,21 @@ +# fss-0001 +# +# This is an example using objects. + +build_name e + +version_major 0 +version_minor 0 +version_micro 1 +version_file micro +version_target major + +build_libraries -lc +build_sources_object e.c +build_script no + +path_sources_object sources_object +path_standard no + +flags -z now -g -fdiagnostics-color=always +flags_object_shared -fPIC diff --git a/level_3/fake/data/projects/example-objects/data/build/settings-f b/level_3/fake/data/projects/example-objects/data/build/settings-f new file mode 100644 index 0000000..a5991a9 --- /dev/null +++ b/level_3/fake/data/projects/example-objects/data/build/settings-f @@ -0,0 +1,21 @@ +# fss-0001 +# +# This is an example using objects. + +build_name f + +version_major 0 +version_minor 0 +version_micro 1 +version_file micro +version_target major + +build_libraries -lc +build_sources_object f.c +build_script no + +path_sources_object sources_object +path_standard no + +flags -z now -g -fdiagnostics-color=always +flags_object_shared -fPIC diff --git a/level_3/fake/data/projects/example-objects/data/build/settings-k b/level_3/fake/data/projects/example-objects/data/build/settings-k new file mode 100644 index 0000000..35768d3 --- /dev/null +++ b/level_3/fake/data/projects/example-objects/data/build/settings-k @@ -0,0 +1,21 @@ +# fss-0001 +# +# This is an example using objects. + +build_name k + +version_major 0 +version_minor 0 +version_micro 1 +version_file micro +version_target major + +build_libraries -lc +build_sources_object k.c +build_script no + +path_sources_object sources_object +path_standard no + +flags -z now -g -fdiagnostics-color=always +flags_object_shared -fPIC diff --git a/level_3/fake/data/projects/example-objects/sources/fake.c b/level_3/fake/data/projects/example-objects/sources/fake.c new file mode 100644 index 0000000..a7a711c --- /dev/null +++ b/level_3/fake/data/projects/example-objects/sources/fake.c @@ -0,0 +1,17 @@ +#include + +extern void print_f(); +extern void print_a(); +extern void print_k(); +extern void print_e(); + +int main(int argc, char *argv[]) { + print_f(); + print_a(); + print_k(); + print_e(); + + printf("\n"); + + return 0; +} diff --git a/level_3/fake/data/projects/example-objects/sources_object/a.c b/level_3/fake/data/projects/example-objects/sources_object/a.c new file mode 100644 index 0000000..f053b3e --- /dev/null +++ b/level_3/fake/data/projects/example-objects/sources_object/a.c @@ -0,0 +1,5 @@ +#include + +void print_a() { + printf("a"); +} diff --git a/level_3/fake/data/projects/example-objects/sources_object/e.c b/level_3/fake/data/projects/example-objects/sources_object/e.c new file mode 100644 index 0000000..8762738 --- /dev/null +++ b/level_3/fake/data/projects/example-objects/sources_object/e.c @@ -0,0 +1,5 @@ +#include + +void print_e() { + printf("e"); +} diff --git a/level_3/fake/data/projects/example-objects/sources_object/f.c b/level_3/fake/data/projects/example-objects/sources_object/f.c new file mode 100644 index 0000000..19478bb --- /dev/null +++ b/level_3/fake/data/projects/example-objects/sources_object/f.c @@ -0,0 +1,5 @@ +#include + +void print_f() { + printf("f"); +} diff --git a/level_3/fake/data/projects/example-objects/sources_object/k.c b/level_3/fake/data/projects/example-objects/sources_object/k.c new file mode 100644 index 0000000..7cc15b8 --- /dev/null +++ b/level_3/fake/data/projects/example-objects/sources_object/k.c @@ -0,0 +1,5 @@ +#include + +void print_k() { + printf("k"); +} diff --git a/level_3/fake/documents/settings.txt b/level_3/fake/documents/settings.txt index 5deb215..8923da5 100644 --- a/level_3/fake/documents/settings.txt +++ b/level_3/fake/documents/settings.txt @@ -8,6 +8,8 @@ Settings Documentation: - build_compiler\: This represents the name of the compiler program to use, such as "gcc". + This defaults to "gcc" (the GNU C Compiler). + The programs "gcc" and "clang" are known to work. Many of the parameters in the settings file can be changed if using a non-GCC, but there may be certain hard-coded functionality that may need to be changed. @@ -15,7 +17,7 @@ Settings Documentation: This represents the name of the indexer program to use, such as "ar". An indexer is often called a linker. - The default behavior is to support the GNU "ar" program. + This defaults to "ar" (the GNU "ar" program). Similar to "build_compiler", any linker that supports the "ar" program parameters is effectively supported. - build_indexer_arguments\: @@ -45,6 +47,46 @@ Settings Documentation: The order of these may matter if the compiler (such as GCC or a linker via GCC) is order sensitive. These are applied to only static builds. + - build_objects_library\: + A collection of object files to be compile with when building libraries. + These are intended to represent already compiled object files. + These paths are relative to the path_object_script, path_object_shared, or path_object_static. + The order of these may matter if the compiler (such as GCC or a linker via GCC) is order sensitive. + + - build_objects_library_shared\: + A collection of object files to be compile with when building shared libraries. + These are intended to represent already compiled object files. + These paths are relative to the path_object_shared. + The order of these may matter if the compiler (such as GCC or a linker via GCC) is order sensitive. + These are applied to only shared builds. + + - build_objects_library_static\: + A collection of object files to be compile with when building static libraries. + These are intended to represent already compiled object files. + These paths are relative to the path_object_static. + The order of these may matter if the compiler (such as GCC or a linker via GCC) is order sensitive. + These are applied to only static builds. + + - build_objects_program\: + A collection of object files to be compile with when building programs. + These are intended to represent already compiled object files. + These paths are relative to the path_object_script, path_object_shared, or path_object_static. + The order of these may matter if the compiler (such as GCC or a linker via GCC) is order sensitive. + + - build_objects_program_shared\: + A collection of object files to be compile with when building shared programs. + These are intended to represent already compiled object files. + These paths are relative to the path_object_shared. + The order of these may matter if the compiler (such as GCC or a linker via GCC) is order sensitive. + These are applied to only shared builds. + + - build_objects_program_static\: + A collection of object files to be compile with when building static programs. + These are intended to represent already compiled object files. + These paths are relative to the path_object_static. + The order of these may matter if the compiler (such as GCC or a linker via GCC) is order sensitive. + These are applied to only static builds. + - build_name\: The name of the build, which often represent the project name. If program sources are specified, then this will be used as the program name. @@ -94,6 +136,29 @@ Settings Documentation: The order of these may matter if the compiler (such as GCC or a linker via GCC) is order sensitive. These are applied to only static builds. + - build_sources_object\: + A single source file used for generating an object file. + The source file is located within the path designated by "path_sources_object". + The built object does not get linked and therefore no linker arguments apply. + The built object file is named using the "build_name" with the ".o" extension. + May include a relative sub-path to each individual source file (such as: "level_0/a.c"). + + - build_sources_object_shared\: + A single source file used for generating an object file. + The source file is located within the path designated by "path_sources_object". + The built object does not get linked and therefore no linker arguments apply. + The built object file is named using the "build_name" with the ".o" extension. + May include a relative sub-path to each individual source file (such as: "level_0/a.c"). + These are applied to only shared builds. + + - build_sources_object_static\: + A single source file used for generating an object file. + The source file is located within the path designated by "path_sources_object". + The built object does not get linked and therefore no linker arguments apply. + The built object file is named using the "build_name" with the ".o" extension. + May include a relative sub-path to each individual source file (such as: "level_0/a.c"). + These are applied to only static builds. + - build_sources_program\: A collection of program related source files. May include a relative sub-path to each individual source file (such as: "level_0/a.c level_0/b.c level_1/c.c"). @@ -151,6 +216,24 @@ Settings Documentation: These will be appended to the compiler for compiled languages such as C and C++. These are applied to only static library builds. + - defines_object\: + A collection of macro names. + This includes the any compiler specific parameters required by the "build_compiler", such as the "-D" used by gcc and clang. + These will be appended to the compiler for compiled languages such as C and C++. + These are applied to only object builds. + + - defines_object_shared\: + A collection of macro names. + This includes the any compiler specific parameters required by the "build_compiler", such as the "-D" used by gcc and clang. + These will be appended to the compiler for compiled languages such as C and C++. + These are applied to only shared object builds. + + - defines_object_static\: + A collection of macro names. + This includes the any compiler specific parameters required by the "build_compiler", such as the "-D" used by gcc and clang. + These will be appended to the compiler for compiled languages such as C and C++. + These are applied to only static object builds. + - defines_program\: A collection of macro names. This includes the any compiler specific parameters required by the "build_compiler", such as the "-D" used by gcc and clang. @@ -207,6 +290,21 @@ Settings Documentation: This includes the any compiler specific parameters to defined this, such as the "-f" used by gcc and clang. These are applied to only library static builds. + - flags_object\: + A collection of any flag supported by the "build_compiler", such as gcc. + This includes the any compiler specific parameters to defined this, such as the "-f" used by gcc and clang. + These are applied when building an object. + + - flags_object_shared\: + A collection of any flag supported by the "build_compiler", such as gcc. + This includes the any compiler specific parameters to defined this, such as the "-f" used by gcc and clang. + These are applied to only object shared builds. + + - flags_object_static\: + A collection of any flag supported by the "build_compiler", such as gcc. + This includes the any compiler specific parameters to defined this, such as the "-f" used by gcc and clang. + These are applied to only object static builds. + - flags_program\: A collection of any flag supported by the "build_compiler", such as gcc. This includes the any compiler specific parameters to defined this, such as the "-f" used by gcc and clang. @@ -248,7 +346,7 @@ Settings Documentation: If "path_headers" is "level_0", "path_headers_preserve" is "yes", and "build_sources_headers" has "xxx/a.h yyy/zzz/b.h", then the headers would be at: "build/includes/level_0/xxx/a.h build/includes/level_0/yyy/zzz/b.h" - path_headers_preserve\: - When "yes" the relative directory structure in the source (as defined in "build_sources_headers") is preserved. + When this is "yes", then the relative directory structure in the source (as defined in "build_sources_headers") is preserved. If the "build_sources_headers" has the header files "xxx/a.h yyy/zzz/b.h" and this is "yes", then the directories "xxx/" and "yyy/zzz/" are created and the files are stored within them. If the "build_sources_headers" has the header files "xxx/a.h yyy/zzz/b.h" and this is "no", then the directories "xxx/" and "yyy/zzz/" are stripped before installing. When this is "no" and the "build_sources_headers" has header files "xxx/a.h yyy/a.h", then one of the "a.h" files will be overwritten, depending on order they were supplied. @@ -258,33 +356,70 @@ Settings Documentation: If the "build_language" is changed, it is recommended to change this as well to match. - path_library_script\: - A sub-path representing when the built library script files are placed. + A sub-path representing the destination where the built library script files are placed. + + This defaults to "script". This is currently not implemented. - path_library_shared\: - A sub-path representing when the built shared library files are placed. + A sub-path representing the destination where the built shared library files are placed. + + This defaults to "shared". - path_library_static\: - A sub-path representing when the built shared library files are placed. + A sub-path representing the destination where the built shared library files are placed. + + This defaults to "static". + + - path_object_script\: + A sub-path representing the destination where the built object script files are placed. + + This defaults to "script". + This is currently not implemented. + + - path_object_shared\: + A sub-path representing the destination where the built object library files are placed. + + This defaults to "shared". + + - path_object_static\: + A sub-path representing the destination where the built object library files are placed. + + This defaults to "static". - path_program_script\: - A sub-path representing when the built program script files are placed. + A sub-path representing the destination where the built program script files are placed. + + This defaults to "script". This is currently not implemented. - path_program_shared\: - A sub-path representing when the built shared program files are placed. + A sub-path representing the destination where the built shared program files are placed. + + This defaults to "shared". - path_program_static\: - A sub-path representing when the built shared program files are placed. + A sub-path representing the destination where built shared program files are placed. + + This defaults to "static". - path_sources\: - A sub-path representing when the built shared program files are placed. + A sub-path representing where the source files are found. + + This defaults to "sources". + + - path_sources_object\: + A sub-path representing where the object source files are found. + This is used by "build_sources_object". + + This defaults to "sources". - path_standard\: - When "yes", the sources path will be built using the sources path with the language, such as "sources/c/", ignoring "path_sources" completely. + When "yes", the sources path will be built using the sources path with the language, such as "sources/c/". When "no", the default sources path structure is not used and instead "path_sources" is used. - When the parameter -S/--sources is specified, such as "-S xxx", then when "yes" is used path would be "xxx/c/" and when "no" path would be "xxx/". - The default behavior is "yes". + When the parameter -S/--sources is specified, such as "-S xxx", then when this is set to "yes" is used then the path would be "xxx/c/" and when this is set to "no" then the path would be "xxx/". + + This defaults to "yes". - process_post\: The filename (relative to the "data/build/" directory) of a script to execute after the "build" operation successfully completes. @@ -324,7 +459,8 @@ Settings Documentation: - search_shared\: When "yes", shared library paths are searched during compile. Both this and "search_static" cannot be "no" at the same time. - The default behavior is "yes". + + This defaults to "yes". - search_shared\: When "yes", static library paths are searched during compile. @@ -350,10 +486,11 @@ Settings Documentation: - version_major_prefix\: The version major prefix is the character used to designate the start of the major version. This can zero or more characters. - The default is an empty string. With a structure of "A.B.C", the major version prefix would be before the "A". This is only added if "version_major" is not empty. + This defaults to the ASCII period character ".". + - version_minor\: The minor version number (or in theory any characters allowed in a filename). This should generally be a positive number or 0. @@ -363,10 +500,11 @@ Settings Documentation: - version_minor_prefix\: The version minor prefix is the character used to separate the major from the minor. This can zero or more characters. - The default prefix is an ASCII period character "." if and only if "version_minor" is not an empty string. With a structure of "A.B.C", the minor version prefix would be the "." before the "B". This is only added if "version_minor" is not empty. + This defaults to the ASCII period character ".". + - version_micro\: The micro version number (or in theory any characters allowed in a filename). This should generally be a positive number or 0. @@ -376,10 +514,11 @@ Settings Documentation: - version_micro_prefix\: The version micro prefix is the character used to separate the minor from the micro. This can zero or more characters. - The default prefix is an ASCII period character "." if and only if "version_micro" is not an empty string. With a structure of "A.B.C", the micro version prefix would be the "." before the "C". This is only added if "version_micro" is not empty. + This defaults to the ASCII period character ".". + - version_nano\: The nano version number (or in theory any characters allowed in a filename). This should generally be a positive number or 0. @@ -389,10 +528,11 @@ Settings Documentation: - version_nano_prefix\: The version nano prefix is the character used to separate the micro from the nano. This can zero or more characters. - The default prefix is an ASCII period character "." if and only if "version_nano" is not an empty string. With a structure of "A.B.C.D", the minor version would be the "." before the "D". This is only added if "version_nano" is not empty. + This defaults to the ASCII period character ".". + - version_target\: Designates which version should be used when linking the shared library. Any version prefixes are used as defined. diff --git a/level_3/fake/specifications/settings.txt b/level_3/fake/specifications/settings.txt index 26ee4f5..ec49da4 100644 --- a/level_3/fake/specifications/settings.txt +++ b/level_3/fake/specifications/settings.txt @@ -18,6 +18,12 @@ Settings Specification: - build_libraries_shared: Must only contain any number of valid library include arguments that are valid for the compiler defined in "build_compiler" Object. - build_libraries_static: Must only contain any number of valid library include arguments that are valid for the compiler defined in "build_compiler" Object. - build_name: Must only contain characters allowed in a filename. + - build_objects_library: Must only contain any number of valid object file names relative to the appropriate "path_object_*" path. + - build_objects_library_shared: Must only contain any number of valid object file names relative to the "path_object_shared" path. + - build_objects_library_static: Must only contain any number of valid object file names relative to the "path_object_static" path. + - build_objects_program: Must only contain any number of valid object file names relative to the appropriate "path_object_*" path. + - build_objects_program_shared: Must only contain any number of valid object file names relative to the "path_object_shared" path. + - build_objects_program_static: Must only contain any number of valid object file names relative to the "path_object_static" path. - build_script: Must only one of: "yes" or "no". - build_shared: Must only one of: "yes" or "no". - build_sources_headers: Must only contain any number of valid filenames. @@ -26,16 +32,22 @@ Settings Specification: - build_sources_library: Must only contain any number of valid filenames. - build_sources_library_shared: Must only contain any number of valid filenames. - build_sources_library_static: Must only contain any number of valid filenames. + - build_sources_object: Must only contain any number of valid filenames. + - build_sources_object_shared: Must only contain any number of valid filenames. + - build_sources_object_static: Must only contain any number of valid filenames. - build_sources_program: Must only contain any number of valid filenames. - build_sources_program_shared: Must only contain any number of valid filenames. - build_sources_program_static: Must only contain any number of valid filenames. - build_sources_script: Must only contain any number of valid filenames. - build_sources_setting: Must only contain any number of valid filenames. - build_static: Must only one of: "yes" or "no". - - defines": Must only contain any number of valid macro names supported by the compiler specified in "build_compiler". + - defines: Must only contain any number of valid macro names supported by the compiler specified in "build_compiler". - defines_library: Must only contain any number of valid macro names supported by the compiler specified in "build_compiler". - defines_library_shared: Must only contain any number of valid macro names supported by the compiler specified in "build_compiler". - defines_library_static: Must only contain any number of valid macro names supported by the compiler specified in "build_compiler". + - defines_object: Must only contain any number of valid macro names supported by the compiler specified in "build_compiler". + - defines_object_shared: Must only contain any number of valid macro names supported by the compiler specified in "build_compiler". + - defines_object_static: Must only contain any number of valid macro names supported by the compiler specified in "build_compiler". - defines_program: Must only contain any number of valid macro names supported by the compiler specified in "build_compiler". - defines_program_shared: Must only contain any number of valid macro names supported by the compiler specified in "build_compiler". - defines_program_static: Must only contain any number of valid macro names supported by the compiler specified in "build_compiler". @@ -46,6 +58,9 @@ Settings Specification: - flags_library: Must only contain any number of parameters supported by the compiler specified in "build_compiler". - flags_library_shared: Must only contain any number of parameters supported by the compiler specified in "build_compiler". - flags_library_static: Must only contain any number of parameters supported by the compiler specified in "build_compiler". + - flags_object: Must only contain any number of parameters supported by the compiler specified in "build_compiler". + - flags_object_shared: Must only contain any number of parameters supported by the compiler specified in "build_compiler". + - flags_object_static: Must only contain any number of parameters supported by the compiler specified in "build_compiler". - flags_program: Must only contain any number of parameters supported by the compiler specified in "build_compiler". - flags_program_shared: Must only contain any number of parameters supported by the compiler specified in "build_compiler". - flags_program_static: Must only contain any number of parameters supported by the compiler specified in "build_compiler". @@ -59,10 +74,14 @@ Settings Specification: - path_library_script: Must be a single valid path. - path_library_shared: Must be a single valid path. - path_library_static: Must be a single valid path. + - path_object_script: Must be a single valid path. + - path_object_shared: Must be a single valid path. + - path_object_static: Must be a single valid path. - path_program_script: Must be a single valid path. - path_program_shared: Must be a single valid path. - path_program_static: Must be a single valid path. - path_sources: Must only be a valid directory path or not specified. + - path_sources_object: Must only be a valid directory path or not specified. - path_standard: Must only one of: "yes" or "no". - process_post: Must contain only a single valid filename. - process_pre: Must contain only a single valid filename. @@ -72,10 +91,10 @@ Settings Specification: - version_file: Must only be one of: "major", "minor", "micro", or "nano". - version_major: Must only be a single value containing valid filename characters. - version_major_prefix: Must be zero or more valid filename characters. - - version_minor: Must only be a single value containing valid filename characters. - - version_minor_prefix: Must be zero or more valid filename characters. - version_micro: Must only be a single value containing valid filename characters. - version_micro_prefix: Must be zero or more valid filename characters. + - version_minor: Must only be a single value containing valid filename characters. + - version_minor_prefix: Must be zero or more valid filename characters. - version_nano: Must only be a single value containing valid filename characters. - version_nano_prefix: Must be zero or more valid filename characters. - version_target: Must only be one of: "major", "minor", "micro", or "nano". @@ -84,12 +103,21 @@ Settings Specification: - build_libraries - build_libraries_shared - build_libraries_static + - build_objects_library + - build_objects_library_shared + - build_objects_library_static + - build_objects_program + - build_objects_program_shared + - build_objects_program_static - build_sources_headers - build_sources_headers_shared - build_sources_headers_static - build_sources_library - build_sources_library_shared - build_sources_library_static + - build_sources_object + - build_sources_object_shared + - build_sources_object_static - build_sources_program - build_sources_program_shared - build_sources_program_static @@ -99,6 +127,9 @@ Settings Specification: - defines_library - defines_library_shared - defines_library_static + - defines_object + - defines_object_shared + - defines_object_static - defines_program - defines_program_shared - defines_program_static @@ -109,6 +140,9 @@ Settings Specification: - flags_library - flags_library_shared - flags_library_static + - flags_object + - flags_object_shared + - flags_object_static - flags_program - flags_program_shared - flags_program_static diff --git a/level_3/firewall/data/build/settings b/level_3/firewall/data/build/settings index ae58ce9..7238e7f 100644 --- a/level_3/firewall/data/build/settings +++ b/level_3/firewall/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library firewall.c common.c private-common.c private-firewall.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -pthread -Wno-logical-not-parenth flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fss_basic_list_read/data/build/settings b/level_3/fss_basic_list_read/data/build/settings index 8611317..93ac28e 100644 --- a/level_3/fss_basic_list_read/data/build/settings +++ b/level_3/fss_basic_list_read/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss_basic_list_read.c common.c private-common.c private-print.c private-read.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fss_basic_list_write/data/build/settings b/level_3/fss_basic_list_write/data/build/settings index 8d8de08..4276cb2 100644 --- a/level_3/fss_basic_list_write/data/build/settings +++ b/level_3/fss_basic_list_write/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss_basic_list_write.c common.c private-common.c private-write.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fss_basic_read/data/build/settings b/level_3/fss_basic_read/data/build/settings index 1dbb788..c878dde 100644 --- a/level_3/fss_basic_read/data/build/settings +++ b/level_3/fss_basic_read/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss_basic_read.c common.c private-common.c private-print.c private-read.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fss_basic_write/data/build/settings b/level_3/fss_basic_write/data/build/settings index af0c0d7..7305b81 100644 --- a/level_3/fss_basic_write/data/build/settings +++ b/level_3/fss_basic_write/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss_basic_write.c common.c private-common.c private-write.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fss_embedded_list_read/data/build/settings b/level_3/fss_embedded_list_read/data/build/settings index 0b6a782..0f9da33 100644 --- a/level_3/fss_embedded_list_read/data/build/settings +++ b/level_3/fss_embedded_list_read/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss_embedded_list_read.c common.c private-common.c private-print.c private-read.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fss_embedded_list_write/data/build/settings b/level_3/fss_embedded_list_write/data/build/settings index 8d227b7..260eeb2 100644 --- a/level_3/fss_embedded_list_write/data/build/settings +++ b/level_3/fss_embedded_list_write/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss_embedded_list_write.c common.c private-common.c private-write.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fss_extended_list_read/data/build/settings b/level_3/fss_extended_list_read/data/build/settings index 287480f..4b02712 100644 --- a/level_3/fss_extended_list_read/data/build/settings +++ b/level_3/fss_extended_list_read/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss_extended_list_read.c common.c private-common.c private-print.c private-read.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fss_extended_list_write/data/build/settings b/level_3/fss_extended_list_write/data/build/settings index 5f4022a..46a5de2 100644 --- a/level_3/fss_extended_list_write/data/build/settings +++ b/level_3/fss_extended_list_write/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss_extended_list_write.c common.c private-common.c private-write.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fss_extended_read/data/build/settings b/level_3/fss_extended_read/data/build/settings index bcaebf0..b5a5097 100644 --- a/level_3/fss_extended_read/data/build/settings +++ b/level_3/fss_extended_read/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss_extended_read.c common.c private-common.c private-print.c private-read.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fss_extended_write/data/build/settings b/level_3/fss_extended_write/data/build/settings index dc5323b..2fe5f60 100644 --- a/level_3/fss_extended_write/data/build/settings +++ b/level_3/fss_extended_write/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss_extended_write.c common.c private-common.c private-write.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fss_identify/data/build/settings b/level_3/fss_identify/data/build/settings index 43310b3..ca386cb 100644 --- a/level_3/fss_identify/data/build/settings +++ b/level_3/fss_identify/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss_identify.c common.c private-common.c private-identify.c private-print.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fss_payload_read/data/build/settings b/level_3/fss_payload_read/data/build/settings index b5a1ca6..05c0e6d 100644 --- a/level_3/fss_payload_read/data/build/settings +++ b/level_3/fss_payload_read/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss_payload_read.c common.c private-common.c private-print.c private-read.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fss_payload_write/data/build/settings b/level_3/fss_payload_write/data/build/settings index 00055e7..996051d 100644 --- a/level_3/fss_payload_write/data/build/settings +++ b/level_3/fss_payload_write/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss_payload_write.c common.c private-common.c private-write.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/fss_status_code/data/build/settings b/level_3/fss_status_code/data/build/settings index d7c66f6..69420a9 100644 --- a/level_3/fss_status_code/data/build/settings +++ b/level_3/fss_status_code/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library fss_status_code.c common.c private-common.c private-fss_status_code.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/iki_read/data/build/settings b/level_3/iki_read/data/build/settings index 3b3fabe..ee3ce63 100644 --- a/level_3/iki_read/data/build/settings +++ b/level_3/iki_read/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library iki_read.c common.c private-common.c private-print.c private-read.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/iki_write/data/build/settings b/level_3/iki_write/data/build/settings index 91a0eb6..1cad94f 100644 --- a/level_3/iki_write/data/build/settings +++ b/level_3/iki_write/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library iki_write.c common.c private-common.c private-write.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/status_code/data/build/settings b/level_3/status_code/data/build/settings index 0f8033c..cd13564 100644 --- a/level_3/status_code/data/build/settings +++ b/level_3/status_code/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library status_code.c common.c private-common.c private-status_code.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static diff --git a/level_3/utf8/data/build/settings b/level_3/utf8/data/build/settings index 8c36dfd..fbfff99 100644 --- a/level_3/utf8/data/build/settings +++ b/level_3/utf8/data/build/settings @@ -26,9 +26,18 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared build_libraries_static +build_objects_library +build_objects_library_shared +build_objects_library_static +build_objects_program +build_objects_program_shared +build_objects_program_static build_sources_library utf8.c common.c private-common.c private-print.c private-utf8.c private-utf8_binary.c private-utf8_codepoint.c build_sources_library_shared build_sources_library_static +build_sources_object +build_sources_object_shared +build_sources_object_static build_sources_program main.c build_sources_program_shared build_sources_program_static @@ -46,10 +55,14 @@ path_headers_preserve no path_library_script script path_library_shared shared path_library_static static +path_object_script script +path_object_shared shared +path_object_static static path_program_script script path_program_shared shared path_program_static static path_sources +path_sources_object path_standard yes search_exclusive yes @@ -61,6 +74,9 @@ defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_ defines_library defines_library_shared defines_library_static +defines_object +defines_object_shared +defines_object_static defines_program defines_program_shared defines_program_static @@ -71,6 +87,9 @@ flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno flags_library -fPIC flags_library_shared flags_library_static +flags_object -fPIC +flags_object_shared +flags_object_static flags_program -fPIE flags_program_shared flags_program_static