]> Kevux Git Server - fll/commitdiff
Bugfix: The bootstrap script is overwriting existing multi-valued settings.
authorKevin Day <Kevin@kevux.org>
Thu, 23 Apr 2026 01:55:34 +0000 (20:55 -0500)
committerKevin Day <Kevin@kevux.org>
Thu, 23 Apr 2026 01:55:34 +0000 (20:55 -0500)
This is a back port of commit 74f0689d3f7dc91a65b6069b9052580cab59601e.

This happens when there are multiple modes specifying the same value.
The multi-valued settings must have the value appended and not overwritten or removed.

Specifically, the setting is designated as not populated when a mode specifies a setting and then is followed by another mode that does not specify this setting.

Resolve this by adding checks if the setting is already designated as specified.
If the settings is not specified, then and only then declare it as unspecified.

build/scripts/bootstrap.sh

index 903c3f5d8847a46201e1a4bbb28520d1f7ba48d7..a1ebca9357f4074c39a667e8d28d5523c5023dcf 100644 (file)
@@ -43,7 +43,7 @@ bootstrap_main() {
   local c_subtle="\\033[1;30m"
   local c_prefix="\\"
 
-  local key=
+  local -i key=0
   local -A variables=()
   local define_extra=
   local failure=0
@@ -261,7 +261,6 @@ bootstrap_main() {
     project_built="${project_built}-${process}"
   fi
 
-  key=
   stage=
   bootstrap_id "stage"
   if [[ ${variables[${key}]} != "" ]] ; then
@@ -526,7 +525,7 @@ bootstrap_help() {
 
 bootstrap_copyright() {
 
-  echo "Copyright © 2007-2025 Kevin Day."
+  echo "Copyright © 2007-2026 Kevin Day."
   echo
   echo "Source code license lgpl-2.1-or-later."
   echo "Standard and specification license open-standard-license-1.0-or-later."
@@ -534,259 +533,37 @@ bootstrap_copyright() {
 }
 
 bootstrap_id() {
+  local match=${1}
+  local name=
 
-  case ${1} in
-    "build_compiler") let key=0;;
-    "build_indexer") let key=1;;
-    "build_indexer_arguments") let key=2;;
-    "build_language") let key=3;;
-    "build_libraries") let key=4;;
-    "build_libraries_shared") let key=5;;
-    "build_libraries_static") let key=6;;
-    "build_name") let key=7;;
-    "build_objects_library") let key=8;;
-    "build_objects_library_shared") let key=9;;
-    "build_objects_library_static") let key=10;;
-    "build_objects_program") let key=11;;
-    "build_objects_program_shared") let key=12;;
-    "build_objects_program_static") let key=13;;
-    "build_script") let key=14;;
-    "build_shared") let key=15;;
-    "build_sources_documentation") let key=16;;
-    "build_sources_headers") let key=17;;
-    "build_sources_headers_shared") let key=18;;
-    "build_sources_headers_static") let key=19;;
-    "build_sources_library") let key=20;;
-    "build_sources_library_shared") let key=21;;
-    "build_sources_library_static") let key=22;;
-    "build_sources_object") let key=23;;
-    "build_sources_object_shared") let key=24;;
-    "build_sources_object_static") let key=25;;
-    "build_sources_program") let key=26;;
-    "build_sources_program_shared") let key=27;;
-    "build_sources_program_static") let key=28;;
-    "build_sources_script") let key=29;;
-    "build_sources_setting") let key=30;;
-    "build_static") let key=31;;
-    "defines") let key=32;;
-    "defines_library") let key=33;;
-    "defines_library_shared") let key=34;;
-    "defines_library_static") let key=35;;
-    "defines_object") let key=36;;
-    "defines_object_shared") let key=37;;
-    "defines_object_static") let key=38;;
-    "defines_program") let key=39;;
-    "defines_program_shared") let key=40;;
-    "defines_program_static") let key=41;;
-    "defines_shared") let key=42;;
-    "defines_static") let key=43;;
-    "environment") let key=44;;
-    "flags") let key=45;;
-    "flags_library") let key=46;;
-    "flags_library_shared") let key=47;;
-    "flags_library_static") let key=48;;
-    "flags_object") let key=49;;
-    "flags_object_shared") let key=50;;
-    "flags_object_static") let key=51;;
-    "flags_program") let key=52;;
-    "flags_program_shared") let key=53;;
-    "flags_program_static") let key=54;;
-    "flags_shared") let key=55;;
-    "flags_static") let key=56;;
-    "has_path_standard") let key=57;;
-    "modes") let key=58;;
-    "modes_default") let key=59;;
-    "path_headers") let key=60;;
-    "path_language") let key=61;;
-    "path_library_script") let key=62;;
-    "path_library_shared") let key=63;;
-    "path_library_static") let key=64;;
-    "path_object_script") let key=65;;
-    "path_object_shared") let key=66;;
-    "path_object_static") let key=67;;
-    "path_program_script") let key=68;;
-    "path_program_shared") let key=69;;
-    "path_program_static") let key=70;;
-    "path_sources") let key=71;;
-    "path_sources_headers") let key=72;;
-    "path_sources_library") let key=73;;
-    "path_sources_object") let key=74;;
-    "path_sources_program") let key=75;;
-    "path_sources_script") let key=76;;
-    "preserve_path_headers") let key=77;;
-    "process_post") let key=78;;
-    "process_pre") let key=79;;
-    "search_exclusive") let key=80;;
-    "search_shared") let key=81;;
-    "search_static") let key=82;;
-    "stage") let key=83;;
-    "version_file") let key=84;;
-    "version_major") let key=85;;
-    "version_major_prefix") let key=86;;
-    "version_micro") let key=87;;
-    "version_micro_prefix") let key=88;;
-    "version_minor") let key=89;;
-    "version_minor_prefix") let key=90;;
-    "version_nano") let key=91;;
-    "version_nano_prefix") let key=92;;
-    "version_target") let key=93;;
-
-    "build_compiler-mode") let key=94;;
-    "build_indexer-mode") let key=95;;
-    "build_indexer_arguments-mode") let key=96;;
-    "build_language-mode") let key=97;;
-    "build_libraries-mode") let key=98;;
-    "build_libraries_shared-mode") let key=99;;
-    "build_libraries_static-mode") let key=100;;
-    "build_name-mode") let key=101;;
-    "build_objects_library-mode") let key=102;;
-    "build_objects_library_shared-mode") let key=103;;
-    "build_objects_library_static-mode") let key=104;;
-    "build_objects_program-mode") let key=105;;
-    "build_objects_program_shared-mode") let key=106;;
-    "build_objects_program_static-mode") let key=107;;
-    "build_script-mode") let key=108;;
-    "build_shared-mode") let key=109;;
-    "build_sources_documentation-mode") let key=110;;
-    "build_sources_headers-mode") let key=111;;
-    "build_sources_headers_shared-mode") let key=112;;
-    "build_sources_headers_static-mode") let key=113;;
-    "build_sources_library-mode") let key=114;;
-    "build_sources_library_shared-mode") let key=115;;
-    "build_sources_library_static-mode") let key=116;;
-    "build_sources_object-mode") let key=117;;
-    "build_sources_object_shared-mode") let key=118;;
-    "build_sources_object_static-mode") let key=119;;
-    "build_sources_program-mode") let key=120;;
-    "build_sources_program_shared-mode") let key=121;;
-    "build_sources_program_static-mode") let key=122;;
-    "build_sources_script-mode") let key=123;;
-    "build_sources_setting-mode") let key=124;;
-    "build_static-mode") let key=125;;
-    "defines-mode") let key=126;;
-    "defines_library-mode") let key=127;;
-    "defines_library_shared-mode") let key=128;;
-    "defines_library_static-mode") let key=129;;
-    "defines_object-mode") let key=130;;
-    "defines_object_shared-mode") let key=131;;
-    "defines_object_static-mode") let key=132;;
-    "defines_program-mode") let key=133;;
-    "defines_program_shared-mode") let key=134;;
-    "defines_program_static-mode") let key=135;;
-    "defines_shared-mode") let key=136;;
-    "defines_static-mode") let key=137;;
-    "environment-mode") let key=138;;
-    "flags-mode") let key=139;;
-    "flags_library-mode") let key=140;;
-    "flags_library_shared-mode") let key=141;;
-    "flags_library_static-mode") let key=142;;
-    "flags_object-mode") let key=143;;
-    "flags_object_shared-mode") let key=144;;
-    "flags_object_static-mode") let key=145;;
-    "flags_program-mode") let key=146;;
-    "flags_program_shared-mode") let key=147;;
-    "flags_program_static-mode") let key=148;;
-    "flags_shared-mode") let key=149;;
-    "flags_static-mode") let key=150;;
-    "has_path_standard-mode") let key=151;;
-    "path_headers-mode") let key=152;;
-    "path_language-mode") let key=153;;
-    "path_library_script-mode") let key=154;;
-    "path_library_shared-mode") let key=155;;
-    "path_library_static-mode") let key=156;;
-    "path_object_script-mode") let key=157;;
-    "path_object_shared-mode") let key=158;;
-    "path_object_static-mode") let key=159;;
-    "path_program_script-mode") let key=160;;
-    "path_program_shared-mode") let key=161;;
-    "path_program_static-mode") let key=162;;
-    "path_sources-mode") let key=163;;
-    "path_sources_headers-mode") let key=164;;
-    "path_sources_library-mode") let key=165;;
-    "path_sources_object-mode") let key=166;;
-    "path_sources_program-mode") let key=167;;
-    "path_sources_script-mode") let key=168;;
-    "preserve_path_headers-mode") let key=169;;
-    "process_post-mode") let key=170;;
-    "process_pre-mode") let key=171;;
-    "search_exclusive-mode") let key=172;;
-    "search_shared-mode") let key=173;;
-    "search_static-mode") let key=174;;
-    "stage-mode") let key=175;;
-    "version_file-mode") let key=176;;
-    "version_major-mode") let key=177;;
-    "version_major_prefix-mode") let key=178;;
-    "version_micro-mode") let key=179;;
-    "version_micro_prefix-mode") let key=180;;
-    "version_minor-mode") let key=181;;
-    "version_minor_prefix-mode") let key=182;;
-    "version_nano-mode") let key=183;;
-    "version_nano_prefix-mode") let key=184;;
-    "version_target-mode") let key=185;;
-
-    "has-build_compiler") let key=186;;
-    "has-build_indexer") let key=187;;
-    "has-build_indexer_arguments") let key=188;;
-    "has-build_name") let key=189;;
-    "has-has_path_standard") let key=190;;
-    "has-path_library_script") let key=191;;
-    "has-path_library_shared") let key=192;;
-    "has-path_library_static") let key=193;;
-    "has-path_object_script") let key=194;;
-    "has-path_object_shared") let key=195;;
-    "has-path_object_static") let key=196;;
-    "has-path_program_script") let key=197;;
-    "has-path_program_shared") let key=198;;
-    "has-path_program_static") let key=199;;
-    "has-path_sources") let key=200;;
-    "has-path_sources_headers") let key=201;;
-    "has-path_sources_library") let key=202;;
-    "has-path_sources_object") let key=203;;
-    "has-path_sources_program") let key=204;;
-    "has-path_sources_script") let key=205;;
-    "has-search_exclusive") let key=206;;
-    "has-search_shared") let key=207;;
-    "has-search_static") let key=208;;
-    "has-stage") let key=209;;
-    "has-version_major_prefix") let key=210;;
-    "has-version_micro_prefix") let key=211;;
-    "has-version_minor_prefix") let key=212;;
-    "has-version_nano_prefix") let key=213;;
-
-    "has-build_compiler-mode") let key=214;;
-    "has-build_indexer-mode") let key=215;;
-    "has-build_indexer_arguments-mode") let key=216;;
-    "has-build_name-mode") let key=217;;
-    "has-has_path_standard-mode") let key=218;;
-    "has-path_library_script-mode") let key=219;;
-    "has-path_library_shared-mode") let key=220;;
-    "has-path_library_static-mode") let key=221;;
-    "has-path_object_script-mode") let key=222;;
-    "has-path_object_shared-mode") let key=223;;
-    "has-path_object_static-mode") let key=224;;
-    "has-path_program_script-mode") let key=225;;
-    "has-path_program_shared-mode") let key=226;;
-    "has-path_program_static-mode") let key=227;;
-    "has-path_sources-mode") let key=228;;
-    "has-path_sources_headers-mode") let key=229;;
-    "has-path_sources_library-mode") let key=230;;
-    "has-path_sources_object-mode") let key=231;;
-    "has-path_sources_program-mode") let key=232;;
-    "has-path_sources_script-mode") let key=233;;
-    "has-search_exclusive-mode") let key=234;;
-    "has-search_shared-mode") let key=235;;
-    "has-search_static-mode") let key=236;;
-    "has-stage-mode") let key=237;;
-    "has-version_major_prefix-mode") let key=238;;
-    "has-version_micro_prefix-mode") let key=239;;
-    "has-version_minor_prefix-mode") let key=240;;
-    "has-version_nano_prefix-mode") let key=241;;
-  esac
+  # Start index position at index 1.
+  let key=1
+
+  for name 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_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 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 has_path_standard modes modes_default path_headers 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_headers path_sources_library path_sources_object path_sources_program path_sources_script preserve_path_headers process_post process_pre search_exclusive search_shared search_static stage 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
+
+    if [[ ${name} == ${match} ]] ; then return ; fi
+
+    let key++
+
+    if [[ "${name}-mode" == ${match} ]] ; then return ; fi
+
+    let key++
+
+    if [[ "has-${name}" == ${match} ]] ; then return ; fi
+
+    let key++
+
+    if [[ "has-${name}-mode" == ${match} ]] ; then return ; fi
+
+    let key++
+  done
+
+  # Use index 0 to represent not found.
+  let key=0
 }
 
 bootstrap_load_settings() {
   local i=
-  local key=
   local value=
 
   if [[ ! -d ${path_data}build/ ]] ; then
@@ -820,6 +597,84 @@ bootstrap_load_settings() {
     modes=${modes_default}
   fi
 
+  # Initialize index 0, which is used for key not found.
+  variables[0]=""
+
+  # Provide known defaults that have value of "yes".
+  for i in build_script build_shared build_static has_path_standard preserve_path_headers search_exclusive search_shared search_static ; do
+
+    bootstrap_id "${i}"
+
+    if [[ ${key} -ne 0 ]] ; then
+      variables[${key}]="yes"
+    fi
+  done
+
+  # Provide known defaults that have value of "script".
+  for i in path_library_script path_object_script path_program_script ; do
+
+    bootstrap_id "${i}"
+
+    if [[ ${key} -ne 0 ]] ; then
+      variables[${key}]="script"
+    fi
+  done
+
+  # Provide known defaults that have value of "shared".
+  for i in path_library_shared path_object_shared path_program_shared ; do
+
+    bootstrap_id "${i}"
+
+    if [[ ${key} -ne 0 ]] ; then
+      variables[${key}]="shared"
+    fi
+  done
+
+  # Provide known defaults that have value of "static".
+  for i in path_library_static path_object_static path_program_static ; do
+
+    bootstrap_id "${i}"
+
+    if [[ ${key} -ne 0 ]] ; then
+      variables[${key}]="static"
+    fi
+  done
+
+  # Provide compiler default.
+  bootstrap_id "build_compiler"
+
+  if [[ ${key} -ne 0 ]] ; then
+    variables[${key}]="gcc"
+  fi
+
+  # Provide indexer default.
+  bootstrap_id "build_indexer"
+
+  if [[ ${key} -ne 0 ]] ; then
+    variables[${key}]="ar"
+  fi
+
+  # Provide language default.
+  bootstrap_id "build_language"
+
+  if [[ ${key} -ne 0 ]] ; then
+    variables[${key}]="c"
+  fi
+
+  # Provide version_file default.
+  bootstrap_id "version_file"
+
+  if [[ ${key} -ne 0 ]] ; then
+    variables[${key}]="micro"
+  fi
+
+  # Provide version_target default.
+  bootstrap_id "version_target"
+
+  if [[ ${key} -ne 0 ]] ; then
+    variables[${key}]="major"
+  fi
+
   # Single value Objects.
   for i in build_compiler build_indexer build_language build_name build_script build_shared build_sources_object build_sources_object_shared build_sources_object_static build_static has_path_standard path_headers 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_headers path_sources_library path_sources_object path_sources_program path_sources_script preserve_path_headers process_post process_pre search_exclusive search_shared search_static stage 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
 
@@ -830,9 +685,8 @@ bootstrap_load_settings() {
         echo -e "${c_warning}WARNING: Failed to find index for '${c_notice}${i}${c_warning}' when calling ${c_notice}bootstrap_id()${c_warning}.${c_reset}"
       fi
 
-      key=
       bootstrap_id "has-${i}"
-      if [[ ${key} != "" ]] ; then
+      if [[ ${key} -ne 0 ]] ; then
         variables[${key}]="no"
       fi
     else
@@ -840,23 +694,20 @@ bootstrap_load_settings() {
         value=$(grep -sho "^[[:space:]]*${i}[[:space:]].*\$" ${settings_file} | sed -e "s|^[[:space:]]*${i}\>||" -e 's|^[[:space:]]*||')
         variables[${key}]="${value}"
 
-        key=
         bootstrap_id "has-${i}"
-        if [[ ${key} != "" ]] ; then
+        if [[ ${key} -ne 0 ]] ; then
           variables[${key}]="yes"
         fi
       elif [[ $(grep -sho "^[[:space:]]*${i}\$" ${settings_file}) != "" ]] ; then
         variables[${key}]=""
 
-        key=
         bootstrap_id "has-${i}"
-        if [[ ${key} != "" ]] ; then
+        if [[ ${key} -ne 0 ]] ; then
           variables[${key}]="yes"
         fi
       else
-        key=
         bootstrap_id "has-${i}"
-        if [[ ${key} != "" ]] ; then
+        if [[ ${key} -ne 0 ]] ; then
           variables[${key}]="no"
         fi
       fi
@@ -873,9 +724,8 @@ bootstrap_load_settings() {
         echo -e "${c_warning}WARNING: Failed to find index for '${c_notice}${i}${c_warning}' when calling ${c_notice}bootstrap_id()${c_warning}.${c_reset}"
       fi
 
-      key=
       bootstrap_id "has-${i}"
-      if [[ ${key} != "" ]] ; then
+      if [[ ${key} -ne 0 ]] ; then
         variables[${key}]="no"
       fi
     else
@@ -883,23 +733,20 @@ bootstrap_load_settings() {
         value=$(grep -sho "^[[:space:]]*${i}[[:space:]].*\$" ${settings_file} | sed -e "s|^[[:space:]]*${i}\>||" -e 's|^[[:space:]]*||')
         variables[${key}]="${variables[${key}]}${value} "
 
-        key=
         bootstrap_id "has-${i}"
-        if [[ ${key} != "" ]] ; then
+        if [[ ${key} -ne 0 ]] ; then
           variables[${key}]="yes"
         fi
       elif [[ $(grep -sho "^[[:space:]]*${i}\$" ${settings_file}) != "" ]] ; then
         variables[${key}]=""
 
-        key=
         bootstrap_id "has-${i}"
-        if [[ ${key} != "" ]] ; then
+        if [[ ${key} -ne 0 ]] ; then
           variables[${key}]="yes"
         fi
       else
-        key=
         bootstrap_id "has-${i}"
-        if [[ ${key} != "" ]] ; then
+        if [[ ${key} -ne 0 ]] ; then
           variables[${key}]="no"
         fi
       fi
@@ -909,10 +756,11 @@ bootstrap_load_settings() {
 
 bootstrap_load_settings_mode() {
   local i=
-  local key=
   local m=
   local value=
 
+  local -i key=0
+
   for m in ${modes} ; do
 
     # Single value Objects.
@@ -920,40 +768,39 @@ bootstrap_load_settings_mode() {
 
       bootstrap_id "${i}-mode"
 
-      if [[ ${key} == "" ]] ; then
+      if [[ ${key} -eq 0 ]] ; then
         if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
           echo -e "${c_warning}WARNING: Failed to find index for '${c_notice}${i}-${m}${c_warning}' when calling ${c_notice}bootstrap_id()${c_warning}.${c_reset}"
         fi
 
-        key=
         bootstrap_id "has-${i}-mode"
-        if [[ ${key} != "" ]] ; then
-          variables[${key}]="no"
+        if [[ ${key} -ne 0 ]] ; then
+          if [[ ${variables[${key}]} != "yes" ]] ; then
+            variables[${key}]="no"
+          fi
         fi
       else
-
         if [[ $(grep -sho "^[[:space:]]*${i}-${m}[[:space:]].*\$" ${settings_file}) != "" ]] ; then
           value=$(grep -sho "^[[:space:]]*${i}-${m}[[:space:]].*\$" ${settings_file} | sed -e "H;/${i}-${m}/h;\$!d;x" | sed -e "s|^[[:space:]]*${i}-${m}\>||" -e 's|^[[:space:]]*||')
           variables[${key}]="${value}"
 
-          key=
           bootstrap_id "has-${i}-mode"
-          if [[ ${key} != "" ]] ; then
+          if [[ ${key} -ne 0 ]] ; then
             variables[${key}]="yes"
           fi
         elif [[ $(grep -sho "^[[:space:]]*${i}-${m}\$" ${settings_file}) != "" ]] ; then
           variables[${key}]=""
 
-          key=
           bootstrap_id "has-${i}-mode"
-          if [[ ${key} != "" ]] ; then
+          if [[ ${key} -ne 0 ]] ; then
             variables[${key}]="yes"
           fi
         else
-          key=
           bootstrap_id "has-${i}-mode"
-          if [[ ${key} != "" ]] ; then
-            variables[${key}]="no"
+          if [[ ${key} -ne 0 ]] ; then
+            if [[ ${variables[${key}]} != "yes" ]] ; then
+              variables[${key}]="no"
+            fi
           fi
         fi
       fi
@@ -969,34 +816,34 @@ bootstrap_load_settings_mode() {
           echo -e "${c_warning}WARNING: Failed to find index for '${c_notice}${i}-${m}${c_warning}' when calling ${c_notice}bootstrap_id()${c_warning}.${c_reset}"
         fi
 
-        key=
         bootstrap_id "has-${i}-mode"
-        if [[ ${key} != "" ]] ; then
-          variables[${key}]="no"
+        if [[ ${key} -ne 0 ]] ; then
+          if [[ ${variables[${key}]} != "yes" ]] ; then
+            variables[${key}]="no"
+          fi
         fi
       else
         if [[ $(grep -sho "^[[:space:]]*${i}-${m}[[:space:]].*\$" ${settings_file}) != "" ]] ; then
           value=$(grep -sho "^[[:space:]]*${i}-${m}[[:space:]].*\$" ${settings_file} | sed -e "s|^[[:space:]]*${i}-${m}\>||" -e 's|^[[:space:]]*||')
           variables[${key}]="${variables[${key}]}${value} "
 
-          key=
-          bootstrap_id "has-${i}"
-          if [[ ${key} != "" ]] ; then
+          bootstrap_id "has-${i}-mode"
+          if [[ ${key} -ne 0 ]] ; then
             variables[${key}]="yes"
           fi
         elif [[ $(grep -sho "^[[:space:]]*${i}-${m}\$" ${settings_file}) != "" ]] ; then
           variables[${key}]=""
 
-          key=
-          bootstrap_id "has-${i}"
-          if [[ ${key} != "" ]] ; then
+          bootstrap_id "has-${i}-mode"
+          if [[ ${key} -ne 0 ]] ; then
             variables[${key}]="yes"
           fi
         else
-          key=
           bootstrap_id "has-${i}-mode"
-          if [[ ${key} != "" && ${variables[${key}]} != "yes" ]] ; then
-            variables[${key}]="no"
+          if [[ ${key} -ne 0 ]] ; then
+            if [[ ${variables[${key}]} != "yes" ]] ; then
+              variables[${key}]="no"
+            fi
           fi
         fi
       fi
@@ -1007,6 +854,7 @@ bootstrap_load_settings_mode() {
 bootstrap_prepare_build() {
   local alt=${1}
   local i=
+  local path_headers=
 
   mkdir ${verbose_common} -p ${path_build}{documents,documentation,includes,libraries/{script,shared,static},objects/{script,shared,static},programs/{script,shared,static},settings,stage} || failure=1
 
@@ -1020,18 +868,28 @@ bootstrap_prepare_build() {
 
   bootstrap_id "path_headers-mode"
   if [[ ${variables[${key}]} != "" ]] ; then
-    mkdir ${verbose_common} -p ${path_build}includes/${variables[${key}]} || failure=1
+    path_headers=${variables[${key}]}
   else
     bootstrap_id "path_headers"
 
     if [[ ${variables[${key}]} != "" ]] ; then
-      mkdir ${verbose_common} -p ${path_build}includes/${variables[${key}]} || failure=1
+      path_headers=${variables[${key}]}
     fi
   fi
 
+  if [[ ${path_headers} != "" ]] ; then
+    path_headers=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_headers})
+  fi
+
+  if [[ ${path_headers} != "" ]] ; then
+    path_headers="${path_build}includes/${path_headers}"
+    mkdir ${verbose_common} -p ${path_headers} || failure=1
+  fi
+
+
   if [[ ${failure} -eq 1 ]] ; then
     if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
-      echo -e "${c_warning}WARNING: Failed to create ${c_notice}path_heades${c_error} build directories in '${c_notice}${path_build}${c_error}'.${c_reset}"
+      echo -e "${c_warning}WARNING: Failed to create ${c_notice}path_heades${c_error} build directories in '${c_notice}${path_headers}${c_error}'.${c_reset}"
     fi
 
     return 1
@@ -1047,13 +905,14 @@ bootstrap_prepare_build() {
 }
 
 bootstrap_operation_build() {
+  local alt=${1}
+  local directory=
   local i=
   local n=
   local version_file=
   local version_target=
-  local alt=${1}
-  local directory=
-  local key=
+
+  local -i key=0
 
   bootstrap_id "build_compiler"
   local build_compiler=${variables[${key}]}
@@ -1423,6 +1282,7 @@ bootstrap_operation_build() {
         fi
       done
     else
+
       for i in ${sources_headers} ; do
         cp ${verbose_common} -f ${path_sources_headers}${path_language}${i} ${path_build}includes/${path_headers} || failure=1
       done
@@ -1546,8 +1406,8 @@ bootstrap_operation_build() {
           directory="${directory}/"
         fi
 
-        if [[ ! -d ${path_build}objects/${path_object_shared}${directory} ]] ; then
-          mkdir ${verbose_common} -p ${path_build}objects/${path_object_shared}${directory} || failure=1
+        if [[ ! -d ${path_build}objects/${path_object_static}${directory} ]] ; then
+          mkdir ${verbose_common} -p ${path_build}objects/${path_object_static}${directory} || failure=1
         fi
 
         sources="${path_sources_object}${path_language}${i} "
@@ -1665,11 +1525,9 @@ bootstrap_operation_build() {
 }
 
 bootstrap_operation_build_prepare_defaults() {
-  local key=
 
   bootstrap_id "has-version_major_prefix-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-version_major_prefix"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       version_major_prefix="."
@@ -1678,7 +1536,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-version_minor_prefix-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-version_minor_prefix"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       version_minor_prefix="."
@@ -1687,7 +1544,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-version_micro_prefix-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-version_micro_prefix"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       version_micro_prefix="."
@@ -1696,7 +1552,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-version_nano_prefix-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-version_nano_prefix"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       version_nano_prefix="."
@@ -1705,7 +1560,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-build_compiler-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-build_compiler"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       build_compiler="gcc"
@@ -1714,7 +1568,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-build_indexer-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-build_indexer"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       build_indexer="ar"
@@ -1723,7 +1576,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-path_library_script-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-path_library_script"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       path_library_script="script/"
@@ -1732,7 +1584,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-path_library_shared-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-path_library_shared"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       path_library_shared="shared/"
@@ -1741,7 +1592,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-path_library_static-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-path_library_static"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       path_library_static="static/"
@@ -1750,7 +1600,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-path_object_script-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-path_object_script"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       path_object_script="script/"
@@ -1759,7 +1608,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-path_object_shared-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-path_object_shared"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       path_object_shared="shared/"
@@ -1768,7 +1616,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-path_object_static-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-path_object_static"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       path_object_static="static/"
@@ -1777,7 +1624,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-path_program_script-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-path_program_script"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       path_program_script="script/"
@@ -1786,7 +1632,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-path_program_shared-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-path_program_shared"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       path_program_shared="shared/"
@@ -1795,7 +1640,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-path_program_static-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-path_program_static"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       path_program_static="static/"
@@ -1804,7 +1648,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-path_sources-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-path_sources"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       path_sources="sources/"
@@ -1813,7 +1656,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-path_sources_headers-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-path_sources_headers"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       path_sources_headers=${path_sources}
@@ -1822,7 +1664,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-path_sources_library-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-path_sources_library"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       path_sources_library=${path_sources}
@@ -1831,7 +1672,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-path_sources_object-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-path_sources_object"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       path_sources_object=${path_sources}
@@ -1840,7 +1680,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-path_sources_program-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-path_sources_program"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       path_sources_program=${path_sources}
@@ -1849,7 +1688,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-path_sources_script-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-path_sources_script"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       path_sources_script=${path_sources}
@@ -1858,7 +1696,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-has_path_standard-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-has_path_standard"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       has_path_standard="yes"
@@ -1867,7 +1704,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-search_shared-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-search_shared"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       search_shared="yes"
@@ -1876,7 +1712,6 @@ bootstrap_operation_build_prepare_defaults() {
 
   bootstrap_id "has-build_shared-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
-
     bootstrap_id "has-build_shared"
     if [[ ${variables[${key}]} != "yes" ]] ; then
       build_shared="yes"
@@ -1885,253 +1720,329 @@ bootstrap_operation_build_prepare_defaults() {
 }
 
 bootstrap_operation_build_prepare_defines() {
-  local key=
 
-  bootstrap_id "defines-mode"
-  if [[ ${defines} == "" ]] ; then
-    defines=${variables[${key}]}
-  else
-    defines="${defines} ${variables[${key}]}"
+  bootstrap_id "has-defines-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "defines-mode"
+    if [[ ${defines} == "" ]] ; then
+      defines=${variables[${key}]}
+    else
+      defines="${defines} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "defines_library-mode"
-  if [[ ${defines_library} == "" ]] ; then
-    defines_library=${variables[${key}]}
-  else
-    defines_library="${defines_library} ${variables[${key}]}"
+  bootstrap_id "has-defines_library-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "defines_library-mode"
+    if [[ ${defines_library} == "" ]] ; then
+      defines_library=${variables[${key}]}
+    else
+      defines_library="${defines_library} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "defines_library_shared-mode"
-  if [[ ${defines_library_shared} == "" ]] ; then
-    defines_library_shared=${variables[${key}]}
-  else
-    defines_library_shared="${defines_library_shared} ${variables[${key}]}"
+  bootstrap_id "has-defines_library_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "defines_library_shared-mode"
+    if [[ ${defines_library_shared} == "" ]] ; then
+      defines_library_shared=${variables[${key}]}
+    else
+      defines_library_shared="${defines_library_shared} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "defines_library_static-mode"
-  if [[ ${defines_library_static} == "" ]] ; then
-    defines_library_static=${variables[${key}]}
-  else
-    defines_library_static="${defines_library_static} ${variables[${key}]}"
+  bootstrap_id "has-defines_library_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "defines_library_static-mode"
+    if [[ ${defines_library_static} == "" ]] ; then
+      defines_library_static=${variables[${key}]}
+    else
+      defines_library_static="${defines_library_static} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "defines_object_library-mode"
-  if [[ ${defines_object_library} == "" ]] ; then
-    defines_object_library=${variables[${key}]}
-  else
-    defines_object_library="${defines_object_library} ${variables[${key}]}"
+  bootstrap_id "has-defines_object_library-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "defines_object_library-mode"
+    if [[ ${defines_object_library} == "" ]] ; then
+      defines_object_library=${variables[${key}]}
+    else
+      defines_object_library="${defines_object_library} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "defines_object_library_shared-mode"
-  if [[ ${defines_object_library_shared} == "" ]] ; then
-    defines_object_library_shared=${variables[${key}]}
-  else
-    defines_object_library_shared="${defines_object_library_shared} ${variables[${key}]}"
+  bootstrap_id "has-defines_object_library_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}]}
+    else
+      defines_object_library_shared="${defines_object_library_shared} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "defines_object_library_static-mode"
-  if [[ ${defines_object_library_static} == "" ]] ; then
-    defines_object_library_static=${variables[${key}]}
-  else
-    defines_object_library_static="${defines_object_library_static} ${variables[${key}]}"
+  bootstrap_id "has-defines_object_library_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}]}
+    else
+      defines_object_library_static="${defines_object_library_static} ${variables[${key}]}"
+    fi
   fi
 
-  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}]}"
+  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 "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}]}"
+  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 "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}]}"
+  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}]}"
+    fi
   fi
 
-  bootstrap_id "defines_program-mode"
-  if [[ ${defines_program} == "" ]] ; then
-    defines_program=${variables[${key}]}
-  else
-    defines_program="${defines_program} ${variables[${key}]}"
+  bootstrap_id "has-defines_program-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "defines_program-mode"
+    if [[ ${defines_program} == "" ]] ; then
+      defines_program=${variables[${key}]}
+    else
+      defines_program="${defines_program} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "defines_program_shared-mode"
-  if [[ ${defines_program_shared} == "" ]] ; then
-    defines_program_shared=${variables[${key}]}
-  else
-    defines_program_shared="${defines_program_shared} ${variables[${key}]}"
+  bootstrap_id "has-defines_program_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "defines_program_shared-mode"
+    if [[ ${defines_program_shared} == "" ]] ; then
+      defines_program_shared=${variables[${key}]}
+    else
+      defines_program_shared="${defines_program_shared} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "defines_program_static-mode"
-  if [[ ${defines_program_static} == "" ]] ; then
-    defines_program_static=${variables[${key}]}
-  else
-    defines_program_static="${defines_program_static} ${variables[${key}]}"
+  bootstrap_id "has-defines_program_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "defines_program_static-mode"
+    if [[ ${defines_program_static} == "" ]] ; then
+      defines_program_static=${variables[${key}]}
+    else
+      defines_program_static="${defines_program_static} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "defines_shared-mode"
-  if [[ ${defines_shared} == "" ]] ; then
-    defines_shared=${variables[${key}]}
-  else
-    defines_shared="${defines_shared} ${variables[${key}]}"
+  bootstrap_id "has-defines_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "defines_shared-mode"
+    if [[ ${defines_shared} == "" ]] ; then
+      defines_shared=${variables[${key}]}
+    else
+      defines_shared="${defines_shared} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "defines_static-mode"
-  if [[ ${defines_static} == "" ]] ; then
-    defines_static=${variables[${key}]}
-  else
-    defines_static="${defines_static} ${variables[${key}]}"
+  bootstrap_id "has-defines_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "defines_static-mode"
+    if [[ ${defines_static} == "" ]] ; then
+      defines_static=${variables[${key}]}
+    else
+      defines_static="${defines_static} ${variables[${key}]}"
+    fi
   fi
 }
 
 bootstrap_operation_build_prepare_documentation() {
-  local key=
 
-  bootstrap_id "build_sources_documentation-mode"
-  if [[ ${sources_documentation} == "" ]] ; then
-    sources_documentation=${variables[${key}]}
-  else
-    sources_documentation="${sources_documentation} ${variables[${key}]}"
+  bootstrap_id "has-build_sources_documentation-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "build_sources_documentation-mode"
+    if [[ ${sources_documentation} == "" ]] ; then
+      sources_documentation=${variables[${key}]}
+    else
+      sources_documentation="${sources_documentation} ${variables[${key}]}"
+    fi
   fi
 }
 
 bootstrap_operation_build_prepare_flags() {
-  local key=
 
-  bootstrap_id "flags-mode"
-  if [[ ${flags} == "" ]] ; then
-    flags=${variables[${key}]}
-  else
-    flags="${flags} ${variables[${key}]}"
+  bootstrap_id "has-flags-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "flags-mode"
+    if [[ ${flags} == "" ]] ; then
+      flags=${variables[${key}]}
+    else
+      flags="${flags} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "flags_library-mode"
-  if [[ ${flags_library} == "" ]] ; then
-    flags_library=${variables[${key}]}
-  else
-    flags_library="${flags_library} ${variables[${key}]}"
+  bootstrap_id "has-bootstrap_id-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "flags_library-mode"
+    if [[ ${flags_library} == "" ]] ; then
+      flags_library=${variables[${key}]}
+    else
+      flags_library="${flags_library} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "flags_library_shared-mode"
-  if [[ ${flags_library_shared} == "" ]] ; then
-    flags_library_shared=${variables[${key}]}
-  else
-    flags_library_shared="${flags_library_shared} ${variables[${key}]}"
+  bootstrap_id "has-flags_library_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "flags_library_shared-mode"
+    if [[ ${flags_library_shared} == "" ]] ; then
+      flags_library_shared=${variables[${key}]}
+    else
+      flags_library_shared="${flags_library_shared} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "flags_library_static-mode"
-  if [[ ${flags_library_static} == "" ]] ; then
-    flags_library_static=${variables[${key}]}
-  else
-    flags_library_static="${flags_library_static} ${variables[${key}]}"
+  bootstrap_id "has-flags_library_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "flags_library_static-mode"
+    if [[ ${flags_library_static} == "" ]] ; then
+      flags_library_static=${variables[${key}]}
+    else
+      flags_library_static="${flags_library_static} ${variables[${key}]}"
+    fi
   fi
 
-  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}]}"
+  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 "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}]}"
+  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 "flags_object_library_static-mode"
-  if [[ ${flags_object_library_static} == "" ]] ; then
-    flags_object_library_static=${variables[${key}]}
-  else
-    flags_object_library_static="${flags_object_library_static} ${variables[${key}]}"
+  bootstrap_id "has-flags_object_library_static-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}]}
+    else
+      flags_object_library_static="${flags_object_library_static} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "flags_object_program-mode"
-  if [[ ${flags_object_program} == "" ]] ; then
-    flags_object_program=${variables[${key}]}
-  else
-    flags_object_program="${flags_object_program} ${variables[${key}]}"
+  bootstrap_id "has-flags_object_program-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "flags_object_program-mode"
+    if [[ ${flags_object_program} == "" ]] ; then
+      flags_object_program=${variables[${key}]}
+    else
+      flags_object_program="${flags_object_program} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "flags_object_program_shared-mode"
-  if [[ ${flags_object_program_shared} == "" ]] ; then
-    flags_object_program_shared=${variables[${key}]}
-  else
-    flags_object_program_shared="${flags_object_program_shared} ${variables[${key}]}"
+  bootstrap_id "has-flags_object_program_shared-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}]}
+    else
+      flags_object_program_shared="${flags_object_program_shared} ${variables[${key}]}"
+    fi
   fi
 
-  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}]}"
+  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}]}"
+    fi
   fi
 
-  bootstrap_id "flags_program-mode"
-  if [[ ${flags_program} == "" ]] ; then
-    flags_program=${variables[${key}]}
-  else
-    flags_program="${flags_program} ${variables[${key}]}"
+  bootstrap_id "has-flags_program-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "flags_program-mode"
+    if [[ ${flags_program} == "" ]] ; then
+      flags_program=${variables[${key}]}
+    else
+      flags_program="${flags_program} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "flags_program_shared-mode"
-  if [[ ${flags_program_shared} == "" ]] ; then
-    flags_program_shared=${variables[${key}]}
-  else
-    flags_program_shared="${flags_program_shared} ${variables[${key}]}"
+  bootstrap_id "has-flags_program_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "flags_program_shared-mode"
+    if [[ ${flags_program_shared} == "" ]] ; then
+      flags_program_shared=${variables[${key}]}
+    else
+      flags_program_shared="${flags_program_shared} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "flags_program_static-mode"
-  if [[ ${flags_program_static} == "" ]] ; then
-    flags_program_static=${variables[${key}]}
-  else
-    flags_program_static="${flags_program_static} ${variables[${key}]}"
+  bootstrap_id "has-flags_program_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "flags_program_static-mode"
+    if [[ ${flags_program_static} == "" ]] ; then
+      flags_program_static=${variables[${key}]}
+    else
+      flags_program_static="${flags_program_static} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "flags_shared-mode"
-  if [[ ${flags_shared} == "" ]] ; then
-    flags_shared=${variables[${key}]}
-  else
-    flags_shared="${flags_shared} ${variables[${key}]}"
+  bootstrap_id "has-flags_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "flags_shared-mode"
+    if [[ ${flags_shared} == "" ]] ; then
+      flags_shared=${variables[${key}]}
+    else
+      flags_shared="${flags_shared} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "flags_static-mode"
-  if [[ ${flags_static} == "" ]] ; then
-    flags_static=${variables[${key}]}
-  else
-    flags_static="${flags_static} ${variables[${key}]}"
+  bootstrap_id "has-flags_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "flags_static-mode"
+    if [[ ${flags_static} == "" ]] ; then
+      flags_static=${variables[${key}]}
+    else
+      flags_static="${flags_static} ${variables[${key}]}"
+    fi
   fi
 }
 
 bootstrap_operation_build_prepare_headers() {
-  local key=
-
-  bootstrap_id "build_sources_headers-mode"
-  if [[ ${sources_headers} == "" ]] ; then
-    sources_headers=${variables[${key}]}
-  else
-    sources_headers="${sources_headers} ${variables[${key}]}"
-  fi
-
-  if [[ ${build_shared} == "yes" ]] ; then
-    bootstrap_id "build_sources_headers_shared"
-    if [[ ${sources_headers} == "" ]] ; then
-      sources_headers=${variables[${key}]}
-    else
-      sources_headers="${sources_headers} ${variables[${key}]}"
-    fi
 
-    bootstrap_id "build_sources_headers_static"
+  bootstrap_id "has-build_sources_headers-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "build_sources_headers-mode"
     if [[ ${sources_headers} == "" ]] ; then
       sources_headers=${variables[${key}]}
     else
@@ -2139,156 +2050,195 @@ bootstrap_operation_build_prepare_headers() {
     fi
   fi
 
-  if [[ ${build_static} == "yes" ]] ; then
-    bootstrap_id "build_sources_headers_shared-mode"
-    if [[ ${sources_headers} == "" ]] ; then
-      sources_headers=${variables[${key}]}
-    else
-      sources_headers="${sources_headers} ${variables[${key}]}"
+  if [[ ${build_shared} == "yes" ]] ; then
+
+    bootstrap_id "has-build_sources_headers_shared-mode"
+    if [[ ${variables[${key}]} == "yes" ]] ; then
+      bootstrap_id "build_sources_headers_shared"
+      if [[ ${sources_headers} == "" ]] ; then
+        sources_headers=${variables[${key}]}
+      else
+        sources_headers="${sources_headers} ${variables[${key}]}"
+      fi
     fi
 
-    bootstrap_id "build_sources_headers_static-mode"
-    if [[ ${sources_headers} == "" ]] ; then
-      sources_headers=${variables[${key}]}
-    else
-      sources_headers="${sources_headers} ${variables[${key}]}"
+
+    bootstrap_id "has-build_sources_headers_static-mode"
+    if [[ ${variables[${key}]} == "yes" ]] ; then
+      bootstrap_id "build_sources_headers_static"
+      if [[ ${sources_headers} == "" ]] ; then
+        sources_headers=${variables[${key}]}
+      else
+        sources_headers="${sources_headers} ${variables[${key}]}"
+      fi
     fi
   fi
 
-  bootstrap_id "path_headers-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
-    path_headers=${variables[${key}]}
-  else
-    bootstrap_id "path_headers"
-    if [[ ${variables[${key}]} != "" ]] ; then
-      path_headers=${variables[${key}]}
+  if [[ ${build_static} == "yes" ]] ; then
+
+    bootstrap_id "has-build_sources_headers_shared-mode"
+    if [[ ${variables[${key}]} == "yes" ]] ; then
+      bootstrap_id "build_sources_headers_shared-mode"
+      if [[ ${sources_headers} == "" ]] ; then
+        sources_headers=${variables[${key}]}
+      else
+        sources_headers="${sources_headers} ${variables[${key}]}"
+      fi
     fi
-  fi
 
-  if [[ ${path_headers} != "" ]] ; then
-    path_headers=$(sed -e 's|/*$|/|' <<< ${path_headers})
+    bootstrap_id "has-build_sources_headers_static-mode"
+    if [[ ${variables[${key}]} == "yes" ]] ; then
+      bootstrap_id "build_sources_headers_static-mode"
+      if [[ ${sources_headers} == "" ]] ; then
+        sources_headers=${variables[${key}]}
+      else
+        sources_headers="${sources_headers} ${variables[${key}]}"
+      fi
+    fi
   fi
 }
 
 bootstrap_operation_build_prepare_libraries() {
-  local key=
 
-  bootstrap_id "build_libraries-mode"
-  if [[ ${libraries} == "" ]] ; then
-    libraries=${variables[${key}]}
-  else
-    libraries="${variables[${key}]} ${libraries}"
+  bootstrap_id "has-libraries-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    if [[ ${libraries} == "" ]] ; then
+      libraries=${variables[${key}]}
+    else
+      libraries="${variables[${key}]} ${libraries}"
+    fi
   fi
 
-  bootstrap_id "build_libraries_shared-mode"
-  if [[ ${libraries_shared} == "" ]] ; then
-    libraries_shared=${variables[${key}]}
-  else
-    libraries_shared="${variables[${key}]} ${libraries_shared}"
+  bootstrap_id "has-libraries_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    if [[ ${libraries_shared} == "" ]] ; then
+      libraries_shared=${variables[${key}]}
+    else
+      libraries_shared="${variables[${key}]} ${libraries_shared}"
+    fi
   fi
 
-  bootstrap_id "build_libraries_static-mode"
-  if [[ ${libraries_static} == "" ]] ; then
-    libraries_static=${variables[${key}]}
-  else
-    libraries_static="${variables[${key}]} ${libraries_static}"
+  bootstrap_id "has-libraries_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    if [[ ${libraries_static} == "" ]] ; then
+      libraries_static=${variables[${key}]}
+    else
+      libraries_static="${variables[${key}]} ${libraries_static}"
+    fi
   fi
 
-  bootstrap_id "build_sources_library-mode"
-  if [[ ${sources_library} == "" ]] ; then
-    sources_library=${variables[${key}]}
-  else
-    sources_library="${sources_library} ${variables[${key}]}"
+  bootstrap_id "has-sources_library-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    if [[ ${sources_library} == "" ]] ; then
+      sources_library=${variables[${key}]}
+    else
+      sources_library="${sources_library} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "build_sources_library_shared-mode"
-  if [[ ${sources_library_shared} == "" ]] ; then
-    sources_library_shared=${variables[${key}]}
-  else
-    sources_library_shared="${build_sources_library_shared} ${variables[${key}]}"
+  bootstrap_id "has-sources_library_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    if [[ ${sources_library_shared} == "" ]] ; then
+      sources_library_shared=${variables[${key}]}
+    else
+      sources_library_shared="${build_sources_library_shared} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "build_sources_library_static-mode"
-  if [[ ${sources_library_static} == "" ]] ; then
-    sources_library_static=${variables[${key}]}
-  else
-    sources_library_static="${build_sources_library_static} ${variables[${key}]}"
+  bootstrap_id "has-build_sources_library_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "build_sources_library_static-mode"
+    if [[ ${sources_library_static} == "" ]] ; then
+      sources_library_static=${variables[${key}]}
+    else
+      sources_library_static="${build_sources_library_static} ${variables[${key}]}"
+    fi
   fi
 }
 
 bootstrap_operation_build_prepare_objects() {
-  local key=
 
-  bootstrap_id "build_objects_library-mode"
-  if [[ ${objects_library} == "" ]] ; then
-    objects_library=${variables[${key}]}
-  else
-    objects_library="${variables[${key}]} ${objects_library}"
+  bootstrap_id "has-objects_library-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "build_objects_library-mode"
+    if [[ ${objects_library} == "" ]] ; then
+      objects_library=${variables[${key}]}
+    else
+      objects_library="${variables[${key}]} ${objects_library}"
+    fi
   fi
 
-  bootstrap_id "build_objects_library_shared-mode"
-  if [[ ${objects_library_shared} == "" ]] ; then
-    objects_library_shared=${variables[${key}]}
-  else
-    objects_library_shared="${variables[${key}]} ${objects_library_shared}"
+  bootstrap_id "has-objects_library_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    if [[ ${objects_library_shared} == "" ]] ; then
+      objects_library_shared=${variables[${key}]}
+    else
+      objects_library_shared="${variables[${key}]} ${objects_library_shared}"
+    fi
   fi
 
-  bootstrap_id "build_objects_library_static-mode"
-  if [[ ${objects_library_static} == "" ]] ; then
-    objects_library_static=${variables[${key}]}
-  else
-    objects_library_static="${variables[${key}]} ${objects_library_static}"
+  bootstrap_id "has-objects_library_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    if [[ ${objects_library_static} == "" ]] ; then
+      objects_library_static=${variables[${key}]}
+    else
+      objects_library_static="${variables[${key}]} ${objects_library_static}"
+    fi
   fi
 
-  bootstrap_id "build_objects_program-mode"
-  if [[ ${objects_program} == "" ]] ; then
-    objects_program=${variables[${key}]}
-  else
-    objects_program="${variables[${key}]} ${objects_program}"
+  bootstrap_id "has-objects_program-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    if [[ ${objects_program} == "" ]] ; then
+      objects_program=${variables[${key}]}
+    else
+      objects_program="${variables[${key}]} ${objects_program}"
+    fi
   fi
 
-  bootstrap_id "build_objects_program_shared-mode"
-  if [[ ${objects_program_shared} == "" ]] ; then
-    objects_program_shared=${variables[${key}]}
-  else
-    objects_program_shared="${variables[${key}]} ${objects_program_shared}"
+  bootstrap_id "has-objects_program_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    if [[ ${objects_program_shared} == "" ]] ; then
+      objects_program_shared=${variables[${key}]}
+    else
+      objects_program_shared="${variables[${key}]} ${objects_program_shared}"
+    fi
   fi
 
-  bootstrap_id "build_objects_program_static-mode"
-  if [[ ${objects_program_static} == "" ]] ; then
-    objects_program_static=${variables[${key}]}
-  else
-    objects_program_static="${variables[${key}]} ${objects_program_static}"
+  bootstrap_id "hasobjects_program_static--mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    if [[ ${objects_program_static} == "" ]] ; then
+      objects_program_static=${variables[${key}]}
+    else
+      objects_program_static="${variables[${key}]} ${objects_program_static}"
+    fi
   fi
 
-  if [[ ${sources_object} == "" ]] ; then
+  bootstrap_id "has-build_sources_object-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "build_sources_object-mode"
     sources_object=${variables[${key}]}
   fi
 
-  if [[ ${sources_object_shared} == "" ]] ; then
+  bootstrap_id "has-build_sources_object_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "build_sources_object_shared-mode"
     sources_object_shared=${variables[${key}]}
   fi
 
-  if [[ ${sources_object_static} == "" ]] ; then
+  bootstrap_id "has-build_sources_object_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
     bootstrap_id "build_sources_object_static-mode"
     sources_object_static=${variables[${key}]}
   fi
 }
 
 bootstrap_operation_build_prepare_paths() {
-  local key=
 
   if [[ ${override_path_sources} == "" ]] ; then
-    bootstrap_id "path_sources-mode"
-    if [[ ${variables[${key}]} != "" ]] ; then
+    bootstrap_id "has-path_sources-mode"
+    if [[ ${variables[${key}]} == "yes" ]] ; then
+      bootstrap_id "path_sources-mode"
       path_sources=${variables[${key}]}
-    else
-      bootstrap_id "path_sources"
-      if [[ ${variables[${key}]} != "" ]] ; then
-        path_sources=${variables[${key}]}
-      fi
     fi
   fi
 
@@ -2296,22 +2246,19 @@ bootstrap_operation_build_prepare_paths() {
     path_sources=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_sources})
   fi
 
-  bootstrap_id "path_sources_object-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_sources_object-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_sources_object-mode"
     path_sources_object=${variables[${key}]}
-  else
-    bootstrap_id "path_sources_object"
-    if [[ ${variables[${key}]} != "" ]] ; then
-      path_sources_object=${variables[${key}]}
-    fi
   fi
 
   if [[ ${path_sources_object} != "" ]] ; then
     path_sources_object=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_sources_object})
   fi
 
-  bootstrap_id "path_headers-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_headers-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_headers-mode"
     path_headers=${variables[${key}]}
   fi
 
@@ -2319,21 +2266,23 @@ bootstrap_operation_build_prepare_paths() {
     path_headers=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_headers})
   fi
 
-  bootstrap_id "has_path_standard-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-has_path_standard-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "has_path_standard-mode"
     has_path_standard=${variables[${key}]}
   fi
 
   if [[ ${has_path_standard} == "no" ]] ; then
     path_language=
   else
-    bootstrap_id "path_language-mode"
-    if [[ ${variables[${key}]} != "" ]] ; then
-      path_language=${variables[${key}]}
-    else
-      bootstrap_id "path_language"
+    bootstrap_id "has-path_language-mode"
+    if [[ ${variables[${key}]} == "yes" ]] ; then
+      bootstrap_id "path_language-mode"
       if [[ ${variables[${key}]} != "" ]] ; then
         path_language=${variables[${key}]}
+      else
+        bootstrap_id "path_language"
+        path_language=${variables[${key}]}
       fi
     fi
 
@@ -2342,8 +2291,9 @@ bootstrap_operation_build_prepare_paths() {
     fi
   fi
 
-  bootstrap_id "path_object_library-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_object_library-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_object_library-mode"
     path_object_library=${variables[${key}]}
   fi
 
@@ -2351,8 +2301,9 @@ bootstrap_operation_build_prepare_paths() {
     path_object_library=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_object_library})
   fi
 
-  bootstrap_id "path_object_program-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_object_program-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_object_program-mode"
     path_object_program=${variables[${key}]}
   fi
 
@@ -2360,8 +2311,9 @@ bootstrap_operation_build_prepare_paths() {
     path_object_program=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_object_program})
   fi
 
-  bootstrap_id "path_library_script-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_library_script-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_library_script-mode"
     path_library_script=${variables[${key}]}
   fi
 
@@ -2369,8 +2321,9 @@ bootstrap_operation_build_prepare_paths() {
     path_library_script=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_library_script})
   fi
 
-  bootstrap_id "path_library_shared-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_library_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_library_shared-mode"
     path_library_shared=${variables[${key}]}
   fi
 
@@ -2378,8 +2331,9 @@ bootstrap_operation_build_prepare_paths() {
     path_library_shared=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_library_shared})
   fi
 
-  bootstrap_id "path_library_static-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_library_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_library_static-mode"
     path_library_static=${variables[${key}]}
   fi
 
@@ -2387,8 +2341,9 @@ bootstrap_operation_build_prepare_paths() {
     path_library_static=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_library_static})
   fi
 
-  bootstrap_id "path_object_library_script-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_object_library_script-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_object_library_script-mode"
     path_object_library_script=${variables[${key}]}
   fi
 
@@ -2396,8 +2351,9 @@ bootstrap_operation_build_prepare_paths() {
     path_object_library_script=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_object_library_script})
   fi
 
-  bootstrap_id "path_object_library_shared-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_object_library_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_object_library_shared-mode"
     path_object_library_shared=${variables[${key}]}
   fi
 
@@ -2405,8 +2361,9 @@ bootstrap_operation_build_prepare_paths() {
     path_object_library_shared=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_object_library_shared})
   fi
 
-  bootstrap_id "path_object_library_static-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_object_library_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_object_library_static-mode"
     path_object_library_static=${variables[${key}]}
   fi
 
@@ -2414,8 +2371,9 @@ bootstrap_operation_build_prepare_paths() {
     path_object_library_static=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_object_library_static})
   fi
 
-  bootstrap_id "path_object_program_script-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_object_program_script-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_object_program_script-mode"
     path_object_program_script=${variables[${key}]}
   fi
 
@@ -2423,8 +2381,9 @@ bootstrap_operation_build_prepare_paths() {
     path_object_program_script=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_object_program_script})
   fi
 
-  bootstrap_id "path_object_program_shared-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_object_program_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_object_program_shared-mode"
     path_object_program_shared=${variables[${key}]}
   fi
 
@@ -2432,8 +2391,9 @@ bootstrap_operation_build_prepare_paths() {
     path_object_program_shared=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_object_program_shared})
   fi
 
-  bootstrap_id "path_object_program_static-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_object_program_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_object_program_static-mode"
     path_object_program_static=${variables[${key}]}
   fi
 
@@ -2441,8 +2401,9 @@ bootstrap_operation_build_prepare_paths() {
     path_object_program_static=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_object_program_static})
   fi
 
-  bootstrap_id "path_object_script-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_object_script-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_object_script-mode"
     path_object_script=${variables[${key}]}
   fi
 
@@ -2450,8 +2411,9 @@ bootstrap_operation_build_prepare_paths() {
     path_object_script=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_object_script})
   fi
 
-  bootstrap_id "path_object_shared-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_object_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_object_shared-mode"
     path_object_shared=${variables[${key}]}
   fi
 
@@ -2459,8 +2421,9 @@ bootstrap_operation_build_prepare_paths() {
     path_object_shared=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_object_shared})
   fi
 
-  bootstrap_id "path_object_static-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_object_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_object_static-mode"
     path_object_static=${variables[${key}]}
   fi
 
@@ -2468,12 +2431,9 @@ bootstrap_operation_build_prepare_paths() {
     path_object_static=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_object_static})
   fi
 
-  if [[ ${path_object_static} != "" ]] ; then
-    path_object_static=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_object_static})
-  fi
-
-  bootstrap_id "path_program_script-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_program_script-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_program_script-mode"
     path_program_script=${variables[${key}]}
   fi
 
@@ -2481,8 +2441,9 @@ bootstrap_operation_build_prepare_paths() {
     path_program_script=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_program_script})
   fi
 
-  bootstrap_id "path_program_shared-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_program_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_program_shared-mode"
     path_program_shared=${variables[${key}]}
   fi
 
@@ -2490,47 +2451,51 @@ bootstrap_operation_build_prepare_paths() {
     path_program_shared=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_program_shared})
   fi
 
-  bootstrap_id "path_program_static-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-path_program_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "path_program_static-mode"
     path_program_static=${variables[${key}]}
   fi
 
   if [[ ${path_program_static} != "" ]] ; then
     path_program_static=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_program_static})
   fi
-
-  if [[ ${path_program_static} != "" ]] ; then
-    path_program_static=$(sed -e 's|//*|/|g' -e 's|/*$|/|' <<< ${path_program_static})
-  fi
 }
 
 bootstrap_operation_build_prepare_programs() {
-  local key=
 
-  bootstrap_id "build_sources_program-mode"
-  if [[ ${sources_program} == "" ]] ; then
-    sources_program=${variables[${key}]}
-  else
-    sources_program="${sources_program} ${variables[${key}]}"
+  bootstrap_id "has-build_sources_program-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "build_sources_program-mode"
+    if [[ ${sources_program} == "" ]] ; then
+      sources_program=${variables[${key}]}
+    else
+      sources_program="${sources_program} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "build_sources_program_shared-mode"
-  if [[ ${sources_program_shared} == "" ]] ; then
-    sources_program_shared=${variables[${key}]}
-  else
-    sources_program_shared="${sources_program_shared} ${variables[${key}]}"
+  bootstrap_id "has-build_sources_program_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "build_sources_program_shared-mode"
+    if [[ ${sources_program_shared} == "" ]] ; then
+      sources_program_shared=${variables[${key}]}
+    else
+      sources_program_shared="${sources_program_shared} ${variables[${key}]}"
+    fi
   fi
 
-  bootstrap_id "build_sources_program_static-mode"
-  if [[ ${sources_program_static} == "" ]] ; then
-    sources_program_static=${variables[${key}]}
-  else
-    sources_program_static="${sources_program_static} ${variables[${key}]}"
+  bootstrap_id "has-build_sources_program_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "build_sources_program_static-mode"
+    if [[ ${sources_program_static} == "" ]] ; then
+      sources_program_static=${variables[${key}]}
+    else
+      sources_program_static="${sources_program_static} ${variables[${key}]}"
+    fi
   fi
 }
 
 bootstrap_operation_build_prepare_remaining() {
-  local key=
 
   bootstrap_id "has-build_compiler-mode"
   if [[ ${variables[${key}]} == "yes" ]] ; then
@@ -2608,6 +2573,10 @@ bootstrap_operation_build_prepare_remaining() {
   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"
@@ -2702,26 +2671,29 @@ bootstrap_operation_build_prepare_remaining() {
 }
 
 bootstrap_operation_build_prepare_settings() {
-  local key=
 
-  bootstrap_id "build_sources_setting-mode"
-  if [[ ${sources_setting} == "" ]] ; then
-    sources_setting=${variables[${key}]}
-  else
-    sources_setting="${sources_setting} ${variables[${key}]}"
+  bootstrap_id "has-build_sources_setting-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "build_sources_setting-mode"
+    if [[ ${sources_setting} == "" ]] ; then
+      sources_setting=${variables[${key}]}
+    else
+      sources_setting="${sources_setting} ${variables[${key}]}"
+    fi
   fi
 }
 
 bootstrap_operation_build_prepare_shared_static() {
-  local key=
 
-  bootstrap_id "build_shared-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-build_shared-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "build_shared-mode"
     build_shared=${variables[${key}]}
   fi
 
-  bootstrap_id "build_static-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-build_static-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "build_static-mode"
     build_static=${variables[${key}]}
   fi
 
@@ -2923,15 +2895,16 @@ bootstrap_operation_build_validate_sources() {
 }
 
 bootstrap_operation_build_prepare_versions() {
-  local key=
 
-  bootstrap_id "version_file-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-version_file-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "version_file-mode"
     version_file_value=${variables[${key}]}
   fi
 
-  bootstrap_id "version_target-mode"
-  if [[ ${variables[${key}]} != "" ]] ; then
+  bootstrap_id "has-version_target-mode"
+  if [[ ${variables[${key}]} == "yes" ]] ; then
+    bootstrap_id "version_target-mode"
     version_target_value=${variables[${key}]}
   fi