]> Kevux Git Server - fll/commitdiff
Update: Setup all defauls and provide version_file and version_target defaults.
authorKevin Day <Kevin@kevux.org>
Wed, 10 Dec 2025 04:34:03 +0000 (22:34 -0600)
committerKevin Day <Kevin@kevux.org>
Wed, 10 Dec 2025 04:34:03 +0000 (22:34 -0600)
Make sure all of the build setting defaults are assigned at the start of the load process.

The `bootstrap.sh` script needs to also set the defaults for `version_file` and `version_target`.

build/scripts/bootstrap.sh
level_3/fake/c/main/build/load.c
level_3/fake/c/main/common/type.h

index 0ff2bb9adf7f59a93a02f33f1f16a016ce4fbe6a..18491e1f4a7e727dab346d99737d1ed44c6a4b00 100644 (file)
@@ -867,6 +867,20 @@ bootstrap_load_settings() {
     variables[${key}]="c"
   fi
 
+  # Provide version_file default.
+  bootstrap_id "version_file"
+
+  if [[ ${key} != "" ]] ; then
+    variables[${key}]="micro"
+  fi
+
+  # Provide version_target default.
+  bootstrap_id "version_target"
+
+  if [[ ${key} != "" ]] ; 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
 
index ad3576080a3b7b2dd0a5bdde7e1c3c340c05f3e7..d561eaa2f1af37696c9baca1a7824040ccc5fb28 100644 (file)
@@ -651,7 +651,17 @@ extern "C" {
     };
 
     // Set defaults.
-    setting->language = fake_build_language_c_e;
+    setting->language              = fake_build_language_c_e;
+    setting->version_file          = fake_build_version_micro_e;
+    setting->version_target        = fake_build_version_major_e;
+    setting->build_script          = F_true;
+    setting->build_shared          = F_true;
+    setting->build_static          = F_true;
+    setting->has_path_standard     = F_true;
+    setting->preserve_path_headers = F_true;
+    setting->search_exclusive      = F_true;
+    setting->search_shared         = F_true;
+    setting->search_static         = F_true;
 
     f_number_unsigned_t i = 0;
     f_number_unsigned_t j = 0;
index bd6325941b025766fec296cec532e64d9a75567c..6968e17ba09a77741c9101cc57db37aac8224ab1 100644 (file)
@@ -628,8 +628,8 @@ extern "C" {
   #define fake_build_setting_t_initialize { \
     .flag                                    = 0, \
     .language                                = fake_build_language_c_e, \
-    .version_file                            = 0, \
-    .version_target                          = 0, \
+    .version_file                            = fake_build_version_micro_e, \
+    .version_target                          = fake_build_version_major_e, \
     .build_script                            = F_true, \
     .build_shared                            = F_true, \
     .build_static                            = F_true, \