]> Kevux Git Server - fll/commitdiff
Update: Add support for stand_alone builds in the example bootstrap script.
authorKevin Day <thekevinday@gmail.com>
Mon, 5 Sep 2022 22:44:28 +0000 (17:44 -0500)
committerKevin Day <thekevinday@gmail.com>
Mon, 5 Sep 2022 22:44:28 +0000 (17:44 -0500)
The bootstrap-example.sh script now supports building in "stand alone" mode for any program that has the mode defined.
The currently supported programs "fake" and "utf8" are still hard coded.
Future versions may check for the existence of the named files rather than being hard coded.

Update utf8 to compile.
Make the same changes for fake, but fake is not yet read because it has not been migrated yet.

build/scripts/bootstrap-example.sh
build/stand_alone/fake.config.h
build/stand_alone/fake.settings
build/stand_alone/utf8.config.h
build/stand_alone/utf8.settings

index 2ed83e019b3fd604e303e1ea8d0d127b0f0df421..bae9ac64fd4c8697071ece9c0ca1d14166de4b9d 100644 (file)
@@ -7,11 +7,27 @@
 # Instead this provides a functional example on what commands to perform to perform the bootstrap.
 #
 # This only accepts one argument, followed by these optional arguments:
-# 1) One of "individual", "level", "monolithic", "fake-individual", "fake-level", "fake-monolithic", "programs-individual", "programs-level", or "programs-monolithic".
+# 1) One of "Modes" from below.
 # 2) Optional, may be one of: +V, +q, +n, +l, +d, --enable-shared, --enable-static, --disable-shared, --disable-static.
 # 3) Optional, may be one of: -w, --work.
 # 4) Optional, may be: clang.
 #
+# Modes:
+#   - "individual"
+#   - "level"
+#   - "monolithic"
+#   - "fake-individual"
+#   - "fake-level"
+#   - "fake-monolithic"
+#   - "fake-stand_alone"
+#   - "utf8-individual"
+#   - "utf8-level"
+#   - "utf8-monolithic"
+#   - "utf8-stand_alone"
+#   - "programs-individual"
+#   - "programs-level"
+#   - "programs-monolithic"
+#
 # The -w/--work requires the path to the work directory following it.
 # The clang parameter does not need the "-m".
 #
@@ -29,6 +45,10 @@ shared=
 static=
 version=0.7.0
 clang=
+mode_part=
+mode_parameter=
+mode_path=
+mode_value=
 
 let i=2
 
@@ -141,19 +161,36 @@ if [[ $1 == "monolithic" ]] ; then
   ./install.sh $verbose $color $shared $static -w $path_work
 fi
 
-# The following in an example on building the Featureless Make project (fake) using the project bootstrapped from above.
-if [[ $1 == "fake-individual" || $1 == "fake-level" || $1 == "fake-monolithic" ]] ; then
-  if [[ $1 == "fake-individual" ]] ; then
+# The following in an example on building individual projects.
+for mode_part in fake utf8 ; do
+  if [[ $1 == "$mode_part-individual" || $1 == "$mode_part-level" || $1 == "$mode_part-monolithic" || $1 == "$mode_part-stand_alone" ]] ; then
+    break;
+  fi
+
+  mode_part=
+done
+
+if [[ $mode_part != "" ]] ; then
+  mode_parameter="-p"
+  mode_path="program"
+  mode_value=
+
+  if [[ $1 == "$mode_part-individual" ]] ; then
     build_mode="individual"
-  elif [[ $1 == "fake-level" ]] ; then
+  elif [[ $1 == "$mode_part-level" ]] ; then
     build_mode="level"
-  elif [[ $1 == "fake-monolithic" ]] ; then
+  elif [[ $1 == "$mode_part-monolithic" ]] ; then
     build_mode="monolithic"
+  elif [[ $1 == "$mode_part-stand_alone" ]] ; then
+    build_mode="stand_alone"
+    mode_path="stand_alone"
+    mode_parameter="-S"
+    mode_value="$mode_part"
   fi
 
-  bash build/scripts/package.sh $verbose $color rebuild -p &&
+  bash build/scripts/package.sh $verbose $color rebuild $mode_parameter $mode_value &&
 
-  cd package/program/fake-$version/ &&
+  cd package/$mode_path/$mode_part-$version/ &&
 
   ./bootstrap.sh clean $verbose $color &&
 
index b8a05651a1e6cc9bebd31cf9eb5515e466cfd3a6..671d702aba41b6cdecdd9e9fbe5ac9cec9a19078 100644 (file)
@@ -1,11 +1,16 @@
 // A config.h file for defining all code being disabled for compiling the stand alone Featureless Make.
 // To assist in building this file use: nm --defined-only -f p programs/shared/fake | grep -oP '^(f|fl|fll)_[^\s]+
 
+#define _di_f_account_adjust_
 #define _di_f_account_by_id_
 #define _di_f_account_by_name_
+#define _di_f_account_destroy_
 #define _di_f_account_group_name_by_id_
 #define _di_f_account_name_by_id_
-#define _di_f_accounts_t_
+#define _di_f_accounts_adjust_
+#define _di_f_accounts_decimate_by_
+#define _di_f_accountss_adjust_
+#define _di_f_accountss_decimate_by_
 
 #define _di_f_array_lengths_adjust_
 #define _di_f_array_lengths_append_
 
 #define _di_f_file_access_
 #define _di_f_file_access_at_
-#define _di_f_file_close_
-#define _di_f_file_close_flush_
 #define _di_f_file_create_at_
 #define _di_f_file_create_device_
 #define _di_f_file_create_device_at_
 #define _di_f_file_create_node_at_
 #define _di_f_file_descriptor_
 #define _di_f_file_exists_at_
-#define _di_f_file_flush_
 #define _di_f_file_is_at_
 #define _di_f_file_link_at_
 #define _di_f_file_link_hard_
index 754e5881704eefe4dc4b8689a62f32902f12de0c..68571e653c23662a6ebb5bc3b06f33704d857469 100644 (file)
@@ -7,8 +7,8 @@
 build_name fake
 
 version_major 0
-version_minor 6
-version_micro 1
+version_minor 7
+version_micro 0
 version_file micro
 version_target minor
 
@@ -32,7 +32,7 @@ build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c
 build_sources_program fll/level_0/directory.c fll/level_0/directory/common.c fll/level_0/private-directory.c
 build_sources_program fll/level_0/environment.c
 build_sources_program fll/level_0/execute.c
-build_sources_program fll/level_0/file.c fll/level_0/private-file.c fll/level_0/file/common.c
+build_sources_program fll/level_0/file.c fll/level_0/private-file.c fll/level_0/file/common.c fll/level_0/file/stream.c
 build_sources_program fll/level_0/fss.c fll/level_0/private-fss.c fll/level_0/fss/common.c fll/level_0/fss/named.c fll/level_0/fss/nest.c fll/level_0/fss/set.c
 build_sources_program fll/level_0/iki.c fll/level_0/iki/common.c fll/level_0/iki/data.c fll/level_0/private-iki.c fll/level_0/iki/private-data.c
 build_sources_program fll/level_0/limit.c fll/level_0/limit/set.c fll/level_0/limit/value.c fll/level_0/limit/private-set.c fll/level_0/limit/private-value.c
@@ -63,7 +63,7 @@ build_sources_program fll/level_2/fss.c fll/level_2/fss/basic.c fll/level_2/fss/
 build_sources_program fll/level_2/iki.c fll/level_2/private-iki.c
 build_sources_program fll/level_2/path.c
 build_sources_program fll/level_2/print.c
-build_sources_program fll/level_2/program.c fll/level_2/program/common.c fll/level_2/private-program.c
+build_sources_program fll/level_2/program.c fll/level_2/program/common.c fll/level_2/program/print.c fll/level_2/private-program.c
 
 build_sources_program program/fake/fake.c program/fake/common.c
 build_sources_program program/fake/private-build.c program/fake/private-build-library.c program/fake/private-build-load.c program/fake/private-build-object.c program/fake/private-build-objects.c program/fake/private-build-program.c program/fake/private-build-skeleton.c
index ce6efbe26d2a46f9d181707b7502b5deb2d78e92..0492539cdd97e99f90a42c5d94652f88e9d1efa0 100644 (file)
@@ -57,8 +57,6 @@
 #define _di_f_file_access_
 #define _di_f_file_access_at_
 #define _di_f_file_clone_
-#define _di_f_file_close_
-#define _di_f_file_close_flush_
 #define _di_f_file_copy_
 #define _di_f_file_create_
 #define _di_f_file_create_at_
@@ -70,7 +68,6 @@
 #define _di_f_file_create_node_at_
 #define _di_f_file_descriptor_
 #define _di_f_file_exists_at_
-#define _di_f_file_flush_
 #define _di_f_file_group_read_
 #define _di_f_file_is_
 #define _di_f_file_is_at_
 #define _di_f_string_dynamic_append_
 #define _di_f_string_dynamic_append_assure_
 #define _di_f_string_dynamic_append_assure_nulless_
-#define _di_f_string_dynamic_append_nulless_
 #define _di_f_string_dynamic_decimate_by_
 #define _di_f_string_dynamic_decrease_by_
 #define _di_f_string_dynamic_increase_
index 0b604a652b3015b8edd01993fc3af517fdb621b9..fcc5f7c3f80e90dc1b2cc0994739a6d72640ea6a 100644 (file)
@@ -7,8 +7,8 @@
 build_name utf8
 
 version_major 0
-version_minor 6
-version_micro 1
+version_minor 7
+version_micro 0
 version_file micro
 version_target minor
 
@@ -26,7 +26,7 @@ build_libraries -lc -lcap
 build_sources_program fll/level_0/color.c fll/level_0/private-color.c fll/level_0/color/common.c
 build_sources_program fll/level_0/console.c fll/level_0/console/common.c
 build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c fll/level_0/conversion/common.c
-build_sources_program fll/level_0/file.c fll/level_0/private-file.c fll/level_0/file/common.c
+build_sources_program fll/level_0/file.c fll/level_0/private-file.c fll/level_0/file/common.c fll/level_0/file/stream.c
 build_sources_program fll/level_0/memory.c fll/level_0/private-memory.c fll/level_0/memory/structure.c
 build_sources_program fll/level_0/pipe.c
 build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_0/print/common.c fll/level_0/print/to.c fll/level_0/print/private-to.c
@@ -43,9 +43,10 @@ build_sources_program fll/level_1/string.c fll/level_1/private-string.c
 
 build_sources_program fll/level_2/error.c fll/level_2/error/common.c fll/level_2/private-error.c
 build_sources_program fll/level_2/print.c
-build_sources_program fll/level_2/program.c fll/level_2/program/common.c fll/level_2/private-program.c
+build_sources_program fll/level_2/program.c fll/level_2/program/common.c fll/level_2/program/print.c fll/level_2/private-program.c
 
-build_sources_program program/utf8/utf8.c program/utf8/common.c program/utf8/private-common.c program/utf8/private-print.c program/utf8/private-utf8.c program/utf8/private-utf8_bytesequence.c program/utf8/private-utf8_codepoint.c
+build_sources_program program/utf8/common.c program/utf8/print.c program/utf8/utf8.c
+build_sources_program program/utf8/private-common.c program/utf8/private-utf8.c program/utf8/private-utf8_bytesequence.c program/utf8/private-utf8_codepoint.c
 
 build_sources_program program/utf8/main.c