From: Kevin Day Date: Mon, 5 Sep 2022 22:44:28 +0000 (-0500) Subject: Update: Add support for stand_alone builds in the example bootstrap script. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=ec86d96abe005875b9236350752a65afc1b09804;p=fll Update: Add support for stand_alone builds in the example bootstrap script. 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. --- diff --git a/build/scripts/bootstrap-example.sh b/build/scripts/bootstrap-example.sh index 2ed83e0..bae9ac6 100644 --- a/build/scripts/bootstrap-example.sh +++ b/build/scripts/bootstrap-example.sh @@ -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 && diff --git a/build/stand_alone/fake.config.h b/build/stand_alone/fake.config.h index b8a0565..671d702 100644 --- a/build/stand_alone/fake.config.h +++ b/build/stand_alone/fake.config.h @@ -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_ @@ -117,8 +122,6 @@ #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_ @@ -128,7 +131,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_is_at_ #define _di_f_file_link_at_ #define _di_f_file_link_hard_ diff --git a/build/stand_alone/fake.settings b/build/stand_alone/fake.settings index 754e588..68571e6 100644 --- a/build/stand_alone/fake.settings +++ b/build/stand_alone/fake.settings @@ -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 diff --git a/build/stand_alone/utf8.config.h b/build/stand_alone/utf8.config.h index ce6efbe..0492539 100644 --- a/build/stand_alone/utf8.config.h +++ b/build/stand_alone/utf8.config.h @@ -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_ @@ -401,7 +398,6 @@ #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_ diff --git a/build/stand_alone/utf8.settings b/build/stand_alone/utf8.settings index 0b604a6..fcc5f7c 100644 --- a/build/stand_alone/utf8.settings +++ b/build/stand_alone/utf8.settings @@ -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