]> Kevux Git Server - fll/commitdiff
Feature: add version_target setting to Featureless Make and FLL generate script
authorKevin Day <thekevinday@gmail.com>
Sun, 7 Jun 2020 01:21:26 +0000 (20:21 -0500)
committerKevin Day <thekevinday@gmail.com>
Sun, 7 Jun 2020 01:57:30 +0000 (20:57 -0500)
I noticed that I had a different linker version string between Featureless Make and the FLL generate script.
After reviewing and fixing, I decided to make this a customizable option now called version_target.
The default, traditional behavior, is to use only the major version.

A major version target would link like "-Wl,-soname,libfake.so.0".
A minor version target would link like "-Wl,-soname,libfake.so.0.5".
A micro version target would link like "-Wl,-soname,libfake.so.0.5.0".

56 files changed:
build/level_0/settings
build/level_1/settings
build/level_2/settings
build/monolithic/settings
build/scripts/generate.sh
level_0/f_color/data/build/settings
level_0/f_console/data/build/settings
level_0/f_conversion/data/build/settings
level_0/f_directory/data/build/settings
level_0/f_environment/data/build/settings
level_0/f_file/data/build/settings
level_0/f_fss/data/build/settings
level_0/f_memory/data/build/settings
level_0/f_path/data/build/settings
level_0/f_pipe/data/build/settings
level_0/f_print/data/build/settings
level_0/f_serialized/data/build/settings
level_0/f_socket/data/build/settings
level_0/f_status/data/build/settings
level_0/f_string/data/build/settings
level_0/f_type/data/build/settings
level_0/f_utf/data/build/settings
level_1/fl_color/data/build/settings
level_1/fl_console/data/build/settings
level_1/fl_directory/data/build/settings
level_1/fl_file/data/build/settings
level_1/fl_fss/data/build/settings
level_1/fl_print/data/build/settings
level_1/fl_serialized/data/build/settings
level_1/fl_socket/data/build/settings
level_1/fl_status/data/build/settings
level_1/fl_string/data/build/settings
level_1/fl_utf/data/build/settings
level_1/fl_utf_file/data/build/settings
level_2/fll_directory/data/build/settings
level_2/fll_execute/data/build/settings
level_2/fll_file/data/build/settings
level_2/fll_fss/data/build/settings
level_2/fll_program/data/build/settings
level_2/fll_status/data/build/settings
level_3/byte_dump/data/build/settings
level_3/fake/c/fake.h
level_3/fake/c/private-build.c
level_3/fake/c/private-build.h
level_3/fake/data/build/settings
level_3/firewall/data/build/settings
level_3/fss_basic_list_read/data/build/settings
level_3/fss_basic_list_write/data/build/settings
level_3/fss_basic_read/data/build/settings
level_3/fss_basic_write/data/build/settings
level_3/fss_extended_list_read/data/build/settings
level_3/fss_extended_read/data/build/settings
level_3/fss_extended_write/data/build/settings
level_3/fss_status_code/data/build/settings
level_3/init/data/build/settings
level_3/status_code/data/build/settings

index f2a9226e95f2eede57306f6376e9734c5696a6bb..5775fb89ce30e1c2415fc44017d7c229fa3e530b 100644 (file)
@@ -5,6 +5,7 @@ project_name fll_0
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 60d19b8f3eaf69f2b4b88f8e95af2ecf0926d48e..dfa8ba3a4046c1c51e4f569caab7292f8cc3f4f3 100644 (file)
@@ -5,6 +5,7 @@ project_name fll_1
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 9dd1c5fb3a8d669688b63e3aebc64f9990ded744..616e7073098baab5f1d5c43ff52887739b393324 100644 (file)
@@ -5,6 +5,7 @@ project_name fll_2
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 523c984fb48f49c94dbd95fe102c1ab6fdaea908..8ce31575aa14a1c7e95319fbd41b127922c555e1 100644 (file)
@@ -5,6 +5,7 @@ project_name fll
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 5532297633e220a0ad47518d8242c7ce24f5b115..9dee8eacd1463afadcf9ae4e6b7283fc68751680 100644 (file)
@@ -363,22 +363,23 @@ generate_id(){
     "version_major") echo -n 37;;
     "version_micro") echo -n 38;;
     "version_minor") echo -n 39;;
-
-    "build_libraries-$mode") echo -n 40;;
-    "build_sources_headers-$mode") echo -n 41;;
-    "build_sources_library-$mode") echo -n 42;;
-    "build_sources_program-$mode") echo -n 43;;
-    "build_sources_setting-$mode") echo -n 44;;
-    "build_sources_script-$mode") echo -n 45;;
-    "defines_all-$mode") echo -n 46;;
-    "defines_shared-$mode") echo -n 47;;
-    "defines_static-$mode") echo -n 48;;
-    "environment-$mode") echo -n 49;;
-    "flags_all-$mode") echo -n 50;;
-    "flags_library-$mode") echo -n 51;;
-    "flags_program-$mode") echo -n 52;;
-    "flags_shared-$mode") echo -n 53;;
-    "flags_static-$mode") echo -n 54;;
+    "version_target") echo -n 40;;
+
+    "build_libraries-$mode") echo -n 41;;
+    "build_sources_headers-$mode") echo -n 42;;
+    "build_sources_library-$mode") echo -n 43;;
+    "build_sources_program-$mode") echo -n 44;;
+    "build_sources_setting-$mode") echo -n 45;;
+    "build_sources_script-$mode") echo -n 46;;
+    "defines_all-$mode") echo -n 47;;
+    "defines_shared-$mode") echo -n 48;;
+    "defines_static-$mode") echo -n 49;;
+    "environment-$mode") echo -n 50;;
+    "flags_all-$mode") echo -n 51;;
+    "flags_library-$mode") echo -n 52;;
+    "flags_program-$mode") echo -n 53;;
+    "flags_shared-$mode") echo -n 54;;
+    "flags_static-$mode") echo -n 55;;
   esac
 }
 
@@ -440,6 +441,7 @@ generate_operation_build(){
   local major=${variables[$(generate_id version_major)]}
   local minor=${variables[$(generate_id version_minor)]}
   local micro=${variables[$(generate_id version_micro)]}
+  local target=${variables[$(generate_id version_target)]}
   local compiler=${variables[$(generate_id build_compiler)]}
   local linker=${variables[$(generate_id build_linker)]}
   local arguments_include="-I${path_build}includes"
@@ -468,10 +470,23 @@ generate_operation_build(){
   local flags_program=${variables[$(generate_id flags_program)]}
   local i=
   local n=
+  local version=
   local alt=$1
   local directory=
   local path_headers=${variables[$(generate_id path_headers)]}
 
+  if [[ $target == "" ]] ; then
+    target="major"
+  fi
+
+  if [[ $target == "major" ]] ; then
+    version="$major"
+  elif [[ $target == "minor" ]] ; then
+    version="${major}.$minor"
+  elif [[ $target == "micro" ]] ; then
+    version="${major}.${minor}.$micro"
+  fi
+
   if [[ $sources_library == "" ]] ; then
     sources_library=${variables[$(generate_id build_sources_library-$mode)]}
   else
@@ -709,8 +724,8 @@ generate_operation_build(){
         sources="$sources$path_c$i "
       done
 
-      echo $compiler $sources -shared -Wl,-soname,lib$name.so.$major -o ${path_build}libraries/shared/lib$name.so.$major.$minor.$micro $arguments_shared $arguments_include $libraries $flags_all $flags_shared $flags_library
-      $compiler $sources -shared -Wl,-soname,lib$name.so.$major -o ${path_build}libraries/shared/lib$name.so.$major.$minor.$micro $arguments_shared $arguments_include $libraries $flags_all $flags_shared $flags_library || failure=1
+      echo $compiler $sources -shared -Wl,-soname,lib$name.so.$version -o ${path_build}libraries/shared/lib$name.so.$major.$minor.$micro $arguments_shared $arguments_include $libraries $flags_all $flags_shared $flags_library
+      $compiler $sources -shared -Wl,-soname,lib$name.so.$version -o ${path_build}libraries/shared/lib$name.so.$major.$minor.$micro $arguments_shared $arguments_include $libraries $flags_all $flags_shared $flags_library || failure=1
 
       if [[ $failure == "" ]] ; then
         ln -vsf lib$name.so.$major.$minor.$micro ${path_build}libraries/shared/lib$name.so.$major || failure=1
index 2ad6a7da73edc9cacc8333fdb6476e7c79548c9f..ab2504b3be088e58a60ea7d4089c96400149f9b5 100644 (file)
@@ -5,6 +5,7 @@ project_name f_color
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index dc78db213313452f47f716e1871f87d2d85d8580..e4f37c0ef8a1d969a2070a187ca2d9991b9b3830 100644 (file)
@@ -5,6 +5,7 @@ project_name f_console
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 8d115d7bbefd47427ddcf1b5be12c60238cb0d46..0a82958bcc211195cde6fc4df8e2fe443afbb6b2 100644 (file)
@@ -5,6 +5,7 @@ project_name f_conversion
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index ab0d94827936a1679d41ceac6fee8ff79320ba2e..6b80214a74121ca066fdfb26614a195596ec59eb 100644 (file)
@@ -5,6 +5,7 @@ project_name f_directory
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 9bb72ca1478b6b6c33a917c47d5aec8a06d33de3..7d93e65b3b6aaefc696f546698937ba953c6b8b2 100644 (file)
@@ -5,6 +5,7 @@ project_name f_environment
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index b8e027bfeb931d8cf7c0940ea356aeaacf3e1fe8..94200b87023b6e39f015b7f5708a048634f79ecd 100644 (file)
@@ -5,6 +5,7 @@ project_name f_file
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index ad2395a0c82504cc459fbedfa42cbffaea98b0be..af05559c860c9758aa46bcc283b5fd29350636c9 100644 (file)
@@ -5,6 +5,7 @@ project_name f_fss
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 38af880353393bb6fb914a7008d7bdc5b4c85f77..a39b499b2565b4e7b6ee907d56db4a7c667d1969 100644 (file)
@@ -5,6 +5,7 @@ project_name f_memory
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index cd750d82e1ddc002b382ec906531ad1470860cc2..96a2991318471cd6a89f1c2905a5a11af17ea525 100644 (file)
@@ -5,6 +5,7 @@ project_name f_path
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index a7d396835b530e561e3da756f723d60bf710d332..8634d1de97156af9f1643b6bc39720ff141f29c0 100644 (file)
@@ -5,6 +5,7 @@ project_name f_pipe
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 37f3c0121216ad703cf25daa66488e6fdae03db9..1268b34bf6c1578c9d21e7dea93360a016ff5e39 100644 (file)
@@ -5,6 +5,7 @@ project_name f_print
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 13005ab43436a9e38f2cc28d7c1d5050a420b732..3e0a939c03baf9d17654caa8d37428090b50a784 100644 (file)
@@ -5,6 +5,7 @@ project_name f_serialized
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 2ef51a47287655a7bb1a420d15a794c9f4ac974b..322b37b4eec1336abf2ddd766a8cb2ce7ec4bf12 100644 (file)
@@ -5,6 +5,7 @@ project_name f_socket
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 98a50df6577f8fe8a9a352dd4499ed79b3c2eda6..5a5651b61610ecd09b83e11f72cec5ca54c21a67 100644 (file)
@@ -5,6 +5,7 @@ project_name f_status
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index ca4e69dbd2b511c94e601658cbfb6a52e2a612aa..a9c3036c30588413e1c9588cb7471491f0f28dd4 100644 (file)
@@ -5,6 +5,7 @@ project_name f_string
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index d82d7d7a88a2d9b578bd06799d3e724f94fee5eb..a21a4742853a573a6f7d227829965663ec8b6476 100644 (file)
@@ -5,6 +5,7 @@ project_name f_type
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 9b85ffd6db077d6e03082157bf0868cd28a3c366..f969ed2c854e01be0a226c4df50aa518a9d6a3b7 100644 (file)
@@ -5,6 +5,7 @@ project_name f_utf
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index a68c63c0e8e48cc1af18382e7eda63fae9951e56..be3e02d597b2459a160cc9e875af0e7196b4f9ca 100644 (file)
@@ -5,6 +5,7 @@ project_name fl_color
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 985d02b149edea5f62a5c7c14efc922016a498f9..95c0b61cc1890f208fcd891aa34d2a72e1834bcb 100644 (file)
@@ -5,6 +5,7 @@ project_name fl_console
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index cd1e0d674802412797219767ea5091a6a45fa2c0..6857fa6bb48d7dbd47d5dc8406cbac8a3ed56eb5 100644 (file)
@@ -5,6 +5,7 @@ project_name fl_directory
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 5e0e5570aaf883d1c8f5c1415f9e3e4a58635d1a..e50d54889af4da9547fabaaf90f081653b13e3ed 100644 (file)
@@ -5,6 +5,7 @@ project_name fl_file
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 217e9910f1772f7b8ac386345c249ffeaf9b45f4..b43c0378057ee07f6fd330fa21d19ba3bc3f8907 100644 (file)
@@ -5,6 +5,7 @@ project_name fl_fss
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index d0d2b82edd37ea2db4de3949040e7c08af7dba4c..67f9bb3254d457af931b9239102e756ae6254a37 100644 (file)
@@ -5,6 +5,7 @@ project_name fl_print
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 33e65f6a83d318846851cd1e9d682ef9b3511736..1f370692badf2a1944393d07e6057c448369a3dd 100644 (file)
@@ -5,6 +5,7 @@ project_name fl_serialized
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index c7c0b955627d718a0fb23fb7d7f5712ce28067ac..5469e9ce6a97761ec33b5e9bd9dc3726145ca14c 100644 (file)
@@ -5,6 +5,7 @@ project_name fl_socket
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index dc3d7f23beea9971470c3c563269d46ce19f2fb9..2750fa58635f3eaaec8f378bd86e512025a75cf9 100644 (file)
@@ -5,6 +5,7 @@ project_name fl_status
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 08c4e4dde57103693af29ae19dde8d939119e8af..97545ab63a1963ee7100426d755fec17a3a17209 100644 (file)
@@ -5,6 +5,7 @@ project_name fl_string
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 133022ceec8f4b2184a310ed8bb00fe196f5d10e..2aad224bc30adc05ae44eed95a30f00cab136b56 100644 (file)
@@ -5,6 +5,7 @@ project_name fl_utf
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 468ff0766658916233ce609f0e0de1de4e9f88ac..07c15cfc8f72a5887f3be90079e32219c3c33e4a 100644 (file)
@@ -5,6 +5,7 @@ project_name fl_utf_file
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index c5acc8d1cc532646c82d92a66ba5a1033cc671b0..a68f9a8e85a0528111723b846713b9c301eea724 100644 (file)
@@ -5,6 +5,7 @@ project_name fll_directory
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index ebddf1debf00c5e8e5994692862336f0b64795bc..c90caf675b8a0aa360925d5fe0e12f2853a4edec 100644 (file)
@@ -5,6 +5,7 @@ project_name fll_execute
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index f1a42019f4ce8f3448c25caf66a2adcf8dd37c0e..9a2e30f55c0c2e7f09776574f6d3ba81a7de6b6a 100644 (file)
@@ -5,6 +5,7 @@ project_name fll_file
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 5cb307ad9e430264e5576c4b72b617e71b7ed228..e2391821976c3f3c89d973828c05bc2685f5a58e 100644 (file)
@@ -5,6 +5,7 @@ project_name fll_fss
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index be8cf828de907071fba9da9f32e32ce1b077e7ac..5b6d67d3f96b75016d28d5a5b652d96b0c3d5731 100644 (file)
@@ -5,6 +5,7 @@ project_name fll_program
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 93f11c062e0bf450f541adda413128a1c54f1ab7..76133aaa1648d9f513843fe001828880d6989f93 100644 (file)
@@ -5,6 +5,7 @@ project_name fll_status
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 9064079200f4401830e998356deba1a8df75aabf..e12a04f2336eca5381f1ebe09c80c50c3023f80e 100644 (file)
@@ -5,6 +5,7 @@ project_name byte_dump
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 3668ecd3056d189cb6772d34052fe94f52148615..023aa11965b3c2823ea7abd8e9e28fbfd6811fd2 100644 (file)
@@ -198,6 +198,22 @@ extern "C" {
   #define fake_build_language_cpp_length  3
 #endif // _di_fake_build_language_
 
+#ifndef _di_fake_build_version_
+  enum {
+    fake_build_version_type_major = 1,
+    fake_build_version_type_micro,
+    fake_build_version_type_minor,
+  };
+
+  #define fake_build_version_major "major"
+  #define fake_build_version_micro "micro"
+  #define fake_build_version_minor "minor"
+
+  #define fake_build_version_major_length 5
+  #define fake_build_version_micro_length 5
+  #define fake_build_version_minor_length 5
+#endif // _di_fake_build_version_
+
 #ifndef _di_fake_defines_
   enum {
     fake_operation_build = 1,
index 5823c1427f0b460f6af9f3d9b8da91e847b2fdb0..bb01bcad4e207a8b565c753ad02b54baaaabd410 100644 (file)
@@ -673,13 +673,31 @@ extern "C" {
 
       parameter_file_path[parameter_file_path_length] = 0;
 
-      f_string_length parameter_linker_length = fake_build_parameter_library_shared_prefix_length + parameter_file_name_micro_length;
+      f_string_length parameter_linker_length = fake_build_parameter_library_shared_prefix_length;
+
+      if (data_build.setting.version_target == fake_build_version_type_major) {
+        parameter_linker_length += parameter_file_name_major_length;
+      }
+      else if (data_build.setting.version_target == fake_build_version_type_minor) {
+        parameter_linker_length += parameter_file_name_minor_length;
+      }
+      else if (data_build.setting.version_target == fake_build_version_type_micro) {
+        parameter_linker_length += parameter_file_name_micro_length;
+      }
 
       char parameter_linker[parameter_linker_length + 1];
 
       memcpy(parameter_linker, fake_build_parameter_library_shared_prefix, fake_build_parameter_library_shared_prefix_length);
 
-      memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_length, parameter_file_name_micro, parameter_file_name_micro_length);
+      if (data_build.setting.version_target == fake_build_version_type_major) {
+        memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_length, parameter_file_name_major, parameter_file_name_major_length);
+      }
+      else if (data_build.setting.version_target == fake_build_version_type_minor) {
+        memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_length, parameter_file_name_minor, parameter_file_name_minor_length);
+      }
+      else if (data_build.setting.version_target == fake_build_version_type_micro) {
+        memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_length, parameter_file_name_micro, parameter_file_name_micro_length);
+      }
 
       parameter_linker[parameter_linker_length] = 0;
 
@@ -1168,6 +1186,7 @@ extern "C" {
           fake_build_setting_name_version_major,
           fake_build_setting_name_version_micro,
           fake_build_setting_name_version_minor,
+          fake_build_setting_name_version_target,
         };
 
         const f_string_length settings_length[] = {
@@ -1212,6 +1231,7 @@ extern "C" {
           fake_build_setting_name_version_major_length,
           fake_build_setting_name_version_micro_length,
           fake_build_setting_name_version_minor_length,
+          fake_build_setting_name_version_target_length,
         };
 
         f_string_dynamics build_compiler = f_string_dynamics_initialize;
@@ -1238,6 +1258,7 @@ extern "C" {
         f_string_dynamics version_major = f_string_dynamics_initialize;
         f_string_dynamics version_micro = f_string_dynamics_initialize;
         f_string_dynamics version_minor = f_string_dynamics_initialize;
+        f_string_dynamics version_target = f_string_dynamics_initialize;
 
         f_string_dynamics *settings_value[] = {
           &build_compiler,
@@ -1281,6 +1302,7 @@ extern "C" {
           &version_major,
           &version_micro,
           &version_minor,
+          &version_target,
         };
 
         f_string function = "fll_fss_snatch_apart";
@@ -1380,7 +1402,9 @@ extern "C" {
         }
         else {
           const f_string settings_single_name[] = {
+            fake_build_setting_name_build_compiler,
             fake_build_setting_name_build_language,
+            fake_build_setting_name_build_linker,
             fake_build_setting_name_build_script,
             fake_build_setting_name_build_shared,
             fake_build_setting_name_build_static,
@@ -1402,6 +1426,7 @@ extern "C" {
             fake_build_setting_name_version_major,
             fake_build_setting_name_version_micro,
             fake_build_setting_name_version_minor,
+            fake_build_setting_name_version_target,
           };
 
           const f_string_statics *settings_single_source[] = {
@@ -1429,11 +1454,7 @@ extern "C" {
             &version_major,
             &version_micro,
             &version_minor,
-          };
-
-          uint8_t *settings_single_language[] = {
-            0,
-            &setting->build_language,
+            &version_target,
           };
 
           bool *settings_single_bool[] = {
@@ -1487,7 +1508,40 @@ extern "C" {
             &setting->version_minor,
           };
 
-          // 1 = "yes" or "no", 2 = path/, 3 = literal, 4 = "bash", "c", or "c++".
+          uint8_t *settings_single_language[] = {
+            0,
+            &setting->build_language,
+          };
+
+          uint8_t *settings_single_version[] = {
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            &setting->version_target,
+          };
+
+          // 1 = "yes" or "no", 2 = path/, 3 = literal, 4 = "bash", "c", or "c++", 5 = "major", "minor", or "micro".
           uint8_t settings_single_type[] = {
             3,
             4,
@@ -1513,9 +1567,10 @@ extern "C" {
             3,
             3,
             3,
+            5,
           };
 
-          for (f_array_length i = 0; i < 24; i++) {
+          for (f_array_length i = 0; i < 25; i++) {
             if (settings_single_source[i]->used == 0) continue;
 
             if (settings_single_source[i]->used > 1) {
@@ -1588,6 +1643,37 @@ extern "C" {
                 }
               }
             }
+            else if (settings_single_type[i] == 5) {
+              if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_version_major, settings_single_source[i]->array[0].used, fake_build_version_major_length) == F_equal_to) {
+                *settings_single_version[i] = fake_build_version_type_major;
+              }
+              else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_version_micro, settings_single_source[i]->array[0].used, fake_build_version_micro_length) == F_equal_to) {
+                *settings_single_version[i] = fake_build_version_type_micro;
+              }
+              else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_version_minor, settings_single_source[i]->array[0].used, fake_build_version_minor_length) == F_equal_to) {
+                *settings_single_version[i] = fake_build_version_type_minor;
+              }
+              else {
+                *settings_single_version[i] = fake_build_version_type_major;
+
+                if (data.verbosity != fake_verbosity_quiet) {
+                  fprintf(f_type_warning, "%c", f_string_eol[0]);
+                  fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: the setting '");
+                  fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", settings_single_name[i]);
+                  fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' in the file '");
+                  fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
+                  fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' may only be one of '");
+                  fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_build_version_major);
+                  fl_color_print(f_type_warning, data.context.warning, data.context.reset, "', '");
+                  fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_build_version_minor);
+                  fl_color_print(f_type_warning, data.context.warning, data.context.reset, "', or '");
+                  fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_build_version_micro);
+                  fl_color_print(f_type_warning, data.context.warning, data.context.reset, "', defaulting to '");
+                  fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_build_version_major);
+                  fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "'.");
+                }
+              }
+            }
             else {
               *status = fl_string_dynamic_append_nulless(settings_single_source[i]->array[0], settings_single_destination[i]);
               if (F_status_is_error(*status)) {
@@ -1636,6 +1722,7 @@ extern "C" {
         f_macro_string_dynamics_delete_simple(version_major);
         f_macro_string_dynamics_delete_simple(version_micro);
         f_macro_string_dynamics_delete_simple(version_minor);
+        f_macro_string_dynamics_delete_simple(version_target);
       }
 
       f_macro_fss_objects_delete_simple(objects);
index d7c1c5c8fde45fea171b2a8059ae6b6028f69003..2e32f9f2017e8b5cffd4ba15597a18fd7441ca12 100644 (file)
@@ -32,6 +32,8 @@ extern "C" {
   typedef struct {
     uint8_t build_language;
 
+    uint8_t version_target;
+
     bool build_script;
     bool build_shared;
     bool build_static;
@@ -79,6 +81,7 @@ extern "C" {
 
   #define fake_build_setting_initialize { \
     0, \
+    0, \
     F_true, \
     F_true, \
     F_true, \
@@ -198,6 +201,7 @@ extern "C" {
   #define fake_build_setting_name_version_major          "version_major"
   #define fake_build_setting_name_version_micro          "version_micro"
   #define fake_build_setting_name_version_minor          "version_minor"
+  #define fake_build_setting_name_version_target         "version_target"
 
   #define fake_build_setting_name_build_compiler_length         14
   #define fake_build_setting_name_build_language_length         14
@@ -240,8 +244,9 @@ extern "C" {
   #define fake_build_setting_name_version_major_length          13
   #define fake_build_setting_name_version_micro_length          13
   #define fake_build_setting_name_version_minor_length          13
+  #define fake_build_setting_name_version_target_length         14
 
-  #define fake_build_setting_total 41
+  #define fake_build_setting_total 42
 
   #define fake_build_setting_bool_yes "yes"
   #define fake_build_setting_bool_no  "no"
index de0a5c47e3e96bcb0446127ffe593963523aaf09..c5451f51ecb91957ad3295f4b3adef95e6d1b5f3 100644 (file)
@@ -5,6 +5,7 @@ project_name fake
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 186641e735ccd3e0666a12554a0bfe0cc2c6fd6e..0ae42ee51a078650a9c17a33dfad88dff9dde348 100644 (file)
@@ -5,6 +5,7 @@ project_name firewall
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 48cd9dca3e62cf74521a1d335c8e398a4ef3cd1d..574404b31b9443ce96db8665a0dd7360b4500bb2 100644 (file)
@@ -5,6 +5,7 @@ project_name fss_basic_list_read
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index f9e6b5b1c5d8422c304ba2ef857617c7b56f5e22..0c86ee1f3d170de436b2b8e54c3dc1ae618e0f28 100644 (file)
@@ -5,6 +5,7 @@ project_name fss_basic_list_write
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index cd509e5df56b9f4804518140b62f651945a2f767..97a3299277e78bab9a10389835baa4c87373c5b1 100644 (file)
@@ -5,6 +5,7 @@ project_name fss_basic_read
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index bd745fac6a36be06478bcffb837ccc565fe2582d..9ecc6b3db05959004b48a54eb4e4ec476292857a 100644 (file)
@@ -5,6 +5,7 @@ project_name fss_basic_write
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index bae141082d47ded3c5bd93ab501a134e4a02920c..14e43ce26636809c8e2c15672c6b3794dc5b6214 100644 (file)
@@ -5,6 +5,7 @@ project_name fss_extended_list_read
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 74d1a46f3898fc12ab06932185ccabc9000ac5d2..0fe2271d35b31295d1ed6661d29924499fc712ce 100644 (file)
@@ -5,6 +5,7 @@ project_name fss_extended_read
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 3fad126ff1f818a0acf6287e2e9656aadec2e37e..1f0083613f95de54bf36e7c40f0897176afd9c03 100644 (file)
@@ -5,6 +5,7 @@ project_name fss_extended_write
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 723b057c47d5d0a277586e62ebb8b68904775782..dd72000d74b5f731f282980bea8051491c3786f0 100644 (file)
@@ -5,6 +5,7 @@ project_name fss_status_code
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index f6799393ed866cf5709ced7fd8b9c5b0168efac9..8e1b0d2e6b02b0790e38174ce121bfd90572ea60 100644 (file)
@@ -5,6 +5,7 @@ project_name init
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment
 
index 44ec947b9149307a92a660a225beb26179ba2ddc..45292a65ccc7be5275ee83bde9e811225ef2436f 100644 (file)
@@ -5,6 +5,7 @@ project_name status_code
 version_major 0
 version_minor 5
 version_micro 0
+version_target major
 
 environment