From: Kevin Day Date: Thu, 23 Apr 2026 03:14:22 +0000 (-0500) Subject: Bugfix: Incomplete and invalid bootstrap.sh settings. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=refs%2Fheads%2F0.8;p=fll Bugfix: Incomplete and invalid bootstrap.sh settings. The build settings in `bootstrap.sh` is incomplete or invalid for various reasons. Some of the build settings are now consistently present in the Multi value Objects array loop. The `build_sources_script-mode` is now being loaded. Many of the build settings are now properly being populated using the correct variable or settings names. The `bootstrap_id()` is now being called where the `bootstrap_id()` call has been missing entirely. Remove build settings that do not actually exist in the standard (like `defines_object_program`). The `has-flags_library-mode` is now being properly used. --- diff --git a/build/scripts/bootstrap.sh b/build/scripts/bootstrap.sh index 101a8d7c7..71235a650 100644 --- a/build/scripts/bootstrap.sh +++ b/build/scripts/bootstrap.sh @@ -715,7 +715,7 @@ bootstrap_load_settings() { done # Multi value Objects. - for i in build_indexer_arguments 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_documentation 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 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 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 ; do + for i in build_indexer_arguments 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_documentation 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_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 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 ; do bootstrap_id "${i}" @@ -1181,6 +1181,8 @@ bootstrap_operation_build() { bootstrap_operation_build_prepare_programs + bootstrap_operation_build_prepare_scripts + bootstrap_operation_build_prepare_settings bootstrap_operation_build_prepare_documentation @@ -1761,63 +1763,33 @@ bootstrap_operation_build_prepare_defines() { fi fi - bootstrap_id "has-defines_object_library-mode" + bootstrap_id "has-defines_object-mode" if [[ ${variables[${key}]} == "yes" ]] ; then - bootstrap_id "defines_object_library-mode" - if [[ ${defines_object_library} == "" ]] ; then - defines_object_library=${variables[${key}]} + bootstrap_id "defines_object-mode" + if [[ ${defines_object} == "" ]] ; then + defines_object=${variables[${key}]} else - defines_object_library="${defines_object_library} ${variables[${key}]}" + defines_object="${defines_object} ${variables[${key}]}" fi fi - bootstrap_id "has-defines_object_library_shared-mode" + bootstrap_id "has-defines_object_shared-mode" if [[ ${variables[${key}]} == "yes" ]] ; then - bootstrap_id "defines_object_library_shared-mode" - if [[ ${defines_object_library_shared} == "" ]] ; then - defines_object_library_shared=${variables[${key}]} + bootstrap_id "defines_object_shared-mode" + if [[ ${defines_object_shared} == "" ]] ; then + defines_object_shared=${variables[${key}]} else - defines_object_library_shared="${defines_object_library_shared} ${variables[${key}]}" + defines_object_shared="${defines_object_shared} ${variables[${key}]}" fi fi - bootstrap_id "has-defines_object_library_static-mode" + bootstrap_id "has-defines_object_static-mode" if [[ ${variables[${key}]} == "yes" ]] ; then - bootstrap_id "defines_object_library_static-mode" - if [[ ${defines_object_library_static} == "" ]] ; then - defines_object_library_static=${variables[${key}]} + bootstrap_id "defines_object_static-mode" + if [[ ${defines_object_static} == "" ]] ; then + defines_object_static=${variables[${key}]} else - defines_object_library_static="${defines_object_library_static} ${variables[${key}]}" - fi - fi - - bootstrap_id "has-defines_object_program-mode" - if [[ ${variables[${key}]} == "yes" ]] ; then - bootstrap_id "defines_object_program-mode" - if [[ ${defines_object_program} == "" ]] ; then - defines_object_program=${variables[${key}]} - else - defines_object_program="${defines_object_program} ${variables[${key}]}" - fi - fi - - bootstrap_id "has-defines_object_program_shared-mode" - if [[ ${variables[${key}]} == "yes" ]] ; then - bootstrap_id "defines_object_program_shared-mode" - if [[ ${defines_object_program_shared} == "" ]] ; then - defines_object_program_shared=${variables[${key}]} - else - defines_object_program_shared="${defines_object_program_shared} ${variables[${key}]}" - fi - fi - - bootstrap_id "has-defines_object_program_static-mode" - if [[ ${variables[${key}]} == "yes" ]] ; then - bootstrap_id "defines_object_program_static-mode" - if [[ ${defines_object_program_static} == "" ]] ; then - defines_object_program_static=${variables[${key}]} - else - defines_object_program_static="${defines_object_program_static} ${variables[${key}]}" + defines_object_static="${defines_object_static} ${variables[${key}]}" fi fi @@ -1897,7 +1869,7 @@ bootstrap_operation_build_prepare_flags() { fi fi - bootstrap_id "has-bootstrap_id-mode" + bootstrap_id "has-flags_library-mode" if [[ ${variables[${key}]} == "yes" ]] ; then bootstrap_id "flags_library-mode" if [[ ${flags_library} == "" ]] ; then @@ -1927,63 +1899,33 @@ bootstrap_operation_build_prepare_flags() { fi fi - bootstrap_id "has-flags_object_library-mode" - if [[ ${variables[${key}]} == "yes" ]] ; then - bootstrap_id "flags_object_library-mode" - if [[ ${flags_object_library} == "" ]] ; then - flags_object_library=${variables[${key}]} - else - flags_object_library="${flags_object_library} ${variables[${key}]}" - fi - fi - - bootstrap_id "has-flags_object_library_shared-mode" - if [[ ${variables[${key}]} == "yes" ]] ; then - bootstrap_id "flags_object_library_shared-mode" - if [[ ${flags_object_library_shared} == "" ]] ; then - flags_object_library_shared=${variables[${key}]} - else - flags_object_library_shared="${flags_object_library_shared} ${variables[${key}]}" - fi - fi - - bootstrap_id "has-flags_object_library_static-mode" + bootstrap_id "has-flags_object-mode" if [[ ${variables[${key}]} == "yes" ]] ; then - bootstrap_id "flags_object_library_static-mode" - if [[ ${flags_object_library_static} == "" ]] ; then - flags_object_library_static=${variables[${key}]} + bootstrap_id "flags_object-mode" + if [[ ${flags_object} == "" ]] ; then + flags_object=${variables[${key}]} else - flags_object_library_static="${flags_object_library_static} ${variables[${key}]}" + flags_object="${flags_object} ${variables[${key}]}" fi fi - bootstrap_id "has-flags_object_program-mode" + bootstrap_id "has-flags_object_shared-mode" if [[ ${variables[${key}]} == "yes" ]] ; then - bootstrap_id "flags_object_program-mode" - if [[ ${flags_object_program} == "" ]] ; then - flags_object_program=${variables[${key}]} + bootstrap_id "flags_object_shared-mode" + if [[ ${flags_object_shared} == "" ]] ; then + flags_object_shared=${variables[${key}]} else - flags_object_program="${flags_object_program} ${variables[${key}]}" + flags_object_shared="${flags_object_shared} ${variables[${key}]}" fi fi - bootstrap_id "has-flags_object_program_shared-mode" + bootstrap_id "has-flags_object_static-mode" if [[ ${variables[${key}]} == "yes" ]] ; then - bootstrap_id "flags_object_program_shared-mode" - if [[ ${flags_object_program_shared} == "" ]] ; then - flags_object_program_shared=${variables[${key}]} + bootstrap_id "flags_object_static-mode" + if [[ ${flags_object_static} == "" ]] ; then + flags_object_static=${variables[${key}]} else - flags_object_program_shared="${flags_object_program_shared} ${variables[${key}]}" - fi - fi - - bootstrap_id "has-flags_object_program_static-mode" - if [[ ${variables[${key}]} == "yes" ]] ; then - bootstrap_id "flags_object_program_static-mode" - if [[ ${flags_object_program_static} == "" ]] ; then - flags_object_program_static=${variables[${key}]} - else - flags_object_program_static="${flags_object_program_static} ${variables[${key}]}" + flags_object_static="${flags_object_static} ${variables[${key}]}" fi fi @@ -2100,17 +2042,19 @@ bootstrap_operation_build_prepare_headers() { bootstrap_operation_build_prepare_libraries() { - bootstrap_id "has-libraries-mode" + bootstrap_id "has-build_libraries-mode" if [[ ${variables[${key}]} == "yes" ]] ; then - if [[ ${libraries} == "" ]] ; then - libraries=${variables[${key}]} + bootstrap_id "build_libraries-mode" + if [[ ${build_libraries} == "" ]] ; then + build_libraries=${variables[${key}]} else - libraries="${variables[${key}]} ${libraries}" + build_libraries="${variables[${key}]} ${build_libraries}" fi fi - bootstrap_id "has-libraries_shared-mode" + bootstrap_id "has-build_libraries_shared-mode" if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "build_libraries_shared-mode" if [[ ${libraries_shared} == "" ]] ; then libraries_shared=${variables[${key}]} else @@ -2118,8 +2062,9 @@ bootstrap_operation_build_prepare_libraries() { fi fi - bootstrap_id "has-libraries_static-mode" + bootstrap_id "has-build_libraries_static-mode" if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "build_libraries_static-mode" if [[ ${libraries_static} == "" ]] ; then libraries_static=${variables[${key}]} else @@ -2127,8 +2072,9 @@ bootstrap_operation_build_prepare_libraries() { fi fi - bootstrap_id "has-sources_library-mode" + bootstrap_id "has-build_sources_library-mode" if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "build_sources_library-mode" if [[ ${sources_library} == "" ]] ; then sources_library=${variables[${key}]} else @@ -2136,12 +2082,12 @@ bootstrap_operation_build_prepare_libraries() { fi fi - bootstrap_id "has-sources_library_shared-mode" + bootstrap_id "has-build_sources_library_shared-mode" if [[ ${variables[${key}]} == "yes" ]] ; then - if [[ ${sources_library_shared} == "" ]] ; then + if [[ ${build_sources_library_shared} == "" ]] ; then sources_library_shared=${variables[${key}]} else - sources_library_shared="${build_sources_library_shared} ${variables[${key}]}" + sources_library_shared="${sources_library_shared} ${variables[${key}]}" fi fi @@ -2151,14 +2097,14 @@ bootstrap_operation_build_prepare_libraries() { if [[ ${sources_library_static} == "" ]] ; then sources_library_static=${variables[${key}]} else - sources_library_static="${build_sources_library_static} ${variables[${key}]}" + sources_library_static="${sources_library_static} ${variables[${key}]}" fi fi } bootstrap_operation_build_prepare_objects() { - bootstrap_id "has-objects_library-mode" + bootstrap_id "has-build_objects_library-mode" if [[ ${variables[${key}]} == "yes" ]] ; then bootstrap_id "build_objects_library-mode" if [[ ${objects_library} == "" ]] ; then @@ -2168,8 +2114,9 @@ bootstrap_operation_build_prepare_objects() { fi fi - bootstrap_id "has-objects_library_shared-mode" + bootstrap_id "has-build_objects_library_shared-mode" if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "build_objects_library_shared-mode" if [[ ${objects_library_shared} == "" ]] ; then objects_library_shared=${variables[${key}]} else @@ -2177,8 +2124,9 @@ bootstrap_operation_build_prepare_objects() { fi fi - bootstrap_id "has-objects_library_static-mode" + bootstrap_id "has-build_objects_library_static-mode" if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "build_objects_library_static-mode" if [[ ${objects_library_static} == "" ]] ; then objects_library_static=${variables[${key}]} else @@ -2186,8 +2134,9 @@ bootstrap_operation_build_prepare_objects() { fi fi - bootstrap_id "has-objects_program-mode" + bootstrap_id "has-build_objects_program-mode" if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "build_objects_program-mode" if [[ ${objects_program} == "" ]] ; then objects_program=${variables[${key}]} else @@ -2195,8 +2144,9 @@ bootstrap_operation_build_prepare_objects() { fi fi - bootstrap_id "has-objects_program_shared-mode" + bootstrap_id "has-build_objects_program_shared-mode" if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "build_objects_program_shared-mode" if [[ ${objects_program_shared} == "" ]] ; then objects_program_shared=${variables[${key}]} else @@ -2204,8 +2154,9 @@ bootstrap_operation_build_prepare_objects() { fi fi - bootstrap_id "hasobjects_program_static--mode" + bootstrap_id "has-build_objects_program_static--mode" if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "build_objects_program_static-mode" if [[ ${objects_program_static} == "" ]] ; then objects_program_static=${variables[${key}]} else @@ -2569,16 +2520,6 @@ bootstrap_operation_build_prepare_remaining() { version_nano_prefix=${variables[${key}]} fi - bootstrap_id "has-path_headers-mode" - if [[ ${variables[${key}]} == "yes" ]] ; then - bootstrap_id "path_headers-mode" - path_headers=${variables[${key}]} - - if [[ ${path_headers} != "" ]] ; then - path_headers=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_headers}) - fi - fi - bootstrap_id "has-preserve_path_headers-mode" if [[ ${variables[${key}]} == "yes" ]] ; then bootstrap_id "preserve_path_headers-mode" @@ -2670,6 +2611,19 @@ bootstrap_operation_build_prepare_remaining() { fi } +bootstrap_operation_build_prepare_scripts() { + + bootstrap_id "has-build_sources_script-mode" + if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "build_sources_script-mode" + if [[ ${sources_script} == "" ]] ; then + sources_script=${variables[${key}]} + else + sources_script="${sources_script} ${variables[${key}]}" + fi + fi +} + bootstrap_operation_build_prepare_settings() { bootstrap_id "has-build_sources_setting-mode" @@ -2902,10 +2856,64 @@ bootstrap_operation_build_prepare_versions() { version_file_value=${variables[${key}]} fi + bootstrap_id "has-version_major-mode" + if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "version_major-mode" + version_major=${variables[${key}]} + fi + + bootstrap_id "has-version_major_prefix-mode" + if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "version_major_prefix-mode" + version_major_prefix=${variables[${key}]} + fi + + bootstrap_id "has-version_minor-mode" + if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "version_minor-mode" + version_minor=${variables[${key}]} + fi + + bootstrap_id "has-version_minor_prefix-mode" + if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "version_minor_prefix-mode" + version_minor_prefix=${variables[${key}]} + fi + + bootstrap_id "has-version_micro-mode" + if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "version_micro-mode" + version_micro=${variables[${key}]} + fi + + bootstrap_id "has-version_micro_prefix-mode" + if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "version_micro_prefix-mode" + version_micro_prefix=${variables[${key}]} + fi + + bootstrap_id "has-version_micro-mode" + if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "version_micro-mode" + version_micro=${variables[${key}]} + fi + + bootstrap_id "has-version_nano-mode" + if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "version_nano-mode" + version_nano=${variables[${key}]} + fi + + bootstrap_id "has-version_nano_prefix-mode" + if [[ ${variables[${key}]} == "yes" ]] ; then + bootstrap_id "version_nano_prefix-mode" + version_nano_prefix=${variables[${key}]} + fi + bootstrap_id "has-version_target-mode" if [[ ${variables[${key}]} == "yes" ]] ; then bootstrap_id "version_target-mode" - version_target_value=${variables[${key}]} + version_target=${variables[${key}]} fi if [[ ${version_file_value} == "" ]] ; then @@ -2997,6 +3005,7 @@ bootstrap_cleanup() { unset bootstrap_operation_build_prepare_paths unset bootstrap_operation_build_prepare_programs unset bootstrap_operation_build_prepare_remaining + unset bootstrap_operation_build_prepare_scripts unset bootstrap_operation_build_prepare_settings unset bootstrap_operation_build_prepare_shared_static unset bootstrap_operation_build_prepare_versions