# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
+# Note: This adds "individual" and "monolithic" for consistency reasons. This should never use "individual" or "monolithic".
+#
build_name fll_0
version_file micro
version_target minor
-modes level level_threadless clang test fanalyzer
-modes_default level
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default level thread
build_compiler gcc
build_compiler-clang clang
build_sources_library utf/common.c utf/convert.c utf/dynamic.c utf/dynamics.c utf/dynamicss.c utf/is.c utf/is_character.c utf/map.c utf/maps.c utf/mapss.c utf/map_multi.c utf/map_multis.c utf/map_multiss.c utf/static.c utf/statics.c utf/staticss.c utf/string.c utf/triple.c utf/triples.c utf/tripless.c
build_sources_library utf/private-dynamic.c utf/private-dynamics.c utf/private-dynamicss.c utf/private-maps.c utf/private-mapss.c utf/private-map_multis.c utf/private-map_multiss.c utf/private-string.c utf/private-triples.c utf/private-tripless.c
-build_sources_library-level thread.c private-thread.c thread/attribute.c thread/barrier.c thread/barrier_attribute.c thread/condition.c thread/condition_attribute.c thread/id.c thread/key.c thread/lock.c thread/lock_attribute.c thread/mutex.c thread/mutex_attribute.c thread/once.c thread/semaphore.c thread/set.c thread/spin.c
+build_sources_library-thread thread.c private-thread.c thread/attribute.c thread/barrier.c thread/barrier_attribute.c thread/condition.c thread/condition_attribute.c thread/id.c thread/key.c thread/lock.c thread/lock_attribute.c thread/mutex.c thread/mutex_attribute.c thread/once.c thread/semaphore.c thread/set.c thread/spin.c
build_sources_headers account.h account/accounts.h account/common.h
build_sources_headers capability.h capability/common.h
build_sources_headers type_array/array_length.h type_array/cell.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/state.h type_array/status.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h
build_sources_headers utf.h utf/common.h utf/convert.h utf/dynamic.h utf/dynamics.h utf/dynamicss.h utf/is.h utf/is_character.h utf/map.h utf/maps.h utf/mapss.h utf/map_multi.h utf/map_multis.h utf/map_multiss.h utf/static.h utf/statics.h utf/staticss.h utf/string.h utf/triple.h utf/triples.h utf/tripless.h
-build_sources_headers-level thread.h thread/attribute.h thread/barrier.h thread/barrier_attribute.h thread/condition.h thread/condition_attribute.h thread/id.h thread/key.h thread/lock.h thread/lock_attribute.h thread/mutex.h thread/mutex_attribute.h thread/once.h thread/semaphore.h thread/set.h thread/spin.h
+build_sources_headers-thread thread.h thread/attribute.h thread/barrier.h thread/barrier_attribute.h thread/condition.h thread/condition_attribute.h thread/id.h thread/key.h thread/lock.h thread/lock_attribute.h thread/mutex.h thread/mutex_attribute.h thread/once.h thread/semaphore.h thread/set.h thread/spin.h
build_script yes
build_shared yes
#defines -D_di_libcap_
#defines -D_f_file_rename_use_renameat2_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
defines-clang -D_clang_not_a_compile_time_constant_workaround_
-defines-level_threadless -D_di_pthread_support_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -fstack-protector -Wall
flags-fanalyzer -fanalyzer
-flags-level -pthread
flags_library -fPIC
flags_object -fPIC
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
+# Note: This adds "individual" and "monolithic" for consistency reasons. This should never use "individual" or "monolithic".
+#
build_name fll_1
version_file micro
version_target minor
-modes level level_threadless clang test fanalyzer
-modes_default level
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default level thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc -lcap
build_libraries-level -lfll_0
-build_libraries-level_threadless -lfll_0
build_sources_library control_group.c
build_sources_library conversion.c private-conversion.c conversion/common.c
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
-defines-level_threadless -D_di_pthread_support_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -fstack-protector -Wall
flags-fanalyzer -fanalyzer
-flags-level -pthread
flags_library -fPIC
flags_object -fPIC
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
+# Note: This adds "individual" and "monolithic" for consistency reasons. This should never use "individual" or "monolithic".
+#
build_name fll_2
version_file micro
version_target minor
-modes level level_threadless clang test fanalyzer
-modes_default level
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default level thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc -lcap
build_libraries-level -lfll_1 -lfll_0
-build_libraries-level_threadless -lfll_1 -lfll_0
build_sources_library control_group.c
build_sources_library error.c private-error.c error/common.c
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
-defines-level_threadless -D_di_pthread_support_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -fstack-protector -Wall
flags-fanalyzer -fanalyzer
-flags-level -pthread
flags_library -fPIC
flags_object -fPIC
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
+# Note: This adds "individual" and "level" for consistency reasons. This should never use "individual" or "level".
+#
build_name fll
version_file micro
version_target minor
-modes monolithic monolithic_threadless clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_sources_library level_2/print.c
build_sources_library level_2/program.c level_2/program/common.c level_2/program/print.c level_2/private-program.c
-build_sources_library-monolithic level_0/thread.c level_0/private-thread.c level_0/thread/attribute.c level_0/thread/barrier.c level_0/thread/barrier_attribute.c level_0/thread/condition.c level_0/thread/condition_attribute.c level_0/thread/id.c level_0/thread/key.c level_0/thread/lock.c level_0/thread/lock_attribute.c level_0/thread/mutex.c level_0/thread/mutex_attribute.c level_0/thread/once.c level_0/thread/semaphore.c level_0/thread/set.c level_0/thread/spin.c
+build_sources_library-thread level_0/thread.c level_0/private-thread.c level_0/thread/attribute.c level_0/thread/barrier.c level_0/thread/barrier_attribute.c level_0/thread/condition.c level_0/thread/condition_attribute.c level_0/thread/id.c level_0/thread/key.c level_0/thread/lock.c level_0/thread/lock_attribute.c level_0/thread/mutex.c level_0/thread/mutex_attribute.c level_0/thread/once.c level_0/thread/semaphore.c level_0/thread/set.c level_0/thread/spin.c
build_sources_headers level_0/account.h level_0/account/accounts.h level_0/account/common.h
build_sources_headers level_0/capability.h level_0/capability/common.h
build_sources_headers level_2/print.h
build_sources_headers level_2/program.h level_2/program/common.h level_2/program/print.h
-build_sources_headers-monolithic level_0/thread.h level_0/thread/attribute.h level_0/thread/barrier.h level_0/thread/barrier_attribute.h level_0/thread/condition.h level_0/thread/condition_attribute.h level_0/thread/id.h level_0/thread/key.h level_0/thread/lock.h level_0/thread/lock_attribute.h level_0/thread/mutex.h level_0/thread/mutex_attribute.h level_0/thread/once.h level_0/thread/semaphore.h level_0/thread/set.h level_0/thread/spin.h
+build_sources_headers-thread level_0/thread.h level_0/thread/attribute.h level_0/thread/barrier.h level_0/thread/barrier_attribute.h level_0/thread/condition.h level_0/thread/condition_attribute.h level_0/thread/id.h level_0/thread/key.h level_0/thread/lock.h level_0/thread/lock_attribute.h level_0/thread/mutex.h level_0/thread/mutex_attribute.h level_0/thread/once.h level_0/thread/semaphore.h level_0/thread/set.h level_0/thread/spin.h
build_script yes
build_shared yes
#defines -D_di_libcap_
#defines -D_f_file_rename_use_renameat2_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
defines-clang -D_clang_not_a_compile_time_constant_workaround_
-defines-monolithic_threadless -D_di_pthread_support_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -fstack-protector -Wall
flags-fanalyzer -fanalyzer
-flags-monolithic -pthread
flags_library -fPIC
flags_object -fPIC
# SHELL_ENGINE="zsh" zsh ./bootstrap-example.sh --help
#
-if [[ $SHELL_ENGINE == "zsh" ]] ; then
+if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
emulate ksh
fi
-path_original="$PWD/"
+path_original="${PWD}/"
path_work="${path_original}fll/"
verbose=
mode_parameter=
mode_path=
mode_value=
+build_mode=
+build_mode_extra_param_1=
+build_mode_extra_value_1=
+build_mode_extra_param_2=
+build_mode_extra_value_2=
shell_command=bash
suppress_first="+F"
-if [[ $SHELL_ENGINE == "zsh" ]] ; then
+if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
shell_command=zsh
fi
let i=2
p=
-while [[ $i -le $# ]] ; do
+while [[ ${i} -le $# ]] ; do
- if [[ $SHELL_ENGINE == "zsh" ]] ; then
+ if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
p=${(P)i}
else
p=${!i}
fi
- if [[ $p == "+d" ]] ; then
+ if [[ ${p} == "+d" ]] ; then
color="+d"
- elif [[ $p == "+l" ]] ; then
+ elif [[ ${p} == "+l" ]] ; then
color="+l"
- elif [[ $p == "+n" ]] ; then
+ elif [[ ${p} == "+n" ]] ; then
color="+n"
- elif [[ $p == "+Q" ]] ; then
+ elif [[ ${p} == "+Q" ]] ; then
verbose="+Q"
verbose_common=
- elif [[ $p == "+E" ]] ; then
+ elif [[ ${p} == "+E" ]] ; then
verbose="+E"
verbose_common=
- elif [[ $p == "+N" ]] ; then
+ elif [[ ${p} == "+N" ]] ; then
verbose="+N"
verbose_common=
- elif [[ $p == "+V" ]] ; then
+ elif [[ ${p} == "+V" ]] ; then
verbose="+V"
verbose_common="-v"
- elif [[ $p == "+D" ]] ; then
+ elif [[ ${p} == "+D" ]] ; then
verbose="+D"
verbose_common="-v"
- elif [[ $p == "--enable-static" ]] ; then
+ elif [[ ${p} == "--enable-static" ]] ; then
static="--enable-static"
- elif [[ $p == "--disable-static" ]] ; then
+ elif [[ ${p} == "--disable-static" ]] ; then
static="--disable-static"
- elif [[ $p == "--enable-shared" ]] ; then
+ elif [[ ${p} == "--enable-shared" ]] ; then
shared="--enable-shared"
- elif [[ $p == "--disable-shared" ]] ; then
+ elif [[ ${p} == "--disable-shared" ]] ; then
shared="--disable-shared"
- elif [[ $p == "clang" ]] ; then
+ elif [[ ${p} == "clang" ]] ; then
clang="-m clang"
- elif [[ $p == "-w" || $p == "--work" ]] ; then
+ elif [[ ${p} == "-w" || ${p} == "--work" ]] ; then
let i++
- if [[ $i -le $# ]] ; then
- path_work=$p
+ if [[ ${i} -le $# ]] ; then
+ path_work=${p}
fi
fi
let i++
done
-if [[ ! -d $path_work ]] ; then
- mkdir $verbose_common -p $path_work
+if [[ ! -d ${path_work} ]] ; then
+ mkdir ${verbose_common} -p ${path_work}
fi
-if [[ $1 == "individual" ]] ; then
- $shell_command build/scripts/package.sh $verbose $color rebuild -i
+if [[ ${1} == "individual" ]] ; then
+ ${shell_command} build/scripts/package.sh ${verbose} ${color} rebuild -i
- if [[ $? -eq 0 ]] ; then
+ if [[ ${?} -eq 0 ]] ; then
for i in f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_compare f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_parse f_path f_pipe f_print f_rip f_status_string f_serialize f_signal f_socket f_thread fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_path fl_print fl_signal fl_status_string fl_utf_file fll_control_group fll_error fll_execute fll_file fll_fss fll_fss_status_string fll_iki fll_print fll_program ; do
- echo && echo "Processing $i." &&
+ echo && echo "Processing ${i}." &&
- cd package/individual/$i-$version/ &&
+ cd package/individual/${i}-${version}/ &&
- $shell_command ./bootstrap.sh clean $verbose $color $suppress_first &&
+ ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
- $shell_command ./bootstrap.sh build $verbose $color $suppress_first $shared $static -w $path_work -m individual $clang &&
+ ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m individual -m individual_thread -m thread ${clang} &&
- $shell_command ./install.sh $verbose $color $suppress_first $shared $static -w $path_work &&
+ ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} &&
- cd $path_original || break
+ cd ${path_original} || break
done
fi
fi
-if [[ $1 == "level" ]] ; then
- $shell_command build/scripts/package.sh $verbose $color rebuild -l &&
+if [[ ${1} == "level" ]] ; then
+ ${shell_command} build/scripts/package.sh ${verbose} ${color} rebuild -l &&
- cd package/level/fll-level_0-$version/ &&
+ cd package/level/fll-level_0-${version}/ &&
- $shell_command ./bootstrap.sh clean $verbose $color $suppress_first &&
+ ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
- $shell_command ./bootstrap.sh build $verbose $color $suppress_first $shared $static -w $path_work -m level $clang &&
+ ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m level -m thread ${clang} &&
- $shell_command ./install.sh $verbose $color $suppress_first $shared $static -w $path_work &&
+ ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} &&
- cd $path_original &&
+ cd ${path_original} &&
- cd package/level/fll-level_1-$version/ &&
+ cd package/level/fll-level_1-${version}/ &&
- $shell_command ./bootstrap.sh clean $verbose $color $suppress_first &&
+ ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
- $shell_command ./bootstrap.sh build $verbose $color $suppress_first $shared $static -w $path_work -m level &&
+ ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m level -m thread &&
- $shell_command ./install.sh $verbose $color $suppress_first $shared $static -w $path_work &&
+ ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} &&
- cd $path_original &&
+ cd ${path_original} &&
- cd package/level/fll-level_2-$version/ &&
+ cd package/level/fll-level_2-${version}/ &&
- $shell_command ./bootstrap.sh clean $verbose $color $suppress_first &&
+ ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
- $shell_command ./bootstrap.sh build $verbose $color $suppress_first $shared $static -w $path_work -m level &&
+ ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m level -m thread &&
- $shell_command ./install.sh $verbose $color $suppress_first $shared $static -w $path_work
+ ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work}
fi
-if [[ $1 == "monolithic" ]] ; then
- $shell_command build/scripts/package.sh $verbose $color rebuild -m &&
+if [[ ${1} == "monolithic" ]] ; then
+ ${shell_command} build/scripts/package.sh ${verbose} ${color} rebuild -m &&
- cd package/monolithic/fll-$version/ &&
+ cd package/monolithic/fll-${version}/ &&
- $shell_command ./bootstrap.sh clean $verbose $color $suppress_first &&
+ ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
- $shell_command ./bootstrap.sh build $verbose $color $suppress_first $shared $static -w $path_work -m monolithic $clang &&
+ ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m monolithic -m thread ${clang} &&
- $shell_command ./install.sh $verbose $color $shared $suppress_first $static -w $path_work
+ ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${suppress_first} ${static} -w ${path_work}
fi
# 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
+ 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
+if [[ ${mode_part} != "" ]] ; then
mode_parameter="-p"
mode_path="program"
mode_value=
+ build_mode_extra_param_1=
+ build_mode_extra_value_1=
+ build_mode_extra_param_2=
+ build_mode_extra_value_2=
- if [[ $1 == "$mode_part-individual" ]] ; then
+ if [[ ${1} == "${mode_part}-individual" ]] ; then
build_mode="individual"
- elif [[ $1 == "$mode_part-level" ]] ; then
+ build_mode_extra_param_1="-m"
+ build_mode_extra_value_1="individual_thread"
+ build_mode_extra_param_2="-m"
+ build_mode_extra_value_2="thread"
+ elif [[ ${1} == "${mode_part}-level" ]] ; then
build_mode="level"
- elif [[ $1 == "$mode_part-monolithic" ]] ; then
+ build_mode_extra_param_1="-m"
+ build_mode_extra_value_1="thread"
+ elif [[ ${1} == "${mode_part}-monolithic" ]] ; then
build_mode="monolithic"
- elif [[ $1 == "$mode_part-stand_alone" ]] ; then
+ build_mode_extra_param_1="-m"
+ build_mode_extra_value_1="thread"
+ elif [[ ${1} == "${mode_part}-stand_alone" ]] ; then
build_mode="stand_alone"
mode_path="stand_alone"
mode_parameter="-S"
- mode_value="$mode_part"
+ mode_value="${mode_part}"
+ build_mode_extra_param_1="-m"
+ build_mode_extra_value_1="thread"
fi
- $shell_command build/scripts/package.sh $verbose $color rebuild $mode_parameter $mode_value &&
+ ${shell_command} build/scripts/package.sh ${verbose} ${color} rebuild ${mode_parameter} ${mode_value} &&
- cd package/$mode_path/$mode_part-$version/ &&
+ cd package/${mode_path}/${mode_part}-${version}/ &&
- $shell_command ./bootstrap.sh clean $verbose $color $suppress_first &&
+ ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
- $shell_command ./bootstrap.sh build $verbose $color $suppress_first $shared $static -w $path_work -m $build_mode &&
+ ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} &&
- $shell_command ./install.sh $verbose $color $suppress_first $shared $static -w $path_work
+ ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work}
# The following in an example on building all FLL program projects using the project bootstrapped from above.
-elif [[ $1 == "programs-individual" || $1 == "programs-level" || $1 == "programs-monolithic" ]] ; then
- if [[ $1 == "programs-individual" ]] ; then
+elif [[ ${1} == "programs-individual" || ${1} == "programs-level" || ${1} == "programs-monolithic" ]] ; then
+ build_mode_extra_param_1=
+ build_mode_extra_value_1=
+ build_mode_extra_param_2=
+ build_mode_extra_value_2=
+
+ if [[ ${1} == "programs-individual" ]] ; then
build_mode="individual"
- elif [[ $1 == "programs-level" ]] ; then
+ build_mode_extra_param_1="-m"
+ build_mode_extra_value_1="individual_thread"
+ build_mode_extra_param_2="-m"
+ build_mode_extra_value_2="thread"
+ elif [[ ${1} == "programs-level" ]] ; then
build_mode="level"
- elif [[ $1 == "programs-monolithic" ]] ; then
+ build_mode_extra_param_1="-m"
+ build_mode_extra_value_1="thread"
+ elif [[ ${1} == "programs-monolithic" ]] ; then
build_mode="monolithic"
+ build_mode_extra_param_1="-m"
+ build_mode_extra_value_1="thread"
fi
- $shell_command build/scripts/package.sh $verbose $color rebuild -p &&
+ ${shell_command} build/scripts/package.sh ${verbose} ${color} rebuild -p &&
cd package/program
- if [[ $? -eq 0 ]] ; then
+ if [[ ${?} -eq 0 ]] ; then
for i in * ; do
- cd ${path_original}package/program/$i &&
+ cd ${path_original}package/program/${i} &&
- $shell_command ./bootstrap.sh clean $verbose $color $suppress_first &&
+ ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
- $shell_command ./bootstrap.sh build $verbose $color $suppress_first $shared $static -w $path_work -m $build_mode &&
+ ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} &&
- $shell_command ./install.sh $verbose $color $suppress_first $shared $static -w $path_work ||
+ ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} ||
break
done
echo "ERROR: failed to change directory to 'package/program'."
echo
fi
-elif [[ $1 != "individual" && $1 != "level" && $1 != "monolithic" ]] ; then
+elif [[ ${1} != "individual" && ${1} != "level" && ${1} != "monolithic" ]] ; then
echo
- echo "ERROR: '$1' is not a supported build mode."
+ echo "ERROR: '${1}' is not a supported build mode."
echo
fi
# Regardless of what happens always return to the starting directory.
-cd $path_original
+cd ${path_original}
bootstrap_main() {
- if [[ $SHELL_ENGINE == "zsh" ]] ; then
+ if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
emulate ksh
fi
local public_name="Simple FLL Bootstrap Script"
local system_name=bootstrap
- local called_name=$(basename $0)
+ local called_name=$(basename ${0})
local version=0.7.0
local grab_next=
if [[ $# -gt 0 ]] ; then
t=$#
- while [[ $i -lt $t ]] ; do
- let i=$i+1
+ while [[ ${i} -lt ${t} ]] ; do
+ let i=${i}+1
- if [[ $SHELL_ENGINE == "zsh" ]] ; then
+ if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
p=${(P)i}
else
p=${!i}
fi
- if [[ $grab_next == "" ]] ; then
- if [[ $p == "-h" || $p == "--help" ]] ; then
+ if [[ ${grab_next} == "" ]] ; then
+ if [[ ${p} == "-h" || ${p} == "--help" ]] ; then
do_help=yes
- elif [[ $p == "+C" || $p == "++copyright" ]] ; then
+ elif [[ ${p} == "+C" || ${p} == "++copyright" ]] ; then
do_copyright="yes"
- elif [[ $p == "+d" || $p == "++dark" ]] ; then
+ elif [[ ${p} == "+d" || ${p} == "++dark" ]] ; then
do_color=dark
context="+d"
- elif [[ $p == "+l" || $p == "++light" ]] ; then
+ elif [[ ${p} == "+l" || ${p} == "++light" ]] ; then
do_color=light
context="+l"
- elif [[ $p == "+n" || $p == "++no_color" ]] ; then
+ elif [[ ${p} == "+n" || ${p} == "++no_color" ]] ; then
do_color=none
context="+n"
- elif [[ $p == "+Q" || $p == "++quiet" ]] ; then
+ elif [[ ${p} == "+Q" || ${p} == "++quiet" ]] ; then
verbosity="quiet"
verbose="+Q"
verbose_common=
- elif [[ $p == "+E" || $p == "++error" ]] ; then
+ elif [[ ${p} == "+E" || ${p} == "++error" ]] ; then
verbosity="error"
verbose="+E"
verbose_common=
- elif [[ $p == "+N" || $p == "++normal" ]] ; then
+ elif [[ ${p} == "+N" || ${p} == "++normal" ]] ; then
verbosity=
verbose="+N"
verbose_common=
- elif [[ $p == "+V" || $p == "++verbose" ]] ; then
+ elif [[ ${p} == "+V" || ${p} == "++verbose" ]] ; then
verbosity="verbose"
verbose="+V"
verbose_common="-v"
- elif [[ $p == "+D" || $p == "++debug" ]] ; then
+ elif [[ ${p} == "+D" || ${p} == "++debug" ]] ; then
verbosity="debug"
verbose="+D"
verbose_common="-v"
- elif [[ $p == "+F" || $p == "++line_first_no" ]] ; then
+ elif [[ ${p} == "+F" || ${p} == "++line_first_no" ]] ; then
print_line_first="no"
- elif [[ $p == "+L" || $p == "++line_last_no" ]] ; then
+ elif [[ ${p} == "+L" || ${p} == "++line_last_no" ]] ; then
print_line_last="no"
- elif [[ $p == "+v" || $p == "++version" ]] ; then
- echo $version
+ elif [[ ${p} == "+v" || ${p} == "++version" ]] ; then
+ echo ${version}
return 0
- elif [[ $p == "-d" || $p == "--define" ]] ; then
+ elif [[ ${p} == "-d" || ${p} == "--define" ]] ; then
grab_next=define_extra
- elif [[ $p == "-m" || $p == "--mode" ]] ; then
+ elif [[ ${p} == "-m" || ${p} == "--mode" ]] ; then
grab_next="mode"
- elif [[ $p == "-p" || $p == "--process" ]] ; then
+ elif [[ ${p} == "-p" || ${p} == "--process" ]] ; then
grab_next="process"
- elif [[ $p == "-s" || $p == "--settings" ]] ; then
+ elif [[ ${p} == "-s" || ${p} == "--settings" ]] ; then
grab_next=settings_name
- elif [[ $p == "-b" || $p == "--build" ]] ; then
+ elif [[ ${p} == "-b" || ${p} == "--build" ]] ; then
grab_next=path_build
- elif [[ $p == "-d" || $p == "--data" ]] ; then
+ elif [[ ${p} == "-d" || ${p} == "--data" ]] ; then
grab_next=path_data
- elif [[ $p == "-S" || $p == "--sources" ]] ; then
+ elif [[ ${p} == "-S" || ${p} == "--sources" ]] ; then
grab_next=path_sources
- elif [[ $p == "-w" || $p == "--work" ]] ; then
+ elif [[ ${p} == "-w" || ${p} == "--work" ]] ; then
grab_next=path_work
- elif [[ $p == "--enable-doc" ]] ; then
+ elif [[ ${p} == "--enable-doc" ]] ; then
enable_documentation="yes"
- elif [[ $p == "--disable-doc" ]] ; then
+ elif [[ ${p} == "--disable-doc" ]] ; then
enable_documentation="no"
- elif [[ $p == "--enable-shared" ]] ; then
+ elif [[ ${p} == "--enable-shared" ]] ; then
enable_shared="yes"
- elif [[ $p == "--disable-shared" ]] ; then
+ elif [[ ${p} == "--disable-shared" ]] ; then
enable_shared="no"
- elif [[ $p == "--enable-static" ]] ; then
+ elif [[ ${p} == "--enable-static" ]] ; then
enable_static="yes"
- elif [[ $p == "--disable-static" ]] ; then
+ elif [[ ${p} == "--disable-static" ]] ; then
enable_static="no"
- elif [[ $operation == "" ]] ; then
- operation="$p"
- elif [[ $operation_failure == "" ]] ; then
+ elif [[ ${operation} == "" ]] ; then
+ operation="${p}"
+ elif [[ ${operation_failure} == "" ]] ; then
operation_failure=fail-multiple
fi
else
- if [[ $grab_next == "define_extra" ]] ; then
+ if [[ ${grab_next} == "define_extra" ]] ; then
define_extra="${define_extra}${p} "
- elif [[ $grab_next == "mode" ]] ; then
- modes="$modes$p "
- elif [[ $grab_next == "process" ]] ; then
- process="$p"
- elif [[ $grab_next == "settings_name" ]] ; then
- settings_name="$p"
- elif [[ $grab_next == "path_build" ]] ; then
- path_build=$(echo $p | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "mode" ]] ; then
+ modes="${modes}${p} "
+ elif [[ ${grab_next} == "process" ]] ; then
+ process="${p}"
+ elif [[ ${grab_next} == "settings_name" ]] ; then
+ settings_name="${p}"
+ elif [[ ${grab_next} == "path_build" ]] ; then
+ path_build=$(echo ${p} | sed -e 's|//*|/|g' -e 's|/*$|/|')
override_path_build="y"
- elif [[ $grab_next == "path_data" ]] ; then
- path_data=$(echo $p | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "path_data" ]] ; then
+ path_data=$(echo ${p} | sed -e 's|//*|/|g' -e 's|/*$|/|')
override_path_data="y"
- elif [[ $grab_next == "path_sources" ]] ; then
- path_sources=$(echo $p | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "path_sources" ]] ; then
+ path_sources=$(echo ${p} | sed -e 's|//*|/|g' -e 's|/*$|/|')
override_path_sources="y"
- elif [[ $grab_next == "path_work" ]] ; then
- path_work=$(echo $p | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "path_work" ]] ; then
+ path_work=$(echo ${p} | sed -e 's|//*|/|g' -e 's|/*$|/|')
override_path_work="y"
fi
p=
fi
- if [[ $verbosity == "quiet" ]] ; then
+ if [[ ${verbosity} == "quiet" ]] ; then
print_line_first="no"
print_line_last="no"
fi
# If the settings_name has a directory separator, then assume it is a path to the settings file.
- if [[ $(echo $settings_name | grep -s -o '/') == "" ]] ; then
- settings_file="${path_data}build/$settings_name"
+ if [[ $(echo ${settings_name} | grep -s -o '/') == "" ]] ; then
+ settings_file="${path_data}build/${settings_name}"
else
- settings_file="$settings_name"
+ settings_file="${settings_name}"
# Extract the settings name from the path.
- settings_name=$(basename $settings_name)
+ settings_name=$(basename ${settings_name})
fi
settings_defines="${path_data}build/defines"
bootstrap_handle_colors
- if [[ $do_help == "yes" ]] ; then
+ if [[ ${do_help} == "yes" ]] ; then
bootstrap_help
bootstrap_cleanup
return 0
fi
- if [[ $do_copyright == "yes" ]] ; then
+ if [[ ${do_copyright} == "yes" ]] ; then
bootstrap_copyright
bootstrap_cleanup
bootstrap_load_settings
# FSS and Featurless Make supports more flexible mode names, but for the purpose of this bootstrap script and avoiding potential problems, keep it simple.
- if [[ $modes != "" ]] ; then
- for mode in $modes ; do
- if [[ $(echo "$mode" | grep -s -o "[^_[:alnum:]+-]") != "" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${modes} != "" ]] ; then
+ for mode in ${modes} ; do
+ if [[ $(echo "${mode}" | grep -s -o "[^_[:alnum:]+-]") != "" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: The mode ${c_notice}${mode}${c_error} includes invalid characters, only alphanumeric, underscore, minus, and plus are allowed.${c_reset}"
done
fi
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
bootstrap_cleanup
return 1
bootstrap_load_settings_mode
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
bootstrap_cleanup
return 1
fi
bootstrap_id "build_name"
- project_built="${path_build_stage}${variables[$key]}"
- if [[ $process != "" ]] ; then
- project_built="${project_built}-$process"
+ project_built="${path_build_stage}${variables[${key}]}"
+ if [[ ${process} != "" ]] ; then
+ project_built="${project_built}-${process}"
fi
project_built_shared="${project_built}.shared"
project_built_static="${project_built}.static"
- if [[ $modes_available == "" ]] ; then
- if [[ $modes != "" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${modes_available} == "" ]] ; then
+ if [[ ${modes} != "" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: The mode(s) ${c_notice}${modes}${c_error} are not a valid modes, there are no available modes.${c_error}${c_reset}"
fi
else
let i=0
- for m in $modes_available ; do
+ for m in ${modes_available} ; do
- for mode in $modes ; do
+ for mode in ${modes} ; do
- if [[ "$mode" == "$m" ]] ; then
+ if [[ "${mode}" == "${m}" ]] ; then
let i=1
break
fi
done
- if [[ $i -eq 1 ]] ; then break ; fi
+ if [[ ${i} -eq 1 ]] ; then break ; fi
done
- if [[ $i -eq 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${i} -eq 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
- echo -e "${c_error}ERROR: The mode(s) ${c_notice}${modes}${c_error} are not valid modes, they must be one of: ${c_notice}$modes_available${c_error}.${c_reset}"
+ echo -e "${c_error}ERROR: The mode(s) ${c_notice}${modes}${c_error} are not valid modes, they must be one of: ${c_notice}${modes_available}${c_error}.${c_reset}"
bootstrap_print_last
fi
fi
bootstrap_id "build_name"
- if [[ ${variables[$key]} == "" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${variables[${key}]} == "" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: The required setting '${c_notice}build_name${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}"
fi
bootstrap_id "version_major"
- if [[ ${variables[$key]} == "" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${variables[${key}]} == "" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: The required setting '${c_notice}version_major${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}"
fi
bootstrap_id "version_minor"
- if [[ ${variables[$key]} == "" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${variables[${key}]} == "" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: The required setting '${c_notice}version_minor${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}"
fi
bootstrap_id "version_micro"
- if [[ ${variables[$key]} == "" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${variables[${key}]} == "" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: The required setting '${c_notice}version_micro${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}"
return 1
fi
- if [[ $path_data == "" || ! -d $path_data ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${path_data} == "" || ! -d ${path_data} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: The data directory ${c_notice}${path_data}${c_error} is not a valid directory.${c_reset}"
return 1
fi
- if [[ $path_sources == "" || ! -d $path_sources ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${path_sources} == "" || ! -d ${path_sources} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: The sources directory ${c_notice}${path_sources}${c_error} is not a valid directory.${c_reset}"
return 1
fi
- if [[ $path_work != "" && ! -d $path_work ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${path_work} != "" && ! -d ${path_work} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: The work directory ${c_notice}${path_work}${c_error} is not a valid directory.${c_reset}"
fi
bootstrap_id "build_name"
- project_label="${variables[$key]}"
+ project_label="${variables[${key}]}"
bootstrap_id "version_major"
- if [[ "${variables[$key]}" != "" ]] ; then
- project_label="${project_label}-${variables[$key]}"
+ if [[ "${variables[${key}]}" != "" ]] ; then
+ project_label="${project_label}-${variables[${key}]}"
bootstrap_id "version_minor"
- if [[ "${variables[$key]}" != "" ]] ; then
- project_label="${project_label}.${variables[$key]}"
+ if [[ "${variables[${key}]}" != "" ]] ; then
+ project_label="${project_label}.${variables[${key}]}"
bootstrap_id "version_micro"
- if [[ "${variables[$key]}" != "" ]] ; then
- project_label="${project_label}.${variables[$key]}"
+ if [[ "${variables[${key}]}" != "" ]] ; then
+ project_label="${project_label}.${variables[${key}]}"
fi
fi
fi
- if [[ $operation_failure == "fail-multiple" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${operation_failure} == "fail-multiple" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: Only one operation may be specified at a time.${c_reset}"
bootstrap_cleanup
return 1
- elif [[ $operation == "build" ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ elif [[ ${operation} == "build" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
bootstrap_print_first
- echo -e "${c_highlight}Building:${c_reset} ${c_notice}${project_label}${c_highlight}.${c_reset}"
+ echo -e "${c_highlight}Building:${c_reset} ${c_notice}${project_label}${c_highlight} with modes: ${c_notice}${modes}${c_highlight}.${c_reset}"
fi
if [[ ! -f ${project_built}.prepared ]] ; then
bootstrap_prepare_build
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
bootstrap_cleanup
return 1
bootstrap_operation_build
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
bootstrap_cleanup
return 1
fi
- elif [[ $operation == "clean" ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ elif [[ ${operation} == "clean" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
bootstrap_print_first
echo -e "${c_highlight}Cleaning Project:${c_reset} ${c_notice}${project_label}${c_highlight}.${c_reset}"
fi
bootstrap_operation_clean
- elif [[ $operation == "" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ elif [[ ${operation} == "" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: No operation was given.${c_reset}"
return 1
else
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: The operation ${c_notice}${operation}${c_error} was not recognized.${c_reset}"
return 1
fi
- if [[ $verbosity != "quiet" ]] ; then
- if [[ $failure != "" || $verbosity != "error" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
+ if [[ ${failure} != "" || ${verbosity} != "error" ]] ; then
bootstrap_print_last
fi
fi
bootstrap_handle_colors() {
- if [[ $do_color == "light" ]] ; then
+ if [[ ${do_color} == "light" ]] ; then
c_error="\\033[1;31m"
c_warning="\\033[0;31m"
c_title="\\033[1;34m"
c_highlight="\\033[0;34m"
c_notice="\\033[0;01m"
c_important="\\033[0;35m"
- elif [[ $do_color == "none" ]] ; then
+ elif [[ ${do_color} == "none" ]] ; then
c_reset=
c_title=
c_error=
bootstrap_id() {
- case $1 in
+ case ${1} in
"build_compiler") let key=0;;
"build_indexer") let key=1;;
"build_indexer_arguments") let key=2;;
local value=
if [[ ! -d ${path_data}build/ ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: No build settings directory '${c_notice}${path_data}build/${c_error}' could not be found or is not a valid directory.${c_reset}"
fi
let failure=1
- elif [[ ! -f $settings_file ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ elif [[ ! -f ${settings_file} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: No settings file ${c_notice}${settings_file}${c_error} could not be found or is not a valid file.${c_reset}"
let failure=1
fi
- if [[ $failure != "" ]] ; then
+ if [[ ${failure} != "" ]] ; then
return 1
fi
# Get available modes.
- if [[ $modes_available == "" ]] ; then
- modes_available=$(grep -s -o "^[[:space:]]*modes[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*modes\>||" -e 's|^[[:space:]]*||')
+ if [[ ${modes_available} == "" ]] ; then
+ modes_available=$(grep -s -o "^[[:space:]]*modes[[:space:]].*\$" ${settings_file} | sed -e "s|^[[:space:]]*modes\>||" -e 's|^[[:space:]]*||')
fi
# Get default modes.
- modes_default=$(grep -s -o "^[[:space:]]*modes_default[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*modes_default\>||" -e 's|^[[:space:]]*||')
+ modes_default=$(grep -s -o "^[[:space:]]*modes_default[[:space:]].*\$" ${settings_file} | sed -e "s|^[[:space:]]*modes_default\>||" -e 's|^[[:space:]]*||')
# Use default modes if no mode is explicitly provided.
- if [[ $modes == "" ]] ; then
- modes=$modes_default
+ if [[ ${modes} == "" ]] ; then
+ modes=${modes_default}
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_object preserve_path_headers process_post process_pre search_exclusive search_shared search_static 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
- bootstrap_id "$i"
+ bootstrap_id "${i}"
- if [[ $key == "" ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${key} == "" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
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
- variables[$key]="no"
+ if [[ ${key} != "" ]] ; then
+ variables[${key}]="no"
fi
else
- if [[ $(grep -s -o "^[[:space:]]*${i}[[:space:]].*\$" $settings_file) != "" ]] ; then
- value=$(grep -s -o "^[[:space:]]*${i}[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*${i}\>||" -e 's|^[[:space:]]*||')
- variables[$key]="$value"
+ if [[ $(grep -s -o "^[[:space:]]*${i}[[:space:]].*\$" ${settings_file}) != "" ]] ; then
+ value=$(grep -s -o "^[[:space:]]*${i}[[:space:]].*\$" ${settings_file} | sed -e "s|^[[:space:]]*${i}\>||" -e 's|^[[:space:]]*||')
+ variables[${key}]="${value}"
key=
bootstrap_id "has-${i}"
- if [[ $key != "" ]] ; then
- variables[$key]="yes"
+ if [[ ${key} != "" ]] ; then
+ variables[${key}]="yes"
fi
- elif [[ $(grep -s -o "^[[:space:]]*${i}\$" $settings_file) != "" ]] ; then
- variables[$key]=""
+ elif [[ $(grep -s -o "^[[:space:]]*${i}\$" ${settings_file}) != "" ]] ; then
+ variables[${key}]=""
key=
bootstrap_id "has-${i}"
- if [[ $key != "" ]] ; then
- variables[$key]="yes"
+ if [[ ${key} != "" ]] ; then
+ variables[${key}]="yes"
fi
else
key=
bootstrap_id "has-${i}"
- if [[ $key != "" ]] ; then
- variables[$key]="no"
+ if [[ ${key} != "" ]] ; then
+ variables[${key}]="no"
fi
fi
fi
# Multi value Objects.
for i in build_indexer_arguments build_libraries build_libraries_shared build_libraries_static build_objects_library build_objects_library_shared build_objects_library_static build_objects_program build_objects_program_shared build_objects_program_static 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_program build_sources_program_shared build_sources_program_static build_sources_script build_sources_setting 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 ; do
- bootstrap_id "$i"
+ bootstrap_id "${i}"
- if [[ $key == "" ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${key} == "" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
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
- variables[$key]="no"
+ if [[ ${key} != "" ]] ; then
+ variables[${key}]="no"
fi
else
- if [[ $(grep -s -o "^[[:space:]]*${i}[[:space:]].*\$" $settings_file) != "" ]] ; then
- value=$(grep -s -o "^[[:space:]]*${i}[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*${i}\>||" -e 's|^[[:space:]]*||')
- variables[$key]="$value"
+ if [[ $(grep -s -o "^[[:space:]]*${i}[[:space:]].*\$" ${settings_file}) != "" ]] ; then
+ value=$(grep -s -o "^[[: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
- variables[$key]="yes"
+ if [[ ${key} != "" ]] ; then
+ variables[${key}]="yes"
fi
- elif [[ $(grep -s -o "^[[:space:]]*${i}\$" $settings_file) != "" ]] ; then
- variables[$key]=""
+ elif [[ $(grep -s -o "^[[:space:]]*${i}\$" ${settings_file}) != "" ]] ; then
+ variables[${key}]=""
key=
bootstrap_id "has-${i}"
- if [[ $key != "" ]] ; then
- variables[$key]="yes"
+ if [[ ${key} != "" ]] ; then
+ variables[${key}]="yes"
fi
else
key=
bootstrap_id "has-${i}"
- if [[ $key != "" ]] ; then
- variables[$key]="no"
+ if [[ ${key} != "" ]] ; then
+ variables[${key}]="no"
fi
fi
fi
local m=
local value=
- for m in $modes ; do
+ for m in ${modes} ; do
# 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_object preserve_path_headers process_post process_pre search_exclusive search_shared search_static 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
bootstrap_id "${i}-mode"
- if [[ $key == "" ]] ; 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}"
+ if [[ ${key} == "" ]] ; 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} != "" ]] ; then
+ variables[${key}]="no"
fi
else
- if [[ $(grep -s -o "^[[:space:]]*${i}-${m}[[:space:]].*\$" $settings_file) != "" ]] ; then
- value=$(grep -s -o "^[[: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"
+
+ if [[ $(grep -s -o "^[[:space:]]*${i}-${m}[[:space:]].*\$" ${settings_file}) != "" ]] ; then
+ value=$(grep -s -o "^[[: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
- variables[$key]="yes"
+ if [[ ${key} != "" ]] ; then
+ variables[${key}]="yes"
fi
- elif [[ $(grep -s -o "^[[:space:]]*${i}-${m}\$" $settings_file) != "" ]] ; then
- variables[$key]=""
+ elif [[ $(grep -s -o "^[[:space:]]*${i}-${m}\$" ${settings_file}) != "" ]] ; then
+ variables[${key}]=""
key=
bootstrap_id "has-${i}-mode"
- if [[ $key != "" ]] ; then
- variables[$key]="yes"
+ if [[ ${key} != "" ]] ; then
+ variables[${key}]="yes"
fi
else
key=
bootstrap_id "has-${i}-mode"
- if [[ $key != "" ]] ; then
- variables[$key]="no"
+ if [[ ${key} != "" ]] ; then
+ variables[${key}]="no"
fi
fi
fi
bootstrap_id "${i}-mode"
- if [[ $key == "" ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${key} == "" ]] ; 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} != "" ]] ; then
+ variables[${key}]="no"
fi
else
- if [[ $(grep -s -o "^[[:space:]]*${i}-${m}[[:space:]].*\$" $settings_file) != "" ]] ; then
- value=$(grep -s -o "^[[:space:]]*${i}-${m}[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*${i}-${m}\>||" -e 's|^[[:space:]]*||')
- variables[$key]="$value"
+ if [[ $(grep -s -o "^[[:space:]]*${i}-${m}[[:space:]].*\$" ${settings_file}) != "" ]] ; then
+ value=$(grep -s -o "^[[: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
- variables[$key]="yes"
+ if [[ ${key} != "" ]] ; then
+ variables[${key}]="yes"
fi
- elif [[ $(grep -s -o "^[[:space:]]*${i}-${m}\$" $settings_file) != "" ]] ; then
- variables[$key]=""
+ elif [[ $(grep -s -o "^[[:space:]]*${i}-${m}\$" ${settings_file}) != "" ]] ; then
+ variables[${key}]=""
key=
bootstrap_id "has-${i}"
- if [[ $key != "" ]] ; then
- variables[$key]="yes"
+ if [[ ${key} != "" ]] ; then
+ variables[${key}]="yes"
fi
else
key=
bootstrap_id "has-${i}-mode"
- if [[ $key != "" ]] ; then
- variables[$key]="no"
+ if [[ ${key} != "" && ${variables[${key}]} != "yes" ]] ; then
+ variables[${key}]="no"
fi
fi
fi
}
bootstrap_prepare_build() {
- local alt=$1
+ local alt=${1}
local i=
- mkdir $verbose_common -p ${path_build}{documents,includes,libraries/{script,shared,static},objects/{script,shared,static},programs/{script,shared,static},settings,stage} || failure=1
+ mkdir ${verbose_common} -p ${path_build}{documents,includes,libraries/{script,shared,static},objects/{script,shared,static},programs/{script,shared,static},settings,stage} || failure=1
- if [[ $failure != "" ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${failure} != "" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
echo -e "${c_warning}WARNING: Failed to create build directories in '${c_notice}${path_build}${c_error}'.${c_reset}"
fi
fi
bootstrap_id "path_headers-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- mkdir $verbose_common -p ${path_build}includes/${variables[$key]} || failure=1
+ if [[ ${variables[${key}]} != "" ]] ; then
+ mkdir ${verbose_common} -p ${path_build}includes/${variables[${key}]} || failure=1
else
bootstrap_id "path_headers"
- if [[ ${variables[$key]} != "" ]] ; then
- mkdir $verbose_common -p ${path_build}includes/${variables[$key]} || failure=1
+ if [[ ${variables[${key}]} != "" ]] ; then
+ mkdir ${verbose_common} -p ${path_build}includes/${variables[${key}]} || failure=1
fi
fi
- if [[ $failure != "" ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${failure} != "" ]] ; 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}"
fi
touch ${project_built}-${settings_name}.prepared
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
return 0
fi
local n=
local version_file=
local version_target=
- local alt=$1
+ local alt=${1}
local directory=
local key=
bootstrap_id "build_compiler"
- local build_compiler=${variables[$key]}
+ local build_compiler=${variables[${key}]}
bootstrap_id "build_indexer"
- local build_indexer=${variables[$key]}
+ local build_indexer=${variables[${key}]}
bootstrap_id "build_indexer_arguments"
- local build_indexer_arguments=${variables[$key]}
+ local build_indexer_arguments=${variables[${key}]}
bootstrap_id "build_name"
- local build_name=${variables[$key]}
+ local build_name=${variables[${key}]}
bootstrap_id "build_shared"
- local build_shared=${variables[$key]}
+ local build_shared=${variables[${key}]}
bootstrap_id "build_static"
- local build_static=${variables[$key]}
+ local build_static=${variables[${key}]}
bootstrap_id "defines"
- local defines=${variables[$key]}
+ local defines=${variables[${key}]}
bootstrap_id "defines_library"
- local defines_library=${variables[$key]}
+ local defines_library=${variables[${key}]}
bootstrap_id "defines_library_shared"
- local defines_library_shared=${variables[$key]}
+ local defines_library_shared=${variables[${key}]}
bootstrap_id "defines_library_static"
- local defines_library_static=${variables[$key]}
+ local defines_library_static=${variables[${key}]}
bootstrap_id "defines_object"
- local defines_object=${variables[$key]}
+ local defines_object=${variables[${key}]}
bootstrap_id "defines_object_shared"
- local defines_object_shared=${variables[$key]}
+ local defines_object_shared=${variables[${key}]}
bootstrap_id "defines_object_static"
- local defines_object_static=${variables[$key]}
+ local defines_object_static=${variables[${key}]}
bootstrap_id "defines_program"
- local defines_program=${variables[$key]}
+ local defines_program=${variables[${key}]}
bootstrap_id "defines_program_shared"
- local defines_program_shared=${variables[$key]}
+ local defines_program_shared=${variables[${key}]}
bootstrap_id "defines_program_static"
- local defines_program_static=${variables[$key]}
+ local defines_program_static=${variables[${key}]}
bootstrap_id "defines_shared"
- local defines_shared=${variables[$key]}
+ local defines_shared=${variables[${key}]}
bootstrap_id "defines_static"
- local defines_static=${variables[$key]}
+ local defines_static=${variables[${key}]}
bootstrap_id "flags"
- local flags=${variables[$key]}
+ local flags=${variables[${key}]}
bootstrap_id "flags_library"
- local flags_library=${variables[$key]}
+ local flags_library=${variables[${key}]}
bootstrap_id "flags_library_shared"
- local flags_library_shared=${variables[$key]}
+ local flags_library_shared=${variables[${key}]}
bootstrap_id "flags_library_static"
- local flags_library_static=${variables[$key]}
+ local flags_library_static=${variables[${key}]}
bootstrap_id "flags_object"
- local flags_object=${variables[$key]}
+ local flags_object=${variables[${key}]}
bootstrap_id "flags_object_shared"
- local flags_object_shared=${variables[$key]}
+ local flags_object_shared=${variables[${key}]}
bootstrap_id "flags_object_static"
- local flags_object_static=${variables[$key]}
+ local flags_object_static=${variables[${key}]}
bootstrap_id "flags_program"
- local flags_program=${variables[$key]}
+ local flags_program=${variables[${key}]}
bootstrap_id "flags_program_shared"
- local flags_program_shared=${variables[$key]}
+ local flags_program_shared=${variables[${key}]}
bootstrap_id "flags_program_static"
- local flags_program_static=${variables[$key]}
+ local flags_program_static=${variables[${key}]}
bootstrap_id "flags_shared"
- local flags_shared=${variables[$key]}
+ local flags_shared=${variables[${key}]}
bootstrap_id "flags_static"
- local flags_static=${variables[$key]}
+ local flags_static=${variables[${key}]}
bootstrap_id "build_libraries"
- local libraries=${variables[$key]}
+ local libraries=${variables[${key}]}
bootstrap_id "build_libraries_shared"
- local libraries_shared=${variables[$key]}
+ local libraries_shared=${variables[${key}]}
bootstrap_id "build_libraries_static"
- local libraries_static=${variables[$key]}
+ local libraries_static=${variables[${key}]}
bootstrap_id "build_objects_library"
- local objects_library=${variables[$key]}
+ local objects_library=${variables[${key}]}
bootstrap_id "build_objects_library_shared"
- local objects_library_shared=${variables[$key]}
+ local objects_library_shared=${variables[${key}]}
bootstrap_id "build_objects_library_static"
- local objects_library_static=${variables[$key]}
+ local objects_library_static=${variables[${key}]}
bootstrap_id "build_objects_program"
- local objects_program=${variables[$key]}
+ local objects_program=${variables[${key}]}
bootstrap_id "build_objects_program_shared"
- local objects_program_shared=${variables[$key]}
+ local objects_program_shared=${variables[${key}]}
bootstrap_id "build_objects_program_static"
- local objects_program_static=${variables[$key]}
+ local objects_program_static=${variables[${key}]}
bootstrap_id "path_headers"
- local path_headers=${variables[$key]}
+ local path_headers=${variables[${key}]}
bootstrap_id "preserve_path_headers"
- local preserve_path_headers=${variables[$key]}
+ local preserve_path_headers=${variables[${key}]}
bootstrap_id "path_library_script"
- local path_library_script=${variables[$key]}
+ local path_library_script=${variables[${key}]}
bootstrap_id "path_library_shared"
- local path_library_shared=${variables[$key]}
+ local path_library_shared=${variables[${key}]}
bootstrap_id "path_library_static"
- local path_library_static=${variables[$key]}
+ local path_library_static=${variables[${key}]}
bootstrap_id "path_object_script"
- local path_object_script=${variables[$key]}
+ local path_object_script=${variables[${key}]}
bootstrap_id "path_object_shared"
- local path_object_shared=${variables[$key]}
+ local path_object_shared=${variables[${key}]}
bootstrap_id "path_object_static"
- local path_object_static=${variables[$key]}
+ local path_object_static=${variables[${key}]}
bootstrap_id "path_program_script"
- local path_program_script=${variables[$key]}
+ local path_program_script=${variables[${key}]}
bootstrap_id "path_program_shared"
- local path_program_shared=${variables[$key]}
+ local path_program_shared=${variables[${key}]}
bootstrap_id "path_program_static"
- local path_program_static=${variables[$key]}
+ local path_program_static=${variables[${key}]}
bootstrap_id "has_path_standard"
- local has_path_standard=${variables[$key]}
+ local has_path_standard=${variables[${key}]}
bootstrap_id "search_exclusive"
- local search_exclusive=${variables[$key]}
+ local search_exclusive=${variables[${key}]}
bootstrap_id "search_shared"
- local search_shared=${variables[$key]}
+ local search_shared=${variables[${key}]}
bootstrap_id "search_static"
- local search_static=${variables[$key]}
+ local search_static=${variables[${key}]}
bootstrap_id "build_sources_documentation"
- local sources_documentation=${variables[$key]}
+ local sources_documentation=${variables[${key}]}
bootstrap_id "build_sources_headers"
- local sources_headers=${variables[$key]}
+ local sources_headers=${variables[${key}]}
bootstrap_id "build_sources_library"
- local sources_library=${variables[$key]}
+ local sources_library=${variables[${key}]}
bootstrap_id "build_sources_library_shared"
- local sources_library_shared=${variables[$key]}
+ local sources_library_shared=${variables[${key}]}
bootstrap_id "build_sources_library_static"
- local sources_library_static=${variables[$key]}
+ local sources_library_static=${variables[${key}]}
bootstrap_id "build_sources_object"
- local sources_object=${variables[$key]}
+ local sources_object=${variables[${key}]}
bootstrap_id "build_sources_object_shared"
- local sources_object_shared=${variables[$key]}
+ local sources_object_shared=${variables[${key}]}
bootstrap_id "build_sources_object_static"
- local sources_object_static=${variables[$key]}
+ local sources_object_static=${variables[${key}]}
bootstrap_id "build_sources_program"
- local sources_program=${variables[$key]}
+ local sources_program=${variables[${key}]}
bootstrap_id "build_sources_program_shared"
- local sources_program_shared=${variables[$key]}
+ local sources_program_shared=${variables[${key}]}
bootstrap_id "build_sources_program_static"
- local sources_program_static=${variables[$key]}
+ local sources_program_static=${variables[${key}]}
bootstrap_id "build_sources_script"
- local sources_script=${variables[$key]}
+ local sources_script=${variables[${key}]}
bootstrap_id "build_sources_setting"
- local sources_setting=${variables[$key]}
+ local sources_setting=${variables[${key}]}
bootstrap_id "version_file"
- local version_file_value=${variables[$key]}
+ local version_file_value=${variables[${key}]}
bootstrap_id "version_major"
- local version_major=${variables[$key]}
+ local version_major=${variables[${key}]}
bootstrap_id "version_major_prefix"
- local version_major_prefix=${variables[$key]}
+ local version_major_prefix=${variables[${key}]}
bootstrap_id "version_minor"
- local version_minor=${variables[$key]}
+ local version_minor=${variables[${key}]}
bootstrap_id "version_minor_prefix"
- local version_minor_prefix=${variables[$key]}
+ local version_minor_prefix=${variables[${key}]}
bootstrap_id "version_micro"
- local version_micro=${variables[$key]}
+ local version_micro=${variables[${key}]}
bootstrap_id "version_micro_prefix"
- local version_micro_prefix=${variables[$key]}
+ local version_micro_prefix=${variables[${key}]}
bootstrap_id "version_nano"
- local version_nano=${variables[$key]}
+ local version_nano=${variables[${key}]}
bootstrap_id "version_nano_prefix"
- local version_nano_prefix=${variables[$key]}
+ local version_nano_prefix=${variables[${key}]}
bootstrap_id "version_target"
- local version_target_value=${variables[$key]}
+ local version_target_value=${variables[${key}]}
local links=
local sources=
bootstrap_operation_build_prepare_remaining
- if [[ $build_shared == "yes" && -f ${project_built_shared}.built || $build_static == "yes" && -f ${project_built_static}.built ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${build_shared} == "yes" && -f ${project_built_shared}.built || ${build_static} == "yes" && -f ${project_built_static}.built ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
echo -e "${c_warning}WARNING: This project has already been built.${c_reset}"
fi
local arguments_shared="-L${path_build}libraries/${path_library_shared}"
local arguments_static="-L${path_build}libraries/${path_library_static}"
- if [[ $path_work != "" ]] ; then
- arguments_include="$arguments_include -I${path_work}includes/"
- arguments_shared="$arguments_shared -L${path_work}libraries/${path_library_shared}"
- arguments_static="$arguments_static -L${path_work}libraries/${path_library_static}"
+ if [[ ${path_work} != "" ]] ; then
+ arguments_include="${arguments_include} -I${path_work}includes/"
+ arguments_shared="${arguments_shared} -L${path_work}libraries/${path_library_shared}"
+ arguments_static="${arguments_static} -L${path_work}libraries/${path_library_static}"
fi
bootstrap_operation_build_validate_paths
bootstrap_operation_build_validate_build
- if [[ $failure != "" ]] ; then
+ if [[ ${failure} != "" ]] ; then
return 1
fi
- if [[ $sources_documentation != "" ]] ; then
- for i in $sources_documentation ; do
- directory=$(dirname $i)
+ if [[ ${sources_documentation} != "" ]] ; then
+ for i in ${sources_documentation} ; do
+ directory=$(dirname ${i})
- if [[ $directory == "." ]] ; then
- cp $verbose_common -R ${path_documentation}${i} ${path_build}documentation/ || failure=1
+ if [[ ${directory} == "." ]] ; then
+ cp ${verbose_common} -R ${path_documentation}${i} ${path_build}documentation/ || failure=1
else
- mkdir $verbose_common -p ${path_build}documentation/${directory} || failure=1
+ mkdir ${verbose_common} -p ${path_build}documentation/${directory} || failure=1
- if [[ $failure == "" ]] ; then
- cp $verbose_common -R ${path_documentation}${i} ${path_build}documentation/${directory}/ || failure=1
+ if [[ ${failure} == "" ]] ; then
+ cp ${verbose_common} -R ${path_documentation}${i} ${path_build}documentation/${directory}/ || failure=1
fi
fi
done
fi
- if [[ $sources_setting != "" ]] ; then
- for i in $sources_setting ; do
- directory=$(dirname $i)
+ if [[ ${sources_setting} != "" ]] ; then
+ for i in ${sources_setting} ; do
+ directory=$(dirname ${i})
- if [[ $directory == "." ]] ; then
- cp $verbose_common -R ${path_settings}${i} ${path_build}settings/ || failure=1
+ if [[ ${directory} == "." ]] ; then
+ cp ${verbose_common} -R ${path_settings}${i} ${path_build}settings/ || failure=1
else
- mkdir $verbose_common -p ${path_build}settings/${directory} || failure=1
+ mkdir ${verbose_common} -p ${path_build}settings/${directory} || failure=1
- if [[ $failure == "" ]] ; then
- cp $verbose_common -R ${path_settings}${i} ${path_build}settings/${directory}/ || failure=1
+ if [[ ${failure} == "" ]] ; then
+ cp ${verbose_common} -R ${path_settings}${i} ${path_build}settings/${directory}/ || failure=1
fi
fi
done
fi
- if [[ $failure == "" && $sources_headers != "" ]] ; then
- if [[ $preserve_path_headers == "yes" ]] ; then
- for i in $sources_headers ; do
- directory=$(dirname $i)
+ if [[ ${failure} == "" && ${sources_headers} != "" ]] ; then
+ if [[ ${preserve_path_headers} == "yes" ]] ; then
+ for i in ${sources_headers} ; do
+ directory=$(dirname ${i})
- if [[ $directory == "." ]] ; then
- cp $verbose_common -f ${path_sources}${path_language}${i} ${path_build}includes/${path_headers} || failure=1
+ if [[ ${directory} == "." ]] ; then
+ cp ${verbose_common} -f ${path_sources}${path_language}${i} ${path_build}includes/${path_headers} || failure=1
else
if [[ ! -d ${path_build}includes/${path_headers}${directory} ]] ; then
- mkdir $verbose_common -p ${path_build}includes/${path_headers}${directory} || failure=1
+ mkdir ${verbose_common} -p ${path_build}includes/${path_headers}${directory} || failure=1
fi
- if [[ $failure == "" ]] ; then
- cp $verbose_common -f ${path_sources}${path_language}${i} ${path_build}includes/${path_headers}${i} || failure=1
+ if [[ ${failure} == "" ]] ; then
+ cp ${verbose_common} -f ${path_sources}${path_language}${i} ${path_build}includes/${path_headers}${i} || failure=1
fi
fi
done
else
- for i in $sources_headers ; do
- cp $verbose_common -f ${path_sources}${path_language}${i} ${path_build}includes/${path_headers} || failure=1
+ for i in ${sources_headers} ; do
+ cp ${verbose_common} -f ${path_sources}${path_language}${i} ${path_build}includes/${path_headers} || failure=1
done
fi
fi
- if [[ $failure == "" && $build_shared == "yes" && ! -f ${project_built_shared}.built ]] ; then
- if [[ $sources_object != "" || $sources_object_shared != "" ]] ; then
+ if [[ ${failure} == "" && ${build_shared} == "yes" && ! -f ${project_built_shared}.built ]] ; then
+ if [[ ${sources_object} != "" || ${sources_object_shared} != "" ]] ; then
sources=
let count=0
# Sources object only allows for a single value.
- if [[ $sources_object_shared != "" ]] ; then
- for i in $sources_object_shared ; do
+ if [[ ${sources_object_shared} != "" ]] ; then
+ for i in ${sources_object_shared} ; do
let count++
done
- if [[ $count -gt 1 ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${count} -gt 1 ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object_shared${c_warning}' found, only using the first one found is going to be used.${c_reset}"
fi
fi
- for i in $sources_object_shared ; do
+ for i in ${sources_object_shared} ; do
sources="${path_sources_object}${path_language}${i} "
break
done
else
- for i in $sources_object ; do
+ for i in ${sources_object} ; do
let count++
done
- if [[ $count -gt 1 ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${count} -gt 1 ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object${c_warning}' found, only using the first one found is going to be used.${c_reset}"
fi
fi
- for i in $sources_object ; do
+ for i in ${sources_object} ; do
sources="${path_sources_object}${path_language}${i} "
break
done
fi
- if [[ $verbosity == "verbose" ]] ; then
- echo $build_compiler $sources -c -o ${path_build}objects/${path_object_shared}${build_name}.o $arguments_shared $arguments_include $libraries $libraries_shared $flags $flags_shared $flags_object $flags_object_shared $defines $defines_shared $defines_object $defines_object_shared $define_extra
+ if [[ ${verbosity} == "verbose" ]] ; then
+ echo ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_shared}${build_name}.o ${arguments_shared} ${arguments_include} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_object} ${flags_object_shared} ${defines} ${defines_shared} ${defines_object} ${defines_object_shared} ${define_extra}
fi
- $build_compiler $sources -c -o ${path_build}objects/${path_object_shared}${build_name}.o $arguments_shared $arguments_include $libraries $libraries_shared $flags $flags_shared $flags_object $flags_object_shared $defines $defines_shared $defines_object $defines_object_shared $define_extra || failure=1
+ ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_shared}${build_name}.o ${arguments_shared} ${arguments_include} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_object} ${flags_object_shared} ${defines} ${defines_shared} ${defines_object} ${defines_object_shared} ${define_extra} || failure=1
fi
- if [[ $sources_library != "" || $sources_library_shared != "" ]] ; then
+ if [[ ${sources_library} != "" || ${sources_library_shared} != "" ]] ; then
sources=
- if [[ $objects_library != "" || $objects_library_shared != "" ]] ; then
- for i in $objects_library $objects_library_shared ; do
+ if [[ ${objects_library} != "" || ${objects_library_shared} != "" ]] ; then
+ for i in ${objects_library} ${objects_library_shared} ; do
sources="${sources}${path_build}objects/${path_object_shared}${i} "
done
fi
- for i in $sources_library $sources_library_shared ; do
+ for i in ${sources_library} ${sources_library_shared} ; do
sources="${sources}${path_sources}${path_language}${i} "
done
- if [[ $verbosity == "verbose" ]] ; then
- echo $build_compiler $sources -shared -Wl,-soname,lib${build_name}.so${version_target} -o ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_file} $arguments_shared $arguments_include $libraries $libraries_shared $flags $flags_shared $flags_library $flags_library_shared $defines $defines_shared $defines_library $defines_library_shared $define_extra
+ if [[ ${verbosity} == "verbose" ]] ; then
+ echo ${build_compiler} ${sources} -shared -Wl,-soname,lib${build_name}.so${version_target} -o ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_file} ${arguments_shared} ${arguments_include} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_library} ${flags_library_shared} ${defines} ${defines_shared} ${defines_library} ${defines_library_shared} ${define_extra}
fi
- $build_compiler $sources -shared -Wl,-soname,lib${build_name}.so${version_target} -o ${path_build}libraries/${path_library_shared}lib${build_name}.so$version_file $arguments_shared $arguments_include $libraries $libraries_shared $flags $flags_shared $flags_library $flags_library_shared $defines $defines_shared $defines_library $defines_library_shared $define_extra || failure=1
+ ${build_compiler} ${sources} -shared -Wl,-soname,lib${build_name}.so${version_target} -o ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_file} ${arguments_shared} ${arguments_include} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_library} ${flags_library_shared} ${defines} ${defines_shared} ${defines_library} ${defines_library_shared} ${define_extra} || failure=1
- if [[ $failure == "" ]] ; then
- if [[ $version_file_value != "major" ]] ; then
- if [[ $version_file_value == "minor" ]] ; then
- ln $verbose_common -sf lib${build_name}.so${version_file} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major} || failure=1
+ if [[ ${failure} == "" ]] ; then
+ if [[ ${version_file_value} != "major" ]] ; then
+ if [[ ${version_file_value} == "minor" ]] ; then
+ ln ${verbose_common} -sf lib${build_name}.so${version_file} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major} || failure=1
else
- ln $verbose_common -sf lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major} || failure=1
+ ln ${verbose_common} -sf lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major} || failure=1
- if [[ $failure == "" ]] ; then
- if [[ $version_file_value == "micro" ]] ; then
- ln $verbose_common -sf lib$build_name.so$version_file ${path_build}libraries/${path_library_shared}lib$build_name.so$version_major_prefix$version_major$version_minor_prefix$version_minor || failure=1
+ if [[ ${failure} == "" ]] ; then
+ if [[ ${version_file_value} == "micro" ]] ; then
+ ln ${verbose_common} -sf lib${build_name}.so${version_file} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor} || failure=1
else
- ln $verbose_common -sf lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor} || failure=1
+ ln ${verbose_common} -sf lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor} || failure=1
- if [[ $failure == "" ]] ; then
- ln $verbose_common -sf lib${build_name}.so${version_file} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro} || failure=1
+ if [[ ${failure} == "" ]] ; then
+ ln ${verbose_common} -sf lib${build_name}.so${version_file} ${path_build}libraries/${path_library_shared}lib${build_name}.so${version_major_prefix}${version_major}${version_minor_prefix}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro} || failure=1
fi
fi
fi
fi
fi
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
ln ${verbose_common} -sf lib${build_name}.so${version_major_prefix}${version_major} ${path_build}libraries/${path_library_shared}lib${build_name}.so || failure=1
fi
fi
fi
- if [[ $failure == "" && $sources_program != "" ]] ; then
+ if [[ ${failure} == "" && ${sources_program} != "" ]] ; then
sources=
links=
- if [[ $sources_library != "" || $sources_library_shared != "" ]] ; then
- links="-l$build_name "
+ if [[ ${sources_library} != "" || ${sources_library_shared} != "" ]] ; then
+ links="-l${build_name} "
fi
- if [[ $objects_program != "" || $objects_program_shared != "" ]] ; then
- for i in $objects_program $objects_program_shared ; do
+ if [[ ${objects_program} != "" || ${objects_program_shared} != "" ]] ; then
+ for i in ${objects_program} ${objects_program_shared} ; do
sources="${sources}${path_build}objects/${path_object_shared}${i} "
done
fi
- for i in $sources_program $sources_program_shared ; do
+ for i in ${sources_program} ${sources_program_shared} ; do
sources="${sources}${path_sources}${path_language}${i} "
done
- if [[ $verbosity == "verbose" ]] ; then
- echo $build_compiler $sources -o ${path_build}programs/${path_program_shared}${build_name} $arguments_shared $arguments_include $links $libraries $libraries_shared $flags $flags_shared $flags_program $flags_program_shared $defines $defines_shared $defines_program $defines_program_shared $define_extra
+ if [[ ${verbosity} == "verbose" ]] ; then
+ echo ${build_compiler} ${sources} -o ${path_build}programs/${path_program_shared}${build_name} ${arguments_shared} ${arguments_include} ${links} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_program} ${flags_program_shared} ${defines} ${defines_shared} ${defines_program} ${defines_program_shared} ${define_extra}
fi
- $build_compiler $sources -o ${path_build}programs/${path_program_shared}${build_name} $arguments_shared $arguments_include $links $libraries $libraries_shared $flags $flags_shared $flags_program $flags_program_shared $defines $defines_shared $defines_program $defines_program_shared $define_extra || failure=1
+ ${build_compiler} ${sources} -o ${path_build}programs/${path_program_shared}${build_name} ${arguments_shared} ${arguments_include} ${links} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_program} ${flags_program_shared} ${defines} ${defines_shared} ${defines_program} ${defines_program_shared} ${define_extra} || failure=1
fi
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
touch ${project_built_shared}-${settings_name}.built
fi
fi
- if [[ $failure == "" && $build_static == "yes" && ! -f ${project_built_static}.built ]] ; then
- if [[ $sources_object != "" || $sources_object_static != "" ]] ; then
+ if [[ ${failure} == "" && ${build_static} == "yes" && ! -f ${project_built_static}.built ]] ; then
+ if [[ ${sources_object} != "" || ${sources_object_static} != "" ]] ; then
let count=0
# Sources object only allows for a single value.
- if [[ $sources_object_static != "" ]] ; then
- for i in $sources_object_static ; do
+ if [[ ${sources_object_static} != "" ]] ; then
+ for i in ${sources_object_static} ; do
let count++
done
- if [[ $count -gt 1 ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${count} -gt 1 ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object_static${c_warning}' found, only using the first one found is going to be used.${c_reset}"
fi
fi
- for i in $sources_object_static ; do
+ for i in ${sources_object_static} ; do
sources="${path_sources_object}${path_language}${i} "
break
done
else
- for i in $sources_object ; do
+ for i in ${sources_object} ; do
let count++
done
- if [[ $count -gt 1 ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${count} -gt 1 ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object${c_warning}' found, only using the first one found is going to be used.${c_reset}"
fi
fi
- for i in $sources_object ; do
+ for i in ${sources_object} ; do
sources="${path_sources_object}${path_language}${i} "
break
done
fi
- if [[ $verbosity == "verbose" ]] ; then
- echo $build_compiler $sources -c -o ${path_build}objects/${path_object_static}${build_name}.o $arguments_static $arguments_include $libraries $libraries_static $flags $flags_static $flags_object $flags_object_static $defines $defines_static $defines_object $defines_object_static $define_extra
+ if [[ ${verbosity} == "verbose" ]] ; then
+ echo ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_static}${build_name}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_object} ${flags_object_static} ${defines} ${defines_static} ${defines_object} ${defines_object_static} ${define_extra}
fi
- $build_compiler $sources -c -o ${path_build}objects/${path_object_static}${build_name}.o $arguments_static $arguments_include $libraries $libraries_static $flags $flags_static $flags_object $flags_object_static $defines $defines_static $defines_object $defines_object_static $define_extra || failure=1
+ ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_static}${build_name}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_object} ${flags_object_static} ${defines} ${defines_static} ${defines_object} ${defines_object_static} ${define_extra} || failure=1
fi
- if [[ $sources_library != "" || $sources_library_static != "" ]] ; then
+ if [[ ${sources_library} != "" || ${sources_library_static} != "" ]] ; then
sources=
- if [[ $objects_library != "" || $objects_library_static != "" ]] ; then
- for i in $objects_library $objects_library_static ; do
+ if [[ ${objects_library} != "" || ${objects_library_static} != "" ]] ; then
+ for i in ${objects_library} ${objects_library_static} ; do
sources="${sources}${path_build}objects/${path_object_static}${i} "
done
fi
- for i in $sources_library $sources_library_static ; do
- directory=$(dirname $i)
- n=$(basename $i | sed -e 's|\.c$||')
+ for i in ${sources_library} ${sources_library_static} ; do
+ directory=$(dirname ${i})
+ n=$(basename ${i} | sed -e 's|\.c$||')
- if [[ $directory != "." && ! -d ${path_build}objects/${directory} ]] ; then
- mkdir $verbose_common -p ${path_build}objects/${directory}
+ if [[ ${directory} != "." && ! -d ${path_build}objects/${directory} ]] ; then
+ mkdir ${verbose_common} -p ${path_build}objects/${directory}
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
let failure=1
break;
fi
# These are objects created by the static build step rather than objects created by the object build step.
- sources="${sources}${path_build}objects/$directory/$n.o "
+ sources="${sources}${path_build}objects/${directory}/${n}.o "
- if [[ $verbosity == "verbose" ]] ; then
- echo $build_compiler ${path_sources}${path_language}${i} -c -static -o ${path_build}objects/${directory}/${n}.o $arguments_static $arguments_include $libraries $libraries_static $flags $flags_static $flags_library $flags_library_static $defines $defines_static $defines_library $defines_library_static $define_extra
+ if [[ ${verbosity} == "verbose" ]] ; then
+ echo ${build_compiler} ${path_sources}${path_language}${i} -c -static -o ${path_build}objects/${directory}/${n}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_library} ${flags_library_static} ${defines} ${defines_static} ${defines_library} ${defines_library_static} ${define_extra}
fi
- $build_compiler ${path_sources}${path_language}${i} -c -static -o ${path_build}objects/${directory}/${n}.o $arguments_static $arguments_include $libraries $libraries_static $flags $flags_static $flags_library $flags_library_static $defines $defines_static $defines_library $defines_library_static $define_extra || failure=1
+ ${build_compiler} ${path_sources}${path_language}${i} -c -static -o ${path_build}objects/${directory}/${n}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_library} ${flags_library_static} ${defines} ${defines_static} ${defines_library} ${defines_library_static} ${define_extra} || failure=1
- if [[ $failure != "" ]] ; then
+ if [[ ${failure} != "" ]] ; then
break;
fi
done
- if [[ $failure == "" && ( $sources_library != "" || $sources_library_static != "" ) ]] ; then
+ if [[ ${failure} == "" && ( ${sources_library} != "" || ${sources_library_static} != "" ) ]] ; then
- if [[ $verbosity == "verbose" ]] ; then
- echo $build_indexer $build_indexer_arguments ${path_build}libraries/${path_library_static}lib${build_name}.a $sources
+ if [[ ${verbosity} == "verbose" ]] ; then
+ echo ${build_indexer} ${build_indexer_arguments} ${path_build}libraries/${path_library_static}lib${build_name}.a ${sources}
fi
- $build_indexer $build_indexer_arguments ${path_build}libraries/${path_library_static}lib${build_name}.a $sources || failure=1
+ ${build_indexer} ${build_indexer_arguments} ${path_build}libraries/${path_library_static}lib${build_name}.a ${sources} || failure=1
fi
fi
- if [[ $failure == "" && $sources_program != "" ]] ; then
+ if [[ ${failure} == "" && ${sources_program} != "" ]] ; then
sources=
links=
- if [[ $sources_library != "" || $sources_library_static != "" ]] ; then
+ if [[ ${sources_library} != "" || ${sources_library_static} != "" ]] ; then
links="-l${build_name} "
fi
- if [[ $objects_program != "" || $objects_program_static != "" ]] ; then
- for i in $objects_program $objects_program_static ; do
+ if [[ ${objects_program} != "" || ${objects_program_static} != "" ]] ; then
+ for i in ${objects_program} ${objects_program_static} ; do
sources="${sources}${path_build}objects/${path_object_static}${i} "
done
fi
- for i in $sources_program $sources_program_static ; do
+ for i in ${sources_program} ${sources_program_static} ; do
sources="${sources}${path_sources}${path_language}${i} "
done
- if [[ $verbosity == "verbose" ]] ; then
- echo $build_compiler $sources -static -o ${path_build}programs/${path_program_static}${build_name} $arguments_static $arguments_include $links $libraries $libraries_static $flags $flags_static $flags_program $flags_program_static $defines $defines_static $defines_program $defines_program_static $define_extra
+ if [[ ${verbosity} == "verbose" ]] ; then
+ echo ${build_compiler} ${sources} -static -o ${path_build}programs/${path_program_static}${build_name} ${arguments_static} ${arguments_include} ${links} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_program} ${flags_program_static} ${defines} ${defines_static} ${defines_program} ${defines_program_static} ${define_extra}
fi
- $build_compiler $sources -static -o ${path_build}programs/${path_program_static}${build_name} $arguments_static $arguments_include $links $libraries $libraries_static $flags $flags_static $flags_program $flags_program_static $defines $defines_static $defines_program $defines_program_static $define_extra || failure=1
+ ${build_compiler} ${sources} -static -o ${path_build}programs/${path_program_static}${build_name} ${arguments_static} ${arguments_include} ${links} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_program} ${flags_program_static} ${defines} ${defines_static} ${defines_program} ${defines_program_static} ${define_extra} || failure=1
fi
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
touch ${project_built_static}-${settings_name}.built
fi
fi
- if [[ $failure != "" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${failure} != "" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: Failed to build.${c_reset}"
return 1
fi
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
return 0
fi
local key=
bootstrap_id "has-version_major_prefix-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-version_major_prefix"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
version_major_prefix="."
fi
fi
bootstrap_id "has-version_minor_prefix-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-version_minor_prefix"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
version_minor_prefix="."
fi
fi
bootstrap_id "has-version_micro_prefix-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-version_micro_prefix"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
version_micro_prefix="."
fi
fi
bootstrap_id "has-version_nano_prefix-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-version_nano_prefix"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
version_nano_prefix="."
fi
fi
bootstrap_id "has-build_compiler-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-build_compiler"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
build_compiler="gcc"
fi
fi
bootstrap_id "has-build_indexer-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-build_indexer"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
build_indexer="ar"
fi
fi
bootstrap_id "has-path_library_script-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-path_library_script"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
path_library_script="script/"
fi
fi
bootstrap_id "has-path_library_shared-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-path_library_shared"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
path_library_shared="shared/"
fi
fi
bootstrap_id "has-path_library_static-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-path_library_static"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
path_library_static="static/"
fi
fi
bootstrap_id "has-path_object_script-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-path_object_script"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
path_object_script="script/"
fi
fi
bootstrap_id "has-path_object_shared-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-path_object_shared"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
path_object_shared="shared/"
fi
fi
bootstrap_id "has-path_object_static-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-path_object_static"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
path_object_static="static/"
fi
fi
bootstrap_id "has-path_program_script-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-path_program_script"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
path_program_script="script/"
fi
fi
bootstrap_id "has-path_program_shared-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-path_program_shared"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
path_program_shared="shared/"
fi
fi
bootstrap_id "has-path_program_static-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-path_program_static"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
path_program_static="static/"
fi
fi
bootstrap_id "has-path_sources-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-path_sources"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
path_sources="sources/"
fi
fi
bootstrap_id "has-path_sources_object-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-path_sources_object"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
path_sources_object="sources/"
fi
fi
bootstrap_id "has-has_path_standard-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-has_path_standard"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
has_path_standard="yes"
fi
fi
bootstrap_id "has-search_shared-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-search_shared"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
search_shared="yes"
fi
fi
bootstrap_id "has-build_shared-mode"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
bootstrap_id "has-build_shared"
- if [[ ${variables[$key]} != "yes" ]] ; then
+ if [[ ${variables[${key}]} != "yes" ]] ; then
build_shared="yes"
fi
fi
local key=
bootstrap_id "defines-mode"
- if [[ $defines == "" ]] ; then
- defines=${variables[$key]}
+ if [[ ${defines} == "" ]] ; then
+ defines=${variables[${key}]}
else
- defines="$defines ${variables[$key]}"
+ defines="${defines} ${variables[${key}]}"
fi
bootstrap_id "defines_library-mode"
- if [[ $defines_library == "" ]] ; then
- defines_library=${variables[$key]}
+ if [[ ${defines_library} == "" ]] ; then
+ defines_library=${variables[${key}]}
else
- defines_library="$defines_library ${variables[$key]}"
+ defines_library="${defines_library} ${variables[${key}]}"
fi
bootstrap_id "defines_library_shared-mode"
- if [[ $defines_library_shared == "" ]] ; then
- defines_library_shared=${variables[$key]}
+ if [[ ${defines_library_shared} == "" ]] ; then
+ defines_library_shared=${variables[${key}]}
else
- defines_library_shared="$defines_library_shared ${variables[$key]}"
+ defines_library_shared="${defines_library_shared} ${variables[${key}]}"
fi
bootstrap_id "defines_library_static-mode"
- if [[ $defines_library_static == "" ]] ; then
- defines_library_static=${variables[$key]}
+ if [[ ${defines_library_static} == "" ]] ; then
+ defines_library_static=${variables[${key}]}
else
- defines_library_static="$defines_library_static ${variables[$key]}"
+ defines_library_static="${defines_library_static} ${variables[${key}]}"
fi
bootstrap_id "defines_object_library-mode"
- if [[ $defines_object_library == "" ]] ; then
- defines_object_library=${variables[$key]}
+ if [[ ${defines_object_library} == "" ]] ; then
+ defines_object_library=${variables[${key}]}
else
- defines_object_library="$defines_object_library ${variables[$key]}"
+ defines_object_library="${defines_object_library} ${variables[${key}]}"
fi
bootstrap_id "defines_object_library_shared-mode"
- if [[ $defines_object_library_shared == "" ]] ; then
- defines_object_library_shared=${variables[$key]}
+ if [[ ${defines_object_library_shared} == "" ]] ; then
+ defines_object_library_shared=${variables[${key}]}
else
- defines_object_library_shared="$defines_object_library_shared ${variables[$key]}"
+ defines_object_library_shared="${defines_object_library_shared} ${variables[${key}]}"
fi
bootstrap_id "defines_object_library_static-mode"
- if [[ $defines_object_library_static == "" ]] ; then
- defines_object_library_static=${variables[$key]}
+ if [[ ${defines_object_library_static} == "" ]] ; then
+ defines_object_library_static=${variables[${key}]}
else
- defines_object_library_static="$defines_object_library_static ${variables[$key]}"
+ defines_object_library_static="${defines_object_library_static} ${variables[${key}]}"
fi
bootstrap_id "defines_object_program-mode"
- if [[ $defines_object_program == "" ]] ; then
- defines_object_program=${variables[$key]}
+ if [[ ${defines_object_program} == "" ]] ; then
+ defines_object_program=${variables[${key}]}
else
- defines_object_program="$defines_object_program ${variables[$key]}"
+ defines_object_program="${defines_object_program} ${variables[${key}]}"
fi
bootstrap_id "defines_object_program_shared-mode"
- if [[ $defines_object_program_shared == "" ]] ; then
- defines_object_program_shared=${variables[$key]}
+ if [[ ${defines_object_program_shared} == "" ]] ; then
+ defines_object_program_shared=${variables[${key}]}
else
- defines_object_program_shared="$defines_object_program_shared ${variables[$key]}"
+ defines_object_program_shared="${defines_object_program_shared} ${variables[${key}]}"
fi
bootstrap_id "defines_object_program_static-mode"
- if [[ $defines_object_program_static == "" ]] ; then
- defines_object_program_static=${variables[$key]}
+ if [[ ${defines_object_program_static} == "" ]] ; then
+ defines_object_program_static=${variables[${key}]}
else
- defines_object_program_static="$defines_object_program_static ${variables[$key]}"
+ defines_object_program_static="${defines_object_program_static} ${variables[${key}]}"
fi
bootstrap_id "defines_program-mode"
- if [[ $defines_program == "" ]] ; then
- defines_program=${variables[$key]}
+ if [[ ${defines_program} == "" ]] ; then
+ defines_program=${variables[${key}]}
else
- defines_program="$defines_program ${variables[$key]}"
+ defines_program="${defines_program} ${variables[${key}]}"
fi
bootstrap_id "defines_program_shared-mode"
- if [[ $defines_program_shared == "" ]] ; then
- defines_program_shared=${variables[$key]}
+ if [[ ${defines_program_shared} == "" ]] ; then
+ defines_program_shared=${variables[${key}]}
else
- defines_program_shared="$defines_program_shared ${variables[$key]}"
+ defines_program_shared="${defines_program_shared} ${variables[${key}]}"
fi
bootstrap_id "defines_program_static-mode"
- if [[ $defines_program_static == "" ]] ; then
- defines_program_static=${variables[$key]}
+ if [[ ${defines_program_static} == "" ]] ; then
+ defines_program_static=${variables[${key}]}
else
- defines_program_static="$defines_program_static ${variables[$key]}"
+ defines_program_static="${defines_program_static} ${variables[${key}]}"
fi
bootstrap_id "defines_shared-mode"
- if [[ $defines_shared == "" ]] ; then
- defines_shared=${variables[$key]}
+ if [[ ${defines_shared} == "" ]] ; then
+ defines_shared=${variables[${key}]}
else
- defines_shared="$defines_shared ${variables[$key]}"
+ defines_shared="${defines_shared} ${variables[${key}]}"
fi
bootstrap_id "defines_static-mode"
- if [[ $defines_static == "" ]] ; then
- defines_static=${variables[$key]}
+ if [[ ${defines_static} == "" ]] ; then
+ defines_static=${variables[${key}]}
else
- defines_static="$defines_static ${variables[$key]}"
+ defines_static="${defines_static} ${variables[${key}]}"
fi
}
local key=
bootstrap_id "build_sources_documentation-mode"
- if [[ $sources_documentation == "" ]] ; then
- sources_documentation=${variables[$key]}
+ if [[ ${sources_documentation} == "" ]] ; then
+ sources_documentation=${variables[${key}]}
else
- sources_documentation="$sources_documentation ${variables[$key]}"
+ sources_documentation="${sources_documentation} ${variables[${key}]}"
fi
}
local key=
bootstrap_id "flags-mode"
- if [[ $flags == "" ]] ; then
- flags=${variables[$key]}
+ if [[ ${flags} == "" ]] ; then
+ flags=${variables[${key}]}
else
- flags="$flags ${variables[$key]}"
+ flags="${flags} ${variables[${key}]}"
fi
bootstrap_id "flags_library-mode"
- if [[ $flags_library == "" ]] ; then
- flags_library=${variables[$key]}
+ if [[ ${flags_library} == "" ]] ; then
+ flags_library=${variables[${key}]}
else
- flags_library="$flags_library ${variables[$key]}"
+ flags_library="${flags_library} ${variables[${key}]}"
fi
bootstrap_id "flags_library_shared-mode"
- if [[ $flags_library_shared == "" ]] ; then
- flags_library_shared=${variables[$key]}
+ if [[ ${flags_library_shared} == "" ]] ; then
+ flags_library_shared=${variables[${key}]}
else
- flags_library_shared="$flags_library_shared ${variables[$key]}"
+ flags_library_shared="${flags_library_shared} ${variables[${key}]}"
fi
bootstrap_id "flags_library_static-mode"
- if [[ $flags_library_static == "" ]] ; then
- flags_library_static=${variables[$key]}
+ if [[ ${flags_library_static} == "" ]] ; then
+ flags_library_static=${variables[${key}]}
else
- flags_library_static="$flags_library_static ${variables[$key]}"
+ flags_library_static="${flags_library_static} ${variables[${key}]}"
fi
bootstrap_id "flags_object_library-mode"
- if [[ $flags_object_library == "" ]] ; then
- flags_object_library=${variables[$key]}
+ if [[ ${flags_object_library} == "" ]] ; then
+ flags_object_library=${variables[${key}]}
else
- flags_object_library="$flags_object_library ${variables[$key]}"
+ flags_object_library="${flags_object_library} ${variables[${key}]}"
fi
bootstrap_id "flags_object_library_shared-mode"
- if [[ $flags_object_library_shared == "" ]] ; then
- flags_object_library_shared=${variables[$key]}
+ if [[ ${flags_object_library_shared} == "" ]] ; then
+ flags_object_library_shared=${variables[${key}]}
else
- flags_object_library_shared="$flags_object_library_shared ${variables[$key]}"
+ flags_object_library_shared="${flags_object_library_shared} ${variables[${key}]}"
fi
bootstrap_id "flags_object_library_static-mode"
- if [[ $flags_object_library_static == "" ]] ; then
- flags_object_library_static=${variables[$key]}
+ if [[ ${flags_object_library_static} == "" ]] ; then
+ flags_object_library_static=${variables[${key}]}
else
- flags_object_library_static="$flags_object_library_static ${variables[$key]}"
+ flags_object_library_static="${flags_object_library_static} ${variables[${key}]}"
fi
bootstrap_id "flags_object_program-mode"
- if [[ $flags_object_program == "" ]] ; then
- flags_object_program=${variables[$key]}
+ if [[ ${flags_object_program} == "" ]] ; then
+ flags_object_program=${variables[${key}]}
else
- flags_object_program="$flags_object_program ${variables[$key]}"
+ flags_object_program="${flags_object_program} ${variables[${key}]}"
fi
bootstrap_id "flags_object_program_shared-mode"
- if [[ $flags_object_program_shared == "" ]] ; then
- flags_object_program_shared=${variables[$key]}
+ if [[ ${flags_object_program_shared} == "" ]] ; then
+ flags_object_program_shared=${variables[${key}]}
else
- flags_object_program_shared="$flags_object_program_shared ${variables[$key]}"
+ flags_object_program_shared="${flags_object_program_shared} ${variables[${key}]}"
fi
bootstrap_id "flags_object_program_static-mode"
- if [[ $flags_object_program_static == "" ]] ; then
- flags_object_program_static=${variables[$key]}
+ if [[ ${flags_object_program_static} == "" ]] ; then
+ flags_object_program_static=${variables[${key}]}
else
- flags_object_program_static="$flags_object_program_static ${variables[$key]}"
+ flags_object_program_static="${flags_object_program_static} ${variables[${key}]}"
fi
bootstrap_id "flags_program-mode"
- if [[ $flags_program == "" ]] ; then
- flags_program=${variables[$key]}
+ if [[ ${flags_program} == "" ]] ; then
+ flags_program=${variables[${key}]}
else
- flags_program="$flags_program ${variables[$key]}"
+ flags_program="${flags_program} ${variables[${key}]}"
fi
bootstrap_id "flags_program_shared-mode"
- if [[ $flags_program_shared == "" ]] ; then
- flags_program_shared=${variables[$key]}
+ if [[ ${flags_program_shared} == "" ]] ; then
+ flags_program_shared=${variables[${key}]}
else
- flags_program_shared="$flags_program_shared ${variables[$key]}"
+ flags_program_shared="${flags_program_shared} ${variables[${key}]}"
fi
bootstrap_id "flags_program_static-mode"
- if [[ $flags_program_static == "" ]] ; then
- flags_program_static=${variables[$key]}
+ if [[ ${flags_program_static} == "" ]] ; then
+ flags_program_static=${variables[${key}]}
else
- flags_program_static="$flags_program_static ${variables[$key]}"
+ flags_program_static="${flags_program_static} ${variables[${key}]}"
fi
bootstrap_id "flags_shared-mode"
- if [[ $flags_shared == "" ]] ; then
- flags_shared=${variables[$key]}
+ if [[ ${flags_shared} == "" ]] ; then
+ flags_shared=${variables[${key}]}
else
- flags_shared="$flags_shared ${variables[$key]}"
+ flags_shared="${flags_shared} ${variables[${key}]}"
fi
bootstrap_id "flags_static-mode"
- if [[ $flags_static == "" ]] ; then
- flags_static=${variables[$key]}
+ if [[ ${flags_static} == "" ]] ; then
+ flags_static=${variables[${key}]}
else
- flags_static="$flags_static ${variables[$key]}"
+ flags_static="${flags_static} ${variables[${key}]}"
fi
}
local key=
bootstrap_id "build_sources_headers-mode"
- if [[ $sources_headers == "" ]] ; then
- sources_headers=${variables[$key]}
+ if [[ ${sources_headers} == "" ]] ; then
+ sources_headers=${variables[${key}]}
else
- sources_headers="$sources_headers ${variables[$key]}"
+ sources_headers="${sources_headers} ${variables[${key}]}"
fi
- if [[ $build_shared == "yes" ]] ; then
+ if [[ ${build_shared} == "yes" ]] ; then
bootstrap_id "build_sources_headers_shared"
- if [[ $sources_headers == "" ]] ; then
- sources_headers=${variables[$key]}
+ if [[ ${sources_headers} == "" ]] ; then
+ sources_headers=${variables[${key}]}
else
- sources_headers="$sources_headers ${variables[$key]}"
+ sources_headers="${sources_headers} ${variables[${key}]}"
fi
bootstrap_id "build_sources_headers_static"
- if [[ $sources_headers == "" ]] ; then
- sources_headers=${variables[$key]}
+ if [[ ${sources_headers} == "" ]] ; then
+ sources_headers=${variables[${key}]}
else
- sources_headers="$sources_headers ${variables[$key]}"
+ sources_headers="${sources_headers} ${variables[${key}]}"
fi
fi
- if [[ $build_static == "yes" ]] ; then
+ if [[ ${build_static} == "yes" ]] ; then
bootstrap_id "build_sources_headers_shared-mode"
- if [[ $sources_headers == "" ]] ; then
- sources_headers=${variables[$key]}
+ if [[ ${sources_headers} == "" ]] ; then
+ sources_headers=${variables[${key}]}
else
- sources_headers="$sources_headers ${variables[$key]}"
+ sources_headers="${sources_headers} ${variables[${key}]}"
fi
bootstrap_id "build_sources_headers_static-mode"
- if [[ $sources_headers == "" ]] ; then
- sources_headers=${variables[$key]}
+ if [[ ${sources_headers} == "" ]] ; then
+ sources_headers=${variables[${key}]}
else
- sources_headers="$sources_headers ${variables[$key]}"
+ sources_headers="${sources_headers} ${variables[${key}]}"
fi
fi
bootstrap_id "path_headers-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_headers=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_headers=${variables[${key}]}
else
bootstrap_id "path_headers"
- if [[ ${variables[$key]} != "" ]] ; then
- path_headers=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_headers=${variables[${key}]}
fi
fi
- if [[ $path_headers != "" ]] ; then
- path_headers=$(echo $path_headers | sed -e 's|/*$|/|')
+ if [[ ${path_headers} != "" ]] ; then
+ path_headers=$(echo ${path_headers} | sed -e 's|/*$|/|')
fi
}
local key=
bootstrap_id "build_libraries-mode"
- if [[ $libraries == "" ]] ; then
- libraries=${variables[$key]}
+ if [[ ${libraries} == "" ]] ; then
+ libraries=${variables[${key}]}
else
- libraries="${variables[$key]} $libraries"
+ libraries="${variables[${key}]} ${libraries}"
fi
bootstrap_id "build_libraries_shared-mode"
- if [[ $libraries_shared == "" ]] ; then
- libraries_shared=${variables[$key]}
+ if [[ ${libraries_shared} == "" ]] ; then
+ libraries_shared=${variables[${key}]}
else
- libraries_shared="${variables[$key]} $libraries_shared"
+ libraries_shared="${variables[${key}]} ${libraries_shared}"
fi
bootstrap_id "build_libraries_static-mode"
- if [[ $libraries_static == "" ]] ; then
- libraries_static=${variables[$key]}
+ if [[ ${libraries_static} == "" ]] ; then
+ libraries_static=${variables[${key}]}
else
- libraries_static="${variables[$key]} $libraries_static"
+ libraries_static="${variables[${key}]} ${libraries_static}"
fi
bootstrap_id "build_sources_library-mode"
- if [[ $sources_library == "" ]] ; then
- sources_library=${variables[$key]}
+ if [[ ${sources_library} == "" ]] ; then
+ sources_library=${variables[${key}]}
else
- sources_library="$sources_library ${variables[$key]}"
+ sources_library="${sources_library} ${variables[${key}]}"
fi
bootstrap_id "build_sources_library_shared-mode"
- if [[ $sources_library_shared == "" ]] ; then
- sources_library_shared=${variables[$key]}
+ if [[ ${sources_library_shared} == "" ]] ; then
+ sources_library_shared=${variables[${key}]}
else
- sources_library_shared="$build_sources_library_shared ${variables[$key]}"
+ sources_library_shared="${build_sources_library_shared} ${variables[${key}]}"
fi
bootstrap_id "build_sources_library_static-mode"
- if [[ $sources_library_static == "" ]] ; then
- sources_library_static=${variables[$key]}
+ if [[ ${sources_library_static} == "" ]] ; then
+ sources_library_static=${variables[${key}]}
else
- sources_library_static="$build_sources_library_static ${variables[$key]}"
+ sources_library_static="${build_sources_library_static} ${variables[${key}]}"
fi
}
local key=
bootstrap_id "build_objects_library-mode"
- if [[ $objects_library == "" ]] ; then
- objects_library=${variables[$key]}
+ if [[ ${objects_library} == "" ]] ; then
+ objects_library=${variables[${key}]}
else
- objects_library="${variables[$key]} $objects_library"
+ objects_library="${variables[${key}]} ${objects_library}"
fi
bootstrap_id "build_objects_library_shared-mode"
- if [[ $objects_library_shared == "" ]] ; then
- objects_library_shared=${variables[$key]}
+ if [[ ${objects_library_shared} == "" ]] ; then
+ objects_library_shared=${variables[${key}]}
else
- objects_library_shared="${variables[$key]} $objects_library_shared"
+ objects_library_shared="${variables[${key}]} ${objects_library_shared}"
fi
bootstrap_id "build_objects_library_static-mode"
- if [[ $objects_library_static == "" ]] ; then
- objects_library_static=${variables[$key]}
+ if [[ ${objects_library_static} == "" ]] ; then
+ objects_library_static=${variables[${key}]}
else
- objects_library_static="${variables[$key]} $objects_library_static"
+ objects_library_static="${variables[${key}]} ${objects_library_static}"
fi
bootstrap_id "build_objects_program-mode"
- if [[ $objects_program == "" ]] ; then
- objects_program=${variables[$key]}
+ if [[ ${objects_program} == "" ]] ; then
+ objects_program=${variables[${key}]}
else
- objects_program="${variables[$key]} $objects_program"
+ objects_program="${variables[${key}]} ${objects_program}"
fi
bootstrap_id "build_objects_program_shared-mode"
- if [[ $objects_program_shared == "" ]] ; then
- objects_program_shared=${variables[$key]}
+ if [[ ${objects_program_shared} == "" ]] ; then
+ objects_program_shared=${variables[${key}]}
else
- objects_program_shared="${variables[$key]} $objects_program_shared"
+ objects_program_shared="${variables[${key}]} ${objects_program_shared}"
fi
bootstrap_id "build_objects_program_static-mode"
- if [[ $objects_program_static == "" ]] ; then
- objects_program_static=${variables[$key]}
+ if [[ ${objects_program_static} == "" ]] ; then
+ objects_program_static=${variables[${key}]}
else
- objects_program_static="${variables[$key]} $objects_program_static"
+ objects_program_static="${variables[${key}]} ${objects_program_static}"
fi
- if [[ $sources_object == "" ]] ; then
+ if [[ ${sources_object} == "" ]] ; then
bootstrap_id "build_sources_object-mode"
- sources_object=${variables[$key]}
+ sources_object=${variables[${key}]}
fi
- if [[ $sources_object_shared == "" ]] ; then
+ if [[ ${sources_object_shared} == "" ]] ; then
bootstrap_id "build_sources_object_shared-mode"
- sources_object_shared=${variables[$key]}
+ sources_object_shared=${variables[${key}]}
fi
- if [[ $sources_object_static == "" ]] ; then
+ if [[ ${sources_object_static} == "" ]] ; then
bootstrap_id "build_sources_object_static-mode"
- sources_object_static=${variables[$key]}
+ sources_object_static=${variables[${key}]}
fi
}
bootstrap_operation_build_prepare_paths() {
local key=
- if [[ $override_path_sources == "" ]] ; then
+ if [[ ${override_path_sources} == "" ]] ; then
bootstrap_id "path_sources-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_sources=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_sources=${variables[${key}]}
else
bootstrap_id "path_sources"
- if [[ ${variables[$key]} != "" ]] ; then
- path_sources=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_sources=${variables[${key}]}
fi
fi
fi
- if [[ $path_sources != "" ]] ; then
- path_sources=$(echo $path_sources | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_sources} != "" ]] ; then
+ path_sources=$(echo ${path_sources} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_sources_object-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_sources_object=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_sources_object=${variables[${key}]}
else
bootstrap_id "path_sources_object"
- if [[ ${variables[$key]} != "" ]] ; then
- path_sources_object=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_sources_object=${variables[${key}]}
fi
fi
- if [[ $path_sources_object != "" ]] ; then
- path_sources_object=$(echo $path_sources_object | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_sources_object} != "" ]] ; then
+ path_sources_object=$(echo ${path_sources_object} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_headers-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_headers=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_headers=${variables[${key}]}
fi
- if [[ $path_headers != "" ]] ; then
- path_headers=$(echo $path_headers | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_headers} != "" ]] ; then
+ path_headers=$(echo ${path_headers} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "has_path_standard-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- has_path_standard=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ has_path_standard=${variables[${key}]}
fi
- if [[ $has_path_standard == "no" ]] ; then
+ if [[ ${has_path_standard} == "no" ]] ; then
path_language=
else
bootstrap_id "path_language-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_language=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_language=${variables[${key}]}
else
bootstrap_id "path_language"
- if [[ ${variables[$key]} != "" ]] ; then
- path_language=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_language=${variables[${key}]}
fi
fi
- if [[ $path_language != "" ]] ; then
- path_language=$(echo $path_language | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_language} != "" ]] ; then
+ path_language=$(echo ${path_language} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
fi
bootstrap_id "path_object_library-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_object_library=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_object_library=${variables[${key}]}
fi
- if [[ $path_object_library != "" ]] ; then
- path_object_library=$(echo $path_object_library | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_object_library} != "" ]] ; then
+ path_object_library=$(echo ${path_object_library} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_object_program-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_object_program=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_object_program=${variables[${key}]}
fi
- if [[ $path_object_program != "" ]] ; then
- path_object_program=$(echo $path_object_program | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_object_program} != "" ]] ; then
+ path_object_program=$(echo ${path_object_program} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_library_script-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_library_script=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_library_script=${variables[${key}]}
fi
- if [[ $path_library_script != "" ]] ; then
- path_library_script=$(echo $path_library_script | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_library_script} != "" ]] ; then
+ path_library_script=$(echo ${path_library_script} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_library_shared-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_library_shared=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_library_shared=${variables[${key}]}
fi
- if [[ $path_library_shared != "" ]] ; then
- path_library_shared=$(echo $path_library_shared | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_library_shared} != "" ]] ; then
+ path_library_shared=$(echo ${path_library_shared} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_library_static-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_library_static=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_library_static=${variables[${key}]}
fi
- if [[ $path_library_static != "" ]] ; then
- path_library_static=$(echo $path_library_static | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_library_static} != "" ]] ; then
+ path_library_static=$(echo ${path_library_static} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_object_library_script-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_object_library_script=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_object_library_script=${variables[${key}]}
fi
- if [[ $path_object_library_script != "" ]] ; then
- path_object_library_script=$(echo $path_object_library_script | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_object_library_script} != "" ]] ; then
+ path_object_library_script=$(echo ${path_object_library_script} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_object_library_shared-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_object_library_shared=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_object_library_shared=${variables[${key}]}
fi
- if [[ $path_object_library_shared != "" ]] ; then
- path_object_library_shared=$(echo $path_object_library_shared | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_object_library_shared} != "" ]] ; then
+ path_object_library_shared=$(echo ${path_object_library_shared} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_object_library_static-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_object_library_static=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_object_library_static=${variables[${key}]}
fi
- if [[ $path_object_library_static != "" ]] ; then
- path_object_library_static=$(echo $path_object_library_static | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_object_library_static} != "" ]] ; then
+ path_object_library_static=$(echo ${path_object_library_static} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_object_program_script-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_object_program_script=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_object_program_script=${variables[${key}]}
fi
- if [[ $path_object_program_script != "" ]] ; then
- path_object_program_script=$(echo $path_object_program_script | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_object_program_script} != "" ]] ; then
+ path_object_program_script=$(echo ${path_object_program_script} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_object_program_shared-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_object_program_shared=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_object_program_shared=${variables[${key}]}
fi
- if [[ $path_object_program_shared != "" ]] ; then
- path_object_program_shared=$(echo $path_object_program_shared | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_object_program_shared} != "" ]] ; then
+ path_object_program_shared=$(echo ${path_object_program_shared} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_object_program_static-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_object_program_static=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_object_program_static=${variables[${key}]}
fi
- if [[ $path_object_program_static != "" ]] ; then
- path_object_program_static=$(echo $path_object_program_static | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_object_program_static} != "" ]] ; then
+ path_object_program_static=$(echo ${path_object_program_static} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_object_script-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_object_script=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_object_script=${variables[${key}]}
fi
- if [[ $path_object_script != "" ]] ; then
- path_object_script=$(echo $path_object_script | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_object_script} != "" ]] ; then
+ path_object_script=$(echo ${path_object_script} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_object_shared-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_object_shared=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_object_shared=${variables[${key}]}
fi
- if [[ $path_object_shared != "" ]] ; then
- path_object_shared=$(echo $path_object_shared | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_object_shared} != "" ]] ; then
+ path_object_shared=$(echo ${path_object_shared} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_object_static-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_object_static=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_object_static=${variables[${key}]}
fi
- if [[ $path_object_static != "" ]] ; then
- path_object_static=$(echo $path_object_static | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_object_static} != "" ]] ; then
+ path_object_static=$(echo ${path_object_static} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
- if [[ $path_object_static != "" ]] ; then
- path_object_static=$(echo $path_object_static | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_object_static} != "" ]] ; then
+ path_object_static=$(echo ${path_object_static} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_program_script-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_program_script=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_program_script=${variables[${key}]}
fi
- if [[ $path_program_script != "" ]] ; then
- path_program_script=$(echo $path_program_script | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_program_script} != "" ]] ; then
+ path_program_script=$(echo ${path_program_script} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_program_shared-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_program_shared=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_program_shared=${variables[${key}]}
fi
- if [[ $path_program_shared != "" ]] ; then
- path_program_shared=$(echo $path_program_shared | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_program_shared} != "" ]] ; then
+ path_program_shared=$(echo ${path_program_shared} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
bootstrap_id "path_program_static-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- path_program_static=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ path_program_static=${variables[${key}]}
fi
- if [[ $path_program_static != "" ]] ; then
- path_program_static=$(echo $path_program_static | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_program_static} != "" ]] ; then
+ path_program_static=$(echo ${path_program_static} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
- if [[ $path_program_static != "" ]] ; then
- path_program_static=$(echo $path_program_static | sed -e 's|//*|/|g' -e 's|/*$|/|')
+ if [[ ${path_program_static} != "" ]] ; then
+ path_program_static=$(echo ${path_program_static} | sed -e 's|//*|/|g' -e 's|/*$|/|')
fi
}
local key=
bootstrap_id "build_sources_program-mode"
- if [[ $sources_program == "" ]] ; then
- sources_program=${variables[$key]}
+ if [[ ${sources_program} == "" ]] ; then
+ sources_program=${variables[${key}]}
else
- sources_program="$sources_program ${variables[$key]}"
+ sources_program="${sources_program} ${variables[${key}]}"
fi
bootstrap_id "build_sources_program_shared-mode"
- if [[ $sources_program_shared == "" ]] ; then
- sources_program_shared=${variables[$key]}
+ if [[ ${sources_program_shared} == "" ]] ; then
+ sources_program_shared=${variables[${key}]}
else
- sources_program_shared="$sources_program_shared ${variables[$key]}"
+ sources_program_shared="${sources_program_shared} ${variables[${key}]}"
fi
bootstrap_id "build_sources_program_static-mode"
- if [[ $sources_program_static == "" ]] ; then
- sources_program_static=${variables[$key]}
+ if [[ ${sources_program_static} == "" ]] ; then
+ sources_program_static=${variables[${key}]}
else
- sources_program_static="$sources_program_static ${variables[$key]}"
+ sources_program_static="${sources_program_static} ${variables[${key}]}"
fi
}
local key=
bootstrap_id "has-build_compiler-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "build_compiler-mode"
- build_compiler=${variables[$key]}
+ build_compiler=${variables[${key}]}
fi
bootstrap_id "has-build_indexer-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "build_indexer-mode"
- build_indexer=${variables[$key]}
+ build_indexer=${variables[${key}]}
fi
bootstrap_id "has-build_indexer_arguments-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "build_indexer_arguments-mode"
- build_indexer_arguments=${variables[$key]}
+ build_indexer_arguments=${variables[${key}]}
fi
bootstrap_id "has-build_name-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "build_name-mode"
- build_name=${variables[$key]}
+ build_name=${variables[${key}]}
fi
bootstrap_id "has-version_major-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "version_major-mode"
- version_major=${variables[$key]}
+ version_major=${variables[${key}]}
fi
bootstrap_id "has-version_major_prefix-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "version_major_prefix-mode"
- version_major_prefix=${variables[$key]}
+ version_major_prefix=${variables[${key}]}
fi
bootstrap_id "has-version_minor-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "version_minor-mode"
- version_minor=${variables[$key]}
+ version_minor=${variables[${key}]}
fi
bootstrap_id "has-version_minor_prefix-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "version_minor_prefix-mode"
- version_minor_prefix=${variables[$key]}
+ version_minor_prefix=${variables[${key}]}
fi
bootstrap_id "has-version_micro-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "version_micro-mode"
- version_micro=${variables[$key]}
+ version_micro=${variables[${key}]}
fi
bootstrap_id "has-version_micro_prefix-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "version_micro_prefix-mode"
- version_micro_prefix=${variables[$key]}
+ version_micro_prefix=${variables[${key}]}
fi
bootstrap_id "has-version_nano-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "version_nano-mode"
- version_nano=${variables[$key]}
+ version_nano=${variables[${key}]}
fi
bootstrap_id "has-version_nano_prefix-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "version_nano_prefix-mode"
- version_nano_prefix=${variables[$key]}
+ version_nano_prefix=${variables[${key}]}
fi
bootstrap_id "has-path_headers-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "path_headers-mode"
- path_headers=${variables[$key]}
+ path_headers=${variables[${key}]}
fi
bootstrap_id "has-preserve_path_headers-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "preserve_path_headers-mode"
- preserve_path_headers=${variables[$key]}
+ preserve_path_headers=${variables[${key}]}
fi
bootstrap_id "has-path_library_script-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "path_library_script-mode"
- path_library_script=${variables[$key]}
+ path_library_script=${variables[${key}]}
fi
bootstrap_id "has-path_library_shared-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "path_library_shared-mode"
- path_library_shared=${variables[$key]}
+ path_library_shared=${variables[${key}]}
fi
bootstrap_id "has-path_library_static-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "path_library_static-mode"
- path_library_static=${variables[$key]}
+ path_library_static=${variables[${key}]}
fi
bootstrap_id "has-path_object_script-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "path_object_script-mode"
- path_object_script=${variables[$key]}
+ path_object_script=${variables[${key}]}
fi
bootstrap_id "has-path_object_shared-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "path_object_shared-mode"
- path_object_shared=${variables[$key]}
+ path_object_shared=${variables[${key}]}
fi
bootstrap_id "has-path_object_static-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "path_object_static-mode"
- path_object_static=${variables[$key]}
+ path_object_static=${variables[${key}]}
fi
bootstrap_id "has-path_program_script-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "path_program_script-mode"
- path_program_script=${variables[$key]}
+ path_program_script=${variables[${key}]}
fi
bootstrap_id "has-path_program_shared-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "path_program_shared-mode"
- path_program_shared=${variables[$key]}
+ path_program_shared=${variables[${key}]}
fi
bootstrap_id "has-path_program_static-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "path_program_static-mode"
- path_program_static=${variables[$key]}
+ path_program_static=${variables[${key}]}
fi
bootstrap_id "has-has_path_standard-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "has_path_standard-mode"
- has_path_standard=${variables[$key]}
+ has_path_standard=${variables[${key}]}
fi
bootstrap_id "has-search_exclusive-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "search_exclusive-mode"
- search_exclusive=${variables[$key]}
+ search_exclusive=${variables[${key}]}
fi
bootstrap_id "has-search_shared-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "search_shared-mode"
- search_shared=${variables[$key]}
+ search_shared=${variables[${key}]}
fi
bootstrap_id "has-search_static-mode"
- if [[ ${variables[$key]} == "yes" ]] ; then
+ if [[ ${variables[${key}]} == "yes" ]] ; then
bootstrap_id "search_static-mode"
- search_static=${variables[$key]}
+ search_static=${variables[${key}]}
fi
}
local key=
bootstrap_id "build_sources_setting-mode"
- if [[ $sources_setting == "" ]] ; then
- sources_setting=${variables[$key]}
+ if [[ ${sources_setting} == "" ]] ; then
+ sources_setting=${variables[${key}]}
else
- sources_setting="$sources_setting ${variables[$key]}"
+ sources_setting="${sources_setting} ${variables[${key}]}"
fi
}
local key=
bootstrap_id "build_shared-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- build_shared=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ build_shared=${variables[${key}]}
fi
bootstrap_id "build_static-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- build_static=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ build_static=${variables[${key}]}
fi
- if [[ $enable_shared == "yes" ]] ; then
+ if [[ ${enable_shared} == "yes" ]] ; then
build_shared="yes"
search_shared="yes"
- elif [[ $enable_shared == "no" ]] ; then
+ elif [[ ${enable_shared} == "no" ]] ; then
build_shared="no"
search_shared="no"
fi
- if [[ $enable_static == "yes" ]] ; then
+ if [[ ${enable_static} == "yes" ]] ; then
build_static="yes"
search_static="yes"
- elif [[ $enable_static == "no" ]] ; then
+ elif [[ ${enable_static} == "no" ]] ; then
build_static="no"
search_static="no"
fi
- if [[ $search_shared == "no" ]] ; then
+ if [[ ${search_shared} == "no" ]] ; then
arguments_shared=
fi
- if [[ $search_static == "no" ]] ; then
+ if [[ ${search_static} == "no" ]] ; then
arguments_static=
fi
}
bootstrap_operation_build_validate_build() {
- if [[ $build_compiler == "" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${build_compiler} == "" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: Cannot Build, no '${c_notice}build_compiler${c_error}' specified, such as '${c_notice}gcc${c_error}'.${c_reset}"
let failure=1
fi
- if [[ $build_indexer == "" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${build_indexer} == "" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: Cannot Build, no '${c_notice}build_indexer${c_error}' specified, such as '${c_notice}ar${c_error}'.${c_reset}"
let failure=1
fi
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
return 0
fi
bootstrap_operation_build_validate_paths() {
- if [[ $path_sources == "" || ! -d $path_sources ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${path_sources} == "" || ! -d ${path_sources} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: The sources directory ${c_notice}${path_sources}${c_error} is not a valid directory.${c_reset}"
let failure=1
fi
- if [[ $failure == "" && $path_sources_object != "" && ! -d $path_sources_object ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${failure} == "" && ${path_sources_object} != "" && ! -d ${path_sources_object} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: The sources object directory ${c_notice}${path_sources_object}${c_error} is not a valid directory.${c_reset}"
let failure=1
fi
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
return 0
fi
bootstrap_operation_build_validate_search() {
# When not in search exclusive mode, allow static libraries to be linked into shared libraries if the shared library is not found first.
- if [[ $search_exclusive == "no" ]] ; then
- arguments_shared="$arguments_shared $arguments_static"
+ if [[ ${search_exclusive} == "no" ]] ; then
+ arguments_shared="${arguments_shared} ${arguments_static}"
fi
}
bootstrap_operation_build_validate_shared_static() {
- if [[ $build_shared != "yes" && $build_static != "yes" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${build_shared} != "yes" && ${build_static} != "yes" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: Cannot Build, either build_shared or build_static must be set to 'yes'.${c_reset}"
let failure=1
fi
- if [[ $search_shared != "yes" && $search_static != "yes" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${search_shared} != "yes" && ${search_static} != "yes" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: Cannot Build, either search_shared or search_static must be set to 'yes'.${c_reset}"
let failure=1
fi
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
return 0
fi
bootstrap_operation_build_validate_sources() {
- for i in $sources_script ; do
- if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ for i in ${sources_script} ; do
+ if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_script path provided: '${i}'.${c_reset}"
fi
done
- for i in $sources_headers ; do
- if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ for i in ${sources_headers} ; do
+ if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_headers path provided: '${i}'.${c_reset}"
fi
done
- for i in $sources_library ; do
- if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ for i in ${sources_library} ; do
+ if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_library path provided: '${i}'.${c_reset}"
fi
done
- for i in $sources_library_object ; do
- if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ for i in ${sources_library_object} ; do
+ if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_library_object path provided: '${i}'.${c_reset}"
fi
done
- for i in $sources_program_object ; do
- if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ for i in ${sources_program_object} ; do
+ if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_program_object path provided: '${i}'.${c_reset}"
fi
done
- for i in $sources_program ; do
- if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ for i in ${sources_program} ; do
+ if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_program path provided: '${i}'.${c_reset}"
fi
done
- for i in $sources_documentation ; do
- if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ for i in ${sources_documentation} ; do
+ if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_documentation path provided: '${i}'.${c_reset}"
fi
done
- for i in $sources_setting ; do
- if [[ $i != "$(echo $i | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ for i in ${sources_setting} ; do
+ if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
bootstrap_print_first
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_setting path provided: '${i}'.${c_reset}"
fi
done
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
return 0
fi
local key=
bootstrap_id "version_file-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- version_file_value=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ version_file_value=${variables[${key}]}
fi
bootstrap_id "version_target-mode"
- if [[ ${variables[$key]} != "" ]] ; then
- version_target_value=${variables[$key]}
+ if [[ ${variables[${key}]} != "" ]] ; then
+ version_target_value=${variables[${key}]}
fi
- if [[ $version_file_value == "" ]] ; then
+ if [[ ${version_file_value} == "" ]] ; then
version_file_value="micro"
fi
- if [[ $version_target_value == "" ]] ; then
+ if [[ ${version_target_value} == "" ]] ; then
version_target_value="major"
fi
- if [[ $version_major == "" ]] ; then
+ if [[ ${version_major} == "" ]] ; then
version_major_prefix=
fi
- if [[ $version_minor == "" ]] ; then
+ if [[ ${version_minor} == "" ]] ; then
version_minor_prefix=
fi
- if [[ $version_micro == "" ]] ; then
+ if [[ ${version_micro} == "" ]] ; then
version_micro_prefix=
fi
- if [[ $version_nano == "" ]] ; then
+ if [[ ${version_nano} == "" ]] ; then
version_nano_prefix=
fi
- if [[ $version_file_value == "major" ]] ; then
- version_file="$version_major_prefix$version_major"
- elif [[ $version_file_value == "minor" ]] ; then
- version_file="$version_major_prefix$version_major$version_minor_prefix$version_minor"
- elif [[ $version_file_value == "micro" ]] ; then
- version_file="$version_major_prefix$version_major$version_minor_prefix$version_minor$version_micro_prefix$version_micro"
- elif [[ $version_file_value == "nano" ]] ; then
- version_file="$version_major_prefix$version_major$version_minor_prefix$version_minor$version_micro_prefix$version_micro$version_nano_prefix$version_nano"
+ if [[ ${version_file_value} == "major" ]] ; then
+ version_file="${version_major_prefix}${version_major}"
+ elif [[ ${version_file_value} == "minor" ]] ; then
+ version_file="${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}"
+ elif [[ ${version_file_value} == "micro" ]] ; then
+ version_file="${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro}"
+ elif [[ ${version_file_value} == "nano" ]] ; then
+ version_file="${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro}${version_nano_prefix}${version_nano}"
fi
- if [[ $version_target_value == "major" ]] ; then
- version_target="$version_major_prefix$version_major"
- elif [[ $version_target_value == "minor" ]] ; then
- version_target="$version_major_prefix$version_major$version_minor_prefix$version_minor"
- elif [[ $version_target_value == "micro" ]] ; then
- version_target="$version_major_prefix$version_major$version_minor_prefix$version_minor$version_micro_prefix$version_micro"
- elif [[ $version_target_value == "nano" ]] ; then
- version_target="$version_major_prefix$version_major$version_minor_prefix$version_minor$version_micro_prefix$version_micro$version_nano_prefix$version_nano"
+ if [[ ${version_target_value} == "major" ]] ; then
+ version_target="${version_major_prefix}${version_major}"
+ elif [[ ${version_target_value} == "minor" ]] ; then
+ version_target="${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}"
+ elif [[ ${version_target_value} == "micro" ]] ; then
+ version_target="${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro}"
+ elif [[ ${version_target_value} == "nano" ]] ; then
+ version_target="${version_major_prefix}${version_major}${version_minor_prefix}${version_minor}${version_micro_prefix}${version_micro}${version_nano_prefix}${version_nano}"
fi
}
local i=
for i in ${path_build}{documents,includes,libraries,objects,programs,settings,stage} ; do
- if [[ -e $i ]] ; then
- rm $verbose_common -Rf $i
+ if [[ -e ${i} ]] ; then
+ rm ${verbose_common} -Rf ${i}
fi
done
if [[ -f ${project_built}.prepared ]] ; then
- rm $verbose_common -f ${project_built}-${settings_name}.prepared
+ rm ${verbose_common} -f ${project_built}-${settings_name}.prepared
fi
if [[ -f ${project_built_shared}-${settings_name}.built ]] ; then
- rm $verbose_common -f ${project_built_shared}-${settings_name}.built
+ rm ${verbose_common} -f ${project_built_shared}-${settings_name}.built
fi
if [[ -f ${project_built_static}-${settings_name}.built ]] ; then
- rm $verbose_common -f ${project_built_static}-${settings_name}.built
+ rm ${verbose_common} -f ${project_built_static}-${settings_name}.built
fi
}
bootstrap_print_first() {
- if [[ $print_line_first == "yes" ]] ; then
+ if [[ ${print_line_first} == "yes" ]] ; then
echo
print_line_first=
bootstrap_print_last() {
- if [[ $print_line_last == "yes" ]] ; then
+ if [[ ${print_line_last} == "yes" ]] ; then
echo
fi
}
install_main() {
- if [[ $SHELL_ENGINE == "zsh" ]] ; then
+ if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
emulate ksh
fi
local public_name="Simple FLL Project Install Script"
local system_name=install
- local called_name=$(basename $0)
+ local called_name=$(basename ${0})
local version=0.7.0
local grab_next=
if [[ $# -gt 0 ]] ; then
t=$#
- while [[ $i -lt $t ]] ; do
- let i=$i+1
+ while [[ ${i} -lt ${t} ]] ; do
+ let i=${i}+1
- if [[ $SHELL_ENGINE == "zsh" ]] ; then
+ if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
p=${(P)i}
else
p=${!i}
fi
- if [[ $grab_next == "" ]] ; then
- if [[ $p == "-h" || $p == "--help" ]] ; then
+ if [[ ${grab_next} == "" ]] ; then
+ if [[ ${p} == "-h" || ${p} == "--help" ]] ; then
do_help=yes
- elif [[ $p == "+C" || $p == "++copyright" ]] ; then
+ elif [[ ${p} == "+C" || ${p} == "++copyright" ]] ; then
do_copyright="yes"
- elif [[ $p == "+d" || $p == "++dark" ]] ; then
+ elif [[ ${p} == "+d" || ${p} == "++dark" ]] ; then
do_color="dark"
context="+d"
- elif [[ $p == "+l" || $p == "++light" ]] ; then
+ elif [[ ${p} == "+l" || ${p} == "++light" ]] ; then
do_color="light"
context="+l"
- elif [[ $p == "+n" || $p == "++no_color" ]] ; then
+ elif [[ ${p} == "+n" || ${p} == "++no_color" ]] ; then
do_color=none
context="+n"
- elif [[ $p == "+Q" || $p == "++quiet" ]] ; then
+ elif [[ ${p} == "+Q" || ${p} == "++quiet" ]] ; then
verbosity="quiet"
verbose="+Q"
verbose_common=
- elif [[ $p == "+N" || $p == "++normal" ]] ; then
+ elif [[ ${p} == "+N" || ${p} == "++normal" ]] ; then
verbosity=
verbose="+N"
verbose_common=
- elif [[ $p == "+E" || $p == "++error" ]] ; then
+ elif [[ ${p} == "+E" || ${p} == "++error" ]] ; then
verbosity="error"
verbose="+E"
verbose_common=
- elif [[ $p == "+V" || $p == "++verbose" ]] ; then
+ elif [[ ${p} == "+V" || ${p} == "++verbose" ]] ; then
verbosity="verbose"
verbose="+V"
verbose_common="-v"
- elif [[ $p == "+D" || $p == "++debug" ]] ; then
+ elif [[ ${p} == "+D" || ${p} == "++debug" ]] ; then
verbosity="debug"
verbose="+D"
verbose_common="-v"
- elif [[ $p == "+F" || $p == "++line_first_no" ]] ; then
+ elif [[ ${p} == "+F" || ${p} == "++line_first_no" ]] ; then
print_line_first="no"
- elif [[ $p == "+L" || $p == "++line_last_no" ]] ; then
+ elif [[ ${p} == "+L" || ${p} == "++line_last_no" ]] ; then
print_line_last="no"
- elif [[ $p == "+v" || $p == "++version" ]] ; then
- echo $version
+ elif [[ ${p} == "+v" || ${p} == "++version" ]] ; then
+ echo ${version}
return 0
- elif [[ $p == "-b" || $p == "--build" ]] ; then
+ elif [[ ${p} == "-b" || ${p} == "--build" ]] ; then
grab_next=path_build
- elif [[ $p == "-P" || $p == "--prefix" ]] ; then
+ elif [[ ${p} == "-P" || ${p} == "--prefix" ]] ; then
grab_next=prefix
- elif [[ $p == "-B" || $p == "--bindir" ]] ; then
+ elif [[ ${p} == "-B" || ${p} == "--bindir" ]] ; then
grab_next=bindir
- elif [[ $p == "-D" || $p == "--docdir" ]] ; then
+ elif [[ ${p} == "-D" || ${p} == "--docdir" ]] ; then
grab_next=docdir
- elif [[ $p == "-E" || $p == "--etcdir" ]] ; then
+ elif [[ ${p} == "-E" || ${p} == "--etcdir" ]] ; then
grab_next=etcdir
- elif [[ $p == "-I" || $p == "--includedir" ]] ; then
+ elif [[ ${p} == "-I" || ${p} == "--includedir" ]] ; then
grab_next=includedir
- elif [[ $p == "-L" || $p == "--libdir" ]] ; then
+ elif [[ ${p} == "-L" || ${p} == "--libdir" ]] ; then
grab_next=libdir
- elif [[ $p == "-w" || $p == "--work" ]] ; then
+ elif [[ ${p} == "-w" || ${p} == "--work" ]] ; then
grab_next=work
- elif [[ $p == "--enable-doc" ]] ; then
+ elif [[ ${p} == "--enable-doc" ]] ; then
enable_documentation="yes"
- elif [[ $p == "--disable-doc" ]] ; then
+ elif [[ ${p} == "--disable-doc" ]] ; then
enable_documentation="no"
- elif [[ $p == "--enable-settings" ]] ; then
+ elif [[ ${p} == "--enable-settings" ]] ; then
enable_settings="yes"
- elif [[ $p == "--disable-settings" ]] ; then
+ elif [[ ${p} == "--disable-settings" ]] ; then
enable_settings="no"
- elif [[ $p == "--enable-shared" ]] ; then
+ elif [[ ${p} == "--enable-shared" ]] ; then
enable_shared="yes"
- elif [[ $p == "--disable-shared" ]] ; then
+ elif [[ ${p} == "--disable-shared" ]] ; then
enable_shared="no"
- elif [[ $p == "--disable-shared-programs" ]] ; then
+ elif [[ ${p} == "--disable-shared-programs" ]] ; then
enable_shared_programs="no"
- elif [[ $p == "--disable-shared-libraries" ]] ; then
+ elif [[ ${p} == "--disable-shared-libraries" ]] ; then
enable_shared_libraries="no"
- elif [[ $p == "--disable-static-programs" ]] ; then
+ elif [[ ${p} == "--disable-static-programs" ]] ; then
enable_static_programs="no"
- elif [[ $p == "--disable-static-libraries" ]] ; then
+ elif [[ ${p} == "--disable-static-libraries" ]] ; then
enable_static_libraries="no"
- elif [[ $p == "--enable-static" ]] ; then
+ elif [[ ${p} == "--enable-static" ]] ; then
enable_static="yes"
- elif [[ $p == "--disable-static" ]] ; then
+ elif [[ ${p} == "--disable-static" ]] ; then
enable_static="no"
- elif [[ $p == "--enable-includes" ]] ; then
+ elif [[ ${p} == "--enable-includes" ]] ; then
enable_includes="yes"
- elif [[ $p == "--disable-includes" ]] ; then
+ elif [[ ${p} == "--disable-includes" ]] ; then
enable_includes="no"
- elif [[ $p == "--libraries-static" ]] ; then
+ elif [[ ${p} == "--libraries-static" ]] ; then
grab_next="destination_libraries_static"
- elif [[ $p == "--libraries-shared" ]] ; then
+ elif [[ ${p} == "--libraries-shared" ]] ; then
grab_next="destination_libraries_shared"
- elif [[ $p == "--programs-static" ]] ; then
+ elif [[ ${p} == "--programs-static" ]] ; then
grab_next="destination_programs_static"
- elif [[ $p == "--programs-shared" ]] ; then
+ elif [[ ${p} == "--programs-shared" ]] ; then
grab_next="destination_programs_shared"
- elif [[ $operation_failure == "" ]] ; then
- operation="$p"
+ elif [[ ${operation_failure} == "" ]] ; then
+ operation="${p}"
operation_failure=fail-unsupported
fi
else
- if [[ $grab_next == "path_build" ]] ; then
- path_build=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
- elif [[ $grab_next == "prefix" ]] ; then
- destination_prefix=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
- elif [[ $grab_next == "bindir" ]] ; then
- destination_programs=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
- elif [[ $grab_next == "docdir" ]] ; then
- destination_documentation=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
- elif [[ $grab_next == "etcdir" ]] ; then
- destination_settings=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
- elif [[ $grab_next == "includedir" ]] ; then
- destination_includes=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
- elif [[ $grab_next == "libdir" ]] ; then
- destination_libraries=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
- elif [[ $grab_next == "work" ]] ; then
- work=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
- elif [[ $grab_next == "destination_libraries_static" ]] ; then
- destination_libraries_static=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
- elif [[ $grab_next == "destination_libraries_shared" ]] ; then
- destination_libraries_shared=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
- elif [[ $grab_next == "destination_programs_static" ]] ; then
- destination_programs_static=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
- elif [[ $grab_next == "destination_programs_shared" ]] ; then
- destination_programs_shared=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
+ if [[ ${grab_next} == "path_build" ]] ; then
+ path_build=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "prefix" ]] ; then
+ destination_prefix=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "bindir" ]] ; then
+ destination_programs=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "docdir" ]] ; then
+ destination_documentation=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "etcdir" ]] ; then
+ destination_settings=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "includedir" ]] ; then
+ destination_includes=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "libdir" ]] ; then
+ destination_libraries=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "work" ]] ; then
+ work=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "destination_libraries_static" ]] ; then
+ destination_libraries_static=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "destination_libraries_shared" ]] ; then
+ destination_libraries_shared=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "destination_programs_static" ]] ; then
+ destination_programs_static=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "destination_programs_shared" ]] ; then
+ destination_programs_shared=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
fi
grab_next=
p=
fi
- if [[ $verbosity == "quiet" ]] ; then
+ if [[ ${verbosity} == "quiet" ]] ; then
print_line_first="no"
print_line_last="no"
fi
install_handle_colors
- if [[ $do_help == "yes" ]] ; then
+ if [[ ${do_help} == "yes" ]] ; then
install_help
install_cleanup
return 0
fi
- if [[ $do_copyright == "yes" ]] ; then
+ if [[ ${do_copyright} == "yes" ]] ; then
install_copyright
install_cleanup
return 0
fi
- if [[ $operation_failure == "fail-unsupported" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${operation_failure} == "fail-unsupported" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
- echo -e "${c_error}ERROR: The operation ${c_notice}$operation${c_error} was not recognized.${c_reset}"
+ echo -e "${c_error}ERROR: The operation ${c_notice}${operation}${c_error} was not recognized.${c_reset}"
install_print_last
fi
return 1
fi
- if [[ ! -d $path_build ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ! -d ${path_build} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
- echo -e "${c_error}ERROR: The build path ${c_notice}$path_build${c_error} is not a valid directory.${c_reset}"
+ echo -e "${c_error}ERROR: The build path ${c_notice}${path_build}${c_error} is not a valid directory.${c_reset}"
install_print_last
fi
return 1
fi
- if [[ $work == "" && $destination_prefix != "" && ! -d $destination_prefix ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${work} == "" && ${destination_prefix} != "" && ! -d ${destination_prefix} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
- echo -e "${c_error}ERROR: The destination prefix ${c_notice}$destination_prefix${c_error} is not a valid directory.${c_reset}"
+ echo -e "${c_error}ERROR: The destination prefix ${c_notice}${destination_prefix}${c_error} is not a valid directory.${c_reset}"
install_print_last
fi
return 1
fi
- if [[ $destination_prefix != "" ]] ; then
- if [[ $(echo $destination_documentation | grep -o '^/') == "" ]] ; then
- destination_documentation="$destination_prefix$destination_documentation"
+ if [[ ${destination_prefix} != "" ]] ; then
+ if [[ $(echo ${destination_documentation} | grep -o '^/') == "" ]] ; then
+ destination_documentation="${destination_prefix}${destination_documentation}"
fi
- if [[ $(echo $destination_programs | grep -o '^/') == "" ]] ; then
- destination_programs="$destination_prefix$destination_programs"
+ if [[ $(echo ${destination_programs} | grep -o '^/') == "" ]] ; then
+ destination_programs="${destination_prefix}${destination_programs}"
fi
- if [[ $(echo $destination_includes | grep -o '^/') == "" ]] ; then
- destination_includes="$destination_prefix$destination_includes"
+ if [[ $(echo ${destination_includes} | grep -o '^/') == "" ]] ; then
+ destination_includes="${destination_prefix}${destination_includes}"
fi
- if [[ $(echo $destination_libraries | grep -o '^/') == "" ]] ; then
- destination_libraries="$destination_prefix$destination_libraries"
+ if [[ $(echo ${destination_libraries} | grep -o '^/') == "" ]] ; then
+ destination_libraries="${destination_prefix}${destination_libraries}"
fi
- if [[ $(echo $destination_settings | grep -o '^/') == "" ]] ; then
- destination_settings="$destination_prefix$destination_settings"
+ if [[ $(echo ${destination_settings} | grep -o '^/') == "" ]] ; then
+ destination_settings="${destination_prefix}${destination_settings}"
fi
fi
- if [[ $destination_libraries_static != "" ]] ; then
- if [[ $(echo $destination_libraries_static | grep -o '^/') == "" ]] ; then
- destination_libraries_static=$destination_libraries$destination_libraries_static
+ if [[ ${destination_libraries_static} != "" ]] ; then
+ if [[ $(echo ${destination_libraries_static} | grep -o '^/') == "" ]] ; then
+ destination_libraries_static=${destination_libraries}${destination_libraries_static}
fi
else
- destination_libraries_static=$destination_libraries
+ destination_libraries_static=${destination_libraries}
fi
- if [[ $destination_libraries_shared != "" ]] ; then
- if [[ $(echo $destination_libraries_shared | grep -o '^/') == "" ]] ; then
- destination_libraries_shared=$destination_libraries$destination_libraries_shared
+ if [[ ${destination_libraries_shared} != "" ]] ; then
+ if [[ $(echo ${destination_libraries_shared} | grep -o '^/') == "" ]] ; then
+ destination_libraries_shared=${destination_libraries}${destination_libraries_shared}
fi
else
- destination_libraries_shared=$destination_libraries
+ destination_libraries_shared=${destination_libraries}
fi
- if [[ $destination_programs_static != "" ]] ; then
- if [[ $(echo $destination_programs_static | grep -o '^/') == "" ]] ; then
- destination_programs_static=$destination_programs$destination_programs_static
+ if [[ ${destination_programs_static} != "" ]] ; then
+ if [[ $(echo ${destination_programs_static} | grep -o '^/') == "" ]] ; then
+ destination_programs_static=${destination_programs}${destination_programs_static}
fi
else
- destination_programs_static=$destination_programs
+ destination_programs_static=${destination_programs}
fi
- if [[ $destination_programs_shared != "" ]] ; then
- if [[ $(echo $destination_programs_shared | grep -o '^/') == "" ]] ; then
- destination_programs_shared=$destination_programs$destination_programs_shared
+ if [[ ${destination_programs_shared} != "" ]] ; then
+ if [[ $(echo ${destination_programs_shared} | grep -o '^/') == "" ]] ; then
+ destination_programs_shared=${destination_programs}${destination_programs_shared}
fi
else
- destination_programs_shared=$destination_programs
+ destination_programs_shared=${destination_programs}
fi
- if [[ $work != "" && ! -d $work ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${work} != "" && ! -d ${work} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
- echo -e "${c_error}ERROR: The work directory ${c_notice}$work${c_error} is not a valid directory.${c_reset}"
+ echo -e "${c_error}ERROR: The work directory ${c_notice}${work}${c_error} is not a valid directory.${c_reset}"
install_print_last
fi
return 1
fi
- if [[ $work == "" && -e $destination_programs && ! -d $destination_programs ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${work} == "" && -e ${destination_programs} && ! -d ${destination_programs} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
- echo -e "${c_error}ERROR: The destination bindir ${c_notice}$destination_programs${c_error} is not a valid directory.${c_reset}"
+ echo -e "${c_error}ERROR: The destination bindir ${c_notice}${destination_programs}${c_error} is not a valid directory.${c_reset}"
install_print_last
fi
return 1
fi
- if [[ $work == "" && -e $destination_programs_static && ! -d $destination_programs_static ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${work} == "" && -e ${destination_programs_static} && ! -d ${destination_programs_static} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
- echo -e "${c_error}ERROR: The destination (${c_notice}static${c_error}) bindir ${c_notice}$destination_programs_static${c_error} is not a valid directory.${c_reset}"
+ echo -e "${c_error}ERROR: The destination (${c_notice}static${c_error}) bindir ${c_notice}${destination_programs_static}${c_error} is not a valid directory.${c_reset}"
install_print_last
fi
return 1
fi
- if [[ $work == "" && -e $destination_programs_shared && ! -d $destination_programs_shared ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${work} == "" && -e ${destination_programs_shared} && ! -d ${destination_programs_shared} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
- echo -e "${c_error}ERROR: The destination (${c_notice}shared${c_error}) bindir ${c_notice}$destination_programs_shared${c_error} is not a valid directory.${c_reset}"
+ echo -e "${c_error}ERROR: The destination (${c_notice}shared${c_error}) bindir ${c_notice}${destination_programs_shared}${c_error} is not a valid directory.${c_reset}"
install_print_last
fi
return 1
fi
- if [[ $work == "" && -e $destination_includes && ! -d $destination_includes ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${work} == "" && -e ${destination_includes} && ! -d ${destination_includes} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
- echo -e "${c_error}ERROR: The destination incluedir ${c_notice}$destination_includes${c_error} is not a valid directory.${c_reset}"
+ echo -e "${c_error}ERROR: The destination incluedir ${c_notice}${destination_includes}${c_error} is not a valid directory.${c_reset}"
install_print_last
fi
return 1
fi
- if [[ $work == "" && -e $destination_libraries_static && ! -d $destination_libraries_static ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${work} == "" && -e ${destination_libraries_static} && ! -d ${destination_libraries_static} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
- echo -e "${c_error}ERROR: The destination (${c_notice}static${c_error}) libdir ${c_notice}$destination_libraries_static${c_error} is not a valid directory.${c_reset}"
+ echo -e "${c_error}ERROR: The destination (${c_notice}static${c_error}) libdir ${c_notice}${destination_libraries_static}${c_error} is not a valid directory.${c_reset}"
install_print_last
fi
return 1
fi
- if [[ $work == "" && -e $destination_libraries_shared && ! -d $destination_libraries_shared ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${work} == "" && -e ${destination_libraries_shared} && ! -d ${destination_libraries_shared} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
- echo -e "${c_error}ERROR: The destination (${c_notice}shared${c_error}) libdir ${c_notice}$destination_libraries_shared${c_error} is not a valid directory.${c_reset}"
+ echo -e "${c_error}ERROR: The destination (${c_notice}shared${c_error}) libdir ${c_notice}${destination_libraries_shared}${c_error} is not a valid directory.${c_reset}"
install_print_last
fi
install_perform_install
- if [[ $verbosity != "quiet" ]] ; then
- if [[ $failure != "" || $verbosity != "error" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
+ if [[ ${failure} != "" || ${verbosity} != "error" ]] ; then
install_print_last
fi
fi
install_cleanup
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
return 0
fi
install_handle_colors() {
- if [[ $do_color == "light" ]] ; then
+ if [[ ${do_color} == "light" ]] ; then
c_error="\\033[1;31m"
c_warning="\\033[0;31m"
c_title="\\033[1;34m"
c_highlight="\\033[0;34m"
c_notice="\\033[0;01m"
c_important="\\033[0;35m"
- elif [[ $do_color == "none" ]] ; then
+ elif [[ ${do_color} == "none" ]] ; then
c_reset=
c_title=
c_error=
local path=
local message=
- if [[ $enable_shared == "no" ]] ; then
+ if [[ ${enable_shared} == "no" ]] ; then
enable_shared_programs="no"
enable_shared_libraries="no"
fi
- if [[ $enable_static == "no" ]] ; then
+ if [[ ${enable_static} == "no" ]] ; then
enable_static_programs="no"
enable_static_libraries="no"
fi
- if [[ $work == "" ]] ; then
+ if [[ ${work} == "" ]] ; then
message="install destination directory"
else
message="work directory"
fi
if [[ ! -d ${destination_prefix} ]] ; then
- mkdir $verbose_common ${destination_prefix}
+ mkdir ${verbose_common} ${destination_prefix}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_prefix}${c_error}.${c_reset}"
fi
fi
- if [[ $enable_shared_programs == "yes" || $enable_static_programs == "yes" ]] ; then
+ if [[ ${enable_shared_programs} == "yes" || ${enable_static_programs} == "yes" ]] ; then
if [[ -d ${path_build}${path_programs} && ! -d ${destination_programs} ]] ; then
- mkdir $verbose_common ${destination_programs}
+ mkdir ${verbose_common} ${destination_programs}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_programs}${c_error}.${c_reset}"
fi
fi
- if [[ $enable_shared_programs == "yes" && -d ${path_build}${path_programs}${path_shared} && ! -d ${destination_programs_shared} ]] ; then
- mkdir $verbose_common ${destination_programs_shared}
+ if [[ ${enable_shared_programs} == "yes" && -d ${path_build}${path_programs}${path_shared} && ! -d ${destination_programs_shared} ]] ; then
+ mkdir ${verbose_common} ${destination_programs_shared}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_programs_shared}${c_error}.${c_reset}"
fi
fi
- if [[ $enable_static_programs == "yes" && -d ${path_build}${path_programs}${path_static} && ! -d ${destination_programs_static} ]] ; then
- mkdir $verbose_common ${destination_programs_static}
+ if [[ ${enable_static_programs} == "yes" && -d ${path_build}${path_programs}${path_static} && ! -d ${destination_programs_static} ]] ; then
+ mkdir ${verbose_common} ${destination_programs_static}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_programs_static}${c_error}.${c_reset}"
fi
fi
- if [[ $enable_shared_libraries == "yes" || $enable_static_libraries == "yes" ]] ; then
+ if [[ ${enable_shared_libraries} == "yes" || ${enable_static_libraries} == "yes" ]] ; then
if [[ -d ${path_build}${path_libraries} && ! -d ${destination_libraries} ]] ; then
- mkdir $verbose_common ${destination_libraries}
+ mkdir ${verbose_common} ${destination_libraries}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_libraries}${c_error}.${c_reset}"
fi
fi
- if [[ $enable_shared_libraries == "yes" && -d ${path_build}${path_libraries}${path_shared} && ! -d ${destination_libraries_shared} ]] ; then
- mkdir $verbose_common ${destination_libraries_shared}
+ if [[ ${enable_shared_libraries} == "yes" && -d ${path_build}${path_libraries}${path_shared} && ! -d ${destination_libraries_shared} ]] ; then
+ mkdir ${verbose_common} ${destination_libraries_shared}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_libraries_shared}${c_error}.${c_reset}"
fi
fi
- if [[ $enable_static_libraries == "yes" && -d ${path_build}${path_libraries}${path_static} && ! -d ${destination_libraries_static} ]] ; then
- mkdir $verbose_common ${destination_libraries_static}
+ if [[ ${enable_static_libraries} == "yes" && -d ${path_build}${path_libraries}${path_static} && ! -d ${destination_libraries_static} ]] ; then
+ mkdir ${verbose_common} ${destination_libraries_static}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_libraries_static}${c_error}.${c_reset}"
fi
fi
- if [[ $enable_includes == "yes" ]] ; then
+ if [[ ${enable_includes} == "yes" ]] ; then
if [[ -d ${path_build}${path_includes} && ! -d ${destination_includes} ]] ; then
- mkdir $verbose_common ${destination_includes}
+ mkdir ${verbose_common} ${destination_includes}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_includes}${c_error}.${c_reset}"
fi
fi
- if [[ $enable_documentation == "yes" ]] ; then
+ if [[ ${enable_documentation} == "yes" ]] ; then
if [[ -d ${path_build}${path_documentation} && ! -d ${destination_documentation} ]] ; then
- mkdir $verbose_common ${destination_documentation}
+ mkdir ${verbose_common} ${destination_documentation}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_documentation}${c_error}.${c_reset}"
fi
fi
- if [[ $enable_settings == "yes" ]] ; then
+ if [[ ${enable_settings} == "yes" ]] ; then
if [[ -d ${path_build}${path_settings} && ! -d ${destination_settings} ]] ; then
- mkdir $verbose_common ${destination_settings}
+ mkdir ${verbose_common} ${destination_settings}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_settings}${c_error}.${c_reset}"
fi
fi
- if [[ $failure == "" && -d ${path_build}${path_includes} && $enable_includes == "yes" ]] ; then
+ if [[ ${failure} == "" && -d ${path_build}${path_includes} && ${enable_includes} == "yes" ]] ; then
for i in ${path_build}${path_includes}* ; do
- file=$(echo $i | sed -e "s|^${path_build}${path_includes}||")
+ file=$(echo ${i} | sed -e "s|^${path_build}${path_includes}||")
break
done
- if [[ $file == "*" && ! -f "${path_build}${path_includes}*" ]] ; then
+ if [[ ${file} == "*" && ! -f "${path_build}${path_includes}*" ]] ; then
file=
fi
- if [[ $file != "" ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${file} != "" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
install_print_first_or_always
echo -e "${c_highlight}Installing Includes to: ${c_reset}${c_notice}${destination_includes}${c_reset}${c_highlight}.${c_reset}"
fi
- cp $verbose_common -R ${path_build}${path_includes}* ${destination_includes}
+ cp ${verbose_common} -R ${path_build}${path_includes}* ${destination_includes}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: Failed to copy include files from ${c_notice}${path_build}${path_includes}${c_error} to ${c_notice}${destination_includes}${c_error}.${c_reset}"
fi
fi
- if [[ $failure == "" && -d ${path_build}${path_libraries} && ( $enable_shared_libraries == "yes" || $enable_static_libraries == "yes" ) ]] ; then
- if [[ -d ${path_build}${path_libraries}${path_static} && $enable_static_libraries == "yes" ]] ; then
+ if [[ ${failure} == "" && -d ${path_build}${path_libraries} && ( ${enable_shared_libraries} == "yes" || ${enable_static_libraries} == "yes" ) ]] ; then
+ if [[ -d ${path_build}${path_libraries}${path_static} && ${enable_static_libraries} == "yes" ]] ; then
for i in ${path_build}${path_libraries}${path_static}* ; do
- file=$(echo $i | sed -e "s|^${path_build}${path_libraries}${path_static}||")
+ file=$(echo ${i} | sed -e "s|^${path_build}${path_libraries}${path_static}||")
break
done
- if [[ $file == "*" && ! -f "${path_build}${path_libraries}${path_static}*" ]] ; then
+ if [[ ${file} == "*" && ! -f "${path_build}${path_libraries}${path_static}*" ]] ; then
file=
fi
- if [[ $file != "" ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${file} != "" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
install_print_first_or_always
echo -e "${c_highlight}Installing (${c_notice}static${c_highlight}) Libraries to: ${c_reset}${c_notice}${destination_libraries_static}${c_reset}${c_highlight}.${c_reset}"
fi
- cp $verbose_common -R ${path_build}${path_libraries}${path_static}* ${destination_libraries_static}
+ cp ${verbose_common} -R ${path_build}${path_libraries}${path_static}* ${destination_libraries_static}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: Failed to copy (${c_notice}static${c_error}) library files from ${c_notice}${path_build}${path_libraries}${path_static}${c_error} to ${c_notice}${destination_libraries_static}${c_error}.${c_reset}"
fi
fi
- if [[ $failure == "" && -d ${path_build}${path_libraries}${path_shared} && $enable_shared_libraries == "yes" ]] ; then
+ if [[ ${failure} == "" && -d ${path_build}${path_libraries}${path_shared} && ${enable_shared_libraries} == "yes" ]] ; then
for i in ${path_build}${path_libraries}${path_shared}* ; do
- file=$(echo $i | sed -e "s|^${path_build}${path_libraries}${path_shared}||")
+ file=$(echo ${i} | sed -e "s|^${path_build}${path_libraries}${path_shared}||")
break
done
- if [[ $file == "*" && ! -f "${path_build}${path_libraries}${path_shared}*" ]] ; then
+ if [[ ${file} == "*" && ! -f "${path_build}${path_libraries}${path_shared}*" ]] ; then
file=
fi
- if [[ $file != "" ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${file} != "" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
install_print_first_or_always
echo -e "${c_highlight}Installing (${c_notice}shared${c_highlight}) Libraries to: ${c_reset}${c_notice}${destination_libraries_shared}${c_reset}${c_highlight}.${c_reset}"
fi
- cp $verbose_common -R ${path_build}${path_libraries}${path_shared}* ${destination_libraries_shared}
+ cp ${verbose_common} -R ${path_build}${path_libraries}${path_shared}* ${destination_libraries_shared}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: Failed to copy (${c_notice}shared${c_error}) library files from ${c_notice}${path_build}${path_libraries}${path_shared}${c_error} to ${c_notice}${destination_libraries_shared}${c_error}.${c_reset}"
fi
fi
- if [[ $failure == "" && -d ${path_build}${path_programs} && ( $enable_shared_programs == "yes" || $enable_static_programs == "yes" ) ]] ; then
- if [[ -d ${path_build}${path_programs}${path_static} && $enable_static_programs == "yes" ]] ; then
+ if [[ ${failure} == "" && -d ${path_build}${path_programs} && ( ${enable_shared_programs} == "yes" || ${enable_static_programs} == "yes" ) ]] ; then
+ if [[ -d ${path_build}${path_programs}${path_static} && ${enable_static_programs} == "yes" ]] ; then
for i in ${path_build}${path_programs}${path_static}* ; do
- file=$(echo $i | sed -e "s|^${path_build}${path_programs}${path_static}||")
+ file=$(echo ${i} | sed -e "s|^${path_build}${path_programs}${path_static}||")
break
done
- if [[ $file == "*" && ! -f "${path_build}${path_programs}${path_static}*" ]] ; then
+ if [[ ${file} == "*" && ! -f "${path_build}${path_programs}${path_static}*" ]] ; then
file=
fi
- if [[ $file != "" && $enable_static_programs == "yes" ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${file} != "" && ${enable_static_programs} == "yes" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
install_print_first_or_always
echo -e "${c_highlight}Installing (${c_notice}static${c_highlight}) Programs to: ${c_reset}${c_notice}${destination_programs_static}${c_reset}${c_highlight}.${c_reset}"
fi
- cp $verbose_common -R ${path_build}${path_programs}${path_static}* ${destination_programs_static}
+ cp ${verbose_common} -R ${path_build}${path_programs}${path_static}* ${destination_programs_static}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: failed to copy (${c_notice}static${c_error}) program files from ${c_notice}${path_build}${path_programs}${path_static}${c_error} to ${c_notice}${destination_programs_static}${c_error}.${c_reset}"
fi
fi
- if [[ $failure == "" && -d ${path_build}${path_programs}${path_shared} && $enable_shared_programs == "yes" ]] ; then
+ if [[ ${failure} == "" && -d ${path_build}${path_programs}${path_shared} && ${enable_shared_programs} == "yes" ]] ; then
for i in ${path_build}${path_programs}${path_shared}* ; do
- file=$(echo $i | sed -e "s|^${path_build}${path_programs}${path_shared}||")
+ file=$(echo ${i} | sed -e "s|^${path_build}${path_programs}${path_shared}||")
break
done
- if [[ $file == "*" && ! -f "${path_build}${path_programs}${path_shared}*" ]] ; then
+ if [[ ${file} == "*" && ! -f "${path_build}${path_programs}${path_shared}*" ]] ; then
file=
fi
- if [[ $file != "" ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${file} != "" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
install_print_first_or_always
echo -e "${c_highlight}Installing (${c_notice}shared${c_highlight}) Programs to: ${c_reset}${c_notice}${destination_programs_shared}${c_reset}${c_highlight}.${c_reset}"
fi
- cp $verbose_common -R ${path_build}${path_programs}${path_shared}* ${destination_programs_shared}
+ cp ${verbose_common} -R ${path_build}${path_programs}${path_shared}* ${destination_programs_shared}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: failed to copy (${c_notice}shared${c_error}) program files from ${c_notice}${path_build}${path_programs}${path_shared}${c_error} to ${c_notice}${destination_programs_shared}${c_error}.${c_reset}"
fi
fi
- if [[ $failure == "" && -d ${path_build}${path_settings} && $enable_settings == "yes" ]] ; then
+ if [[ ${failure} == "" && -d ${path_build}${path_settings} && ${enable_settings} == "yes" ]] ; then
for i in ${path_build}${path_settings}* ; do
- file=$(echo $i | sed -e "s|^${path_build}${path_settings}||")
+ file=$(echo ${i} | sed -e "s|^${path_build}${path_settings}||")
break
done
- if [[ $file == "*" && ! -f "${path_build}${path_settings}*" ]] ; then
+ if [[ ${file} == "*" && ! -f "${path_build}${path_settings}*" ]] ; then
file=
fi
- if [[ $file != "" ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${file} != "" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
install_print_first_or_always
echo -e "${c_highlight}Installing Settings to: ${c_reset}${c_notice}${destination_settings}${c_reset}${c_highlight}.${c_reset}"
fi
- cp $verbose_common -R ${path_build}${path_settings}* ${destination_settings}
+ cp ${verbose_common} -R ${path_build}${path_settings}* ${destination_settings}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: failed to copy settings files from ${c_notice}${path_build}${path_settings}${c_error} to ${c_notice}${destination_settings}${c_error}.${c_reset}"
fi
fi
- if [[ $failure == "" && -d ${path_build}${path_documentation} && $enable_documentation == "yes" ]] ; then
+ if [[ ${failure} == "" && -d ${path_build}${path_documentation} && ${enable_documentation} == "yes" ]] ; then
for i in ${path_build}${path_documentation}* ; do
- file=$(echo $i | sed -e "s|^${path_build}${path_documentation}||")
+ file=$(echo ${i} | sed -e "s|^${path_build}${path_documentation}||")
break
done
- if [[ $file == "*" && ! -f "${path_build}${path_documentation}*" ]] ; then
+ if [[ ${file} == "*" && ! -f "${path_build}${path_documentation}*" ]] ; then
file=
fi
- if [[ $file != "" ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${file} != "" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
install_print_first_or_always
echo -e "${c_highlight}Installing Documentation to: ${c_reset}${c_notice}${destination_documentation}${c_reset}${c_highlight}.${c_reset}"
fi
- cp $verbose_common -R ${path_build}${path_documentation}* ${destination_documentation}
+ cp ${verbose_common} -R ${path_build}${path_documentation}* ${destination_documentation}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
install_print_first
echo -e "${c_error}ERROR: failed to copy documentation files from ${c_notice}${path_build}${path_documentation}${c_error} to ${c_notice}${destination_documentation}${c_error}.${c_reset}"
fi
fi
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
return 0
fi
install_print_first() {
- if [[ $print_line_first == "yes" ]] ; then
+ if [[ ${print_line_first} == "yes" ]] ; then
echo
print_line_first=
install_print_first_or_always() {
- if [[ $print_line_first == "yes" ]] ; then
+ if [[ ${print_line_first} == "yes" ]] ; then
echo
print_line_first=
- elif [[ $print_line_first == "no" ]] ; then
+ elif [[ ${print_line_first} == "no" ]] ; then
print_line_first=
else
echo
install_print_last() {
- if [[ $print_line_last == "yes" ]] ; then
+ if [[ ${print_line_last} == "yes" ]] ; then
echo
fi
}
test_main() {
local shell_command=bash
- if [[ $SHELL_ENGINE == "zsh" ]] ; then
+ if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
shell_command=zsh
emulate ksh
local public_name="FLL Project Mass Test Script"
local system_name=install
- local called_name=$(basename $0)
+ local called_name=$(basename ${0})
local version=0.7.0
local grab_next=
local build_compiler=
local build_project=no
- local path_scripts=$PWD/build/scripts/
+ local build_project_thread="thread"
+ local path_scripts=${PWD}/build/scripts/
local path_scripts_package=${path_scripts}package.sh
- local path_test=$PWD/test/
+ local path_test=${PWD}/test/
local path_test_package=${path_test}package/
local path_test_project=${path_test}project/
local path_test_work=${path_test}work/
local print_line_first="yes"
local print_line_last="yes"
local test_system=
+ local test_thread="thread"
+ local test_thread_individual="thread_individual"
local context=
local failure=
if [[ $# -gt 0 ]] ; then
t=$#
- while [[ $i -lt $t ]] ; do
+ while [[ ${i} -lt ${t} ]] ; do
- let i=$i+1
+ let i=${i}+1
- if [[ $SHELL_ENGINE == "zsh" ]] ; then
+ if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
p=${(P)i}
else
p=${!i}
fi
- if [[ $grab_next == "" ]] ; then
- if [[ $p == "-h" || $p == "--help" ]] ; then
+ if [[ ${grab_next} == "" ]] ; then
+ if [[ ${p} == "-h" || ${p} == "--help" ]] ; then
do_help=yes
- elif [[ $p == "+C" || $p == "++copyright" ]] ; then
+ elif [[ ${p} == "+C" || ${p} == "++copyright" ]] ; then
do_copyright="yes"
- elif [[ $p == "+d" || $p == "++dark" ]] ; then
+ elif [[ ${p} == "+d" || ${p} == "++dark" ]] ; then
do_color=dark
context="+d"
- elif [[ $p == "+l" || $p == "++light" ]] ; then
+ elif [[ ${p} == "+l" || ${p} == "++light" ]] ; then
do_color=light
context="+l"
- elif [[ $p == "+n" || $p == "++no_color" ]] ; then
+ elif [[ ${p} == "+n" || ${p} == "++no_color" ]] ; then
do_color=none
context="+n"
- elif [[ $p == "+Q" || $p == "++quiet" ]] ; then
+ elif [[ ${p} == "+Q" || ${p} == "++quiet" ]] ; then
verbosity="quiet"
verbose="+Q"
verbose_common=
- elif [[ $p == "+E" || $p == "++error" ]] ; then
+ elif [[ ${p} == "+E" || ${p} == "++error" ]] ; then
verbosity="error"
verbose="+E"
verbose_common=
- elif [[ $p == "+N" || $p == "++normal" ]] ; then
+ elif [[ ${p} == "+N" || ${p} == "++normal" ]] ; then
verbosity=
verbose="+N"
verbose_common=
- elif [[ $p == "+V" || $p == "++verbose" ]] ; then
+ elif [[ ${p} == "+V" || ${p} == "++verbose" ]] ; then
verbosity="verbose"
verbose="+V"
verbose_common="-v"
- elif [[ $p == "+D" || $p == "++debug" ]] ; then
+ elif [[ ${p} == "+D" || ${p} == "++debug" ]] ; then
verbosity="debug"
verbose="+D"
verbose_common="-v"
- elif [[ $p == "+F" || $p == "++line_first_no" ]] ; then
+ elif [[ ${p} == "+F" || ${p} == "++line_first_no" ]] ; then
print_line_first="no"
- elif [[ $p == "+L" || $p == "++line_last_no" ]] ; then
+ elif [[ ${p} == "+L" || ${p} == "++line_last_no" ]] ; then
print_line_last="no"
- elif [[ $p == "+v" || $p == "++version" ]] ; then
- echo $version
+ elif [[ ${p} == "+v" || ${p} == "++version" ]] ; then
+ echo ${version}
return 0
- elif [[ $p == "-c" || $p == "--compiler" ]] ; then
+ elif [[ ${p} == "-c" || ${p} == "--compiler" ]] ; then
grab_next=build_compiler
- elif [[ $p == "-p" || $p == "--project" ]] ; then
+ elif [[ ${p} == "-p" || ${p} == "--project" ]] ; then
build_project=yes
- elif [[ $p == "-s" || $p == "--path_scripts" ]] ; then
+ elif [[ ${p} == "-s" || ${p} == "--path_scripts" ]] ; then
grab_next=path_scripts
path_scripts=
- elif [[ $p == "-t" || $p == "--path_test" ]] ; then
+ elif [[ ${p} == "-t" || ${p} == "--path_test" ]] ; then
grab_next=path_test
path_test=
- elif [[ $test_system == "" ]] ; then
- test_system="$p"
+ elif [[ ${p} == "-T" || ${p} == "--thread" ]] ; then
+ test_thread="thread"
+ test_thread_individual="thread_individual"
+ elif [[ ${p} == "-L" || ${p} == "--threadless" ]] ; then
+ test_thread="threadless"
+ test_thread_individual=""
+ elif [[ ${test_system} == "" ]] ; then
+ test_system="${p}"
else
- operation="$operation "
+ operation="${operation} "
operation_failure=fail-too_many
fi
else
- if [[ $grab_next == "build_compiler" ]] ; then
- build_compiler=$p
- elif [[ $grab_next == "path_scripts" ]] ; then
- path_scripts=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
+ if [[ ${grab_next} == "build_compiler" ]] ; then
+ build_compiler=${p}
+ elif [[ ${grab_next} == "path_scripts" ]] ; then
+ path_scripts=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
path_scripts_package=${path_scripts}package.sh
- elif [[ $grab_next == "path_test" ]] ; then
- path_test=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|')
+ elif [[ ${grab_next} == "path_test" ]] ; then
+ path_test=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|')
path_test_package=${path_test}package/
path_test_package_individual=${path_test_package}individual/
path_test_package_stand_alone=${path_test_package}stand_alone/
p=
fi
- if [[ $verbosity == "quiet" ]] ; then
+ if [[ ${verbosity} == "quiet" ]] ; then
print_line_first="no"
print_line_last="no"
fi
test_handle_colors
- if [[ $do_help == "yes" ]] ; then
+ if [[ ${do_help} == "yes" ]] ; then
test_help
test_cleanup
return 0
fi
- if [[ $do_copyright == "yes" ]] ; then
+ if [[ ${do_copyright} == "yes" ]] ; then
test_copyright
test_cleanup
return 0
fi
- if [[ $operation_failure == "fail-too_many" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${operation_failure} == "fail-too_many" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: Only a single build system is supported, received the following test systems ${c_notice}${test_system} ${operation}${c_error} was not recognized.${c_reset}"
let failure=1
fi
- if [[ $test_system == "" ]] ; then
+ if [[ ${test_system} == "" ]] ; then
test_system=normal
fi
- if [[ $grab_next != "build_compiler" && $build_compiler == "" ]] ; then
+ if [[ ${grab_next} != "build_compiler" && ${build_compiler} == "" ]] ; then
build_compiler=gcc
fi
- if [[ $failure -eq 0 && $test_system != "normal" && $test_system != "github" && $test_system != "gitlab" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${failure} -eq 0 && ${test_system} != "normal" && ${test_system} != "github" && ${test_system} != "gitlab" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: The test system must be one of ${c_notice}normal${c_error}, ${c_notice}github${c_error}, or ${c_notice}gitlab${c_error}.${c_reset}"
let failure=1
fi
- if [[ $failure -eq 0 && $build_compiler != "gcc" && $build_compiler != "clang" ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${failure} -eq 0 && ${build_compiler} != "gcc" && ${build_compiler} != "clang" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: The build compiler ${c_notice}${build_compiler}${c_error} is not currently directly supported.${c_reset}"
let failure=1
fi
- if [[ $failure -eq 0 && ! -d $path_scripts ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${failure} -eq 0 && ! -d ${path_scripts} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: The build scripts path ${c_notice}${path_scripts}${c_error} is not a valid directory.${c_reset}"
let failure=1
fi
- if [[ $failure -eq 0 && ! -f $path_scripts_package ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${failure} -eq 0 && ! -f ${path_scripts_package} ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: Unable to find the package build script file under the build scripts path at ${c_notice}${path_scripts_package}${c_error}.${c_reset}"
let failure=1
fi
- if [[ $failure -eq 0 && ! -d $path_test ]] ; then
- mkdir $verbose_common -p $path_test
+ if [[ ${failure} -eq 0 && ! -d ${path_test} ]] ; then
+ mkdir ${verbose_common} -p ${path_test}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: The test path ${c_notice}${path_test}${c_error}, does not exist and could not be created or exists and is not a valid directory.${c_reset}"
fi
fi
- if [[ $failure -eq 0 && ! -d $path_test_package ]] ; then
- mkdir $verbose_common $path_test_package
+ if [[ ${failure} -eq 0 && ! -d ${path_test_package} ]] ; then
+ mkdir ${verbose_common} ${path_test_package}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: The package path ${c_notice}${path_test_package}${c_error}, does not exist and could not be created or exists and is not a valid directory.${c_reset}"
fi
fi
- if [[ $failure -eq 0 && ! -d $path_test_project ]] ; then
- mkdir $verbose_common $path_test_project
+ if [[ ${failure} -eq 0 && ! -d ${path_test_project} ]] ; then
+ mkdir ${verbose_common} ${path_test_project}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: The test project path ${c_notice}${path_test_project}${c_error}, does not exist and could not be created or exists and is not a valid directory.${c_reset}"
fi
fi
- if [[ $failure -eq 0 && ! -d $path_test_work ]] ; then
- mkdir $verbose_common $path_test_work
+ if [[ ${failure} -eq 0 && ! -d ${path_test_work} ]] ; then
+ mkdir ${verbose_common} ${path_test_work}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: The test work path ${c_notice}${path_test_work}${c_error}, does not exist and could not be created or exists and is not a valid directory.${c_reset}"
fi
fi
- if [[ $failure -eq 0 ]] ; then
+ if [[ ${failure} -eq 0 ]] ; then
test_operate
let failure=$?
fi
- if [[ $verbosity != "quiet" ]] ; then
- if [[ $failure != "" || $verbosity != "error" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
+ if [[ ${failure} != "" || ${verbosity} != "error" ]] ; then
test_print_last
fi
fi
test_cleanup
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
return 0
fi
test_handle_colors() {
- if [[ $do_color == "light" ]] ; then
+ if [[ ${do_color} == "light" ]] ; then
c_error="\\033[1;31m"
c_warning="\\033[0;31m"
c_title="\\033[1;34m"
c_highlight="\\033[0;34m"
c_notice="\\033[0;01m"
c_important="\\033[0;35m"
- elif [[ $do_color == "none" ]] ; then
+ elif [[ ${do_color} == "none" ]] ; then
c_reset=
c_title=
c_error=
echo -e " ${c_important}github${c_reset} Perform a test meant to be used within Github."
echo -e " ${c_important}gitlab${c_reset} Perform a test meant to be used within Gitlab (not yet supported)."
echo
- echo -e "${c_highlight}Options:${c_reset}"
+ echo -e "${c_highlight}Available Options:${c_reset}"
echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message."
echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright."
echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds."
echo -e " +${c_important}F${c_reset}, ++${c_important}line_first_no${c_reset} Disable printing of first line."
echo -e " +${c_important}L${c_reset}, ++${c_important}line_last_no${c_reset} Disable printing of last line."
echo
- echo -e "${c_highlight}Install Options:${c_reset}"
echo -e " -${c_important}c${c_reset}, --${c_important}compiler${c_reset} Specify the compiler, either gcc (default) or clang."
echo -e " -${c_important}p${c_reset}, --${c_important}project${c_reset} Designate that the project files must also be built."
echo -e " -${c_important}s${c_reset}, --${c_important}path_scripts${c_reset} Specify a custom directory where the build scripts are found."
echo -e " -${c_important}t${c_reset}, --${c_important}path_test${c_reset} Specify a custom directory where the test environment is found."
+ echo -e " -${c_important}T${c_reset}, --${c_important}thread${c_reset} Compile code being tested with threads enabled."
+ echo -e " -${c_important}L${c_reset}, --${c_important}threadless${c_reset} Compile code being tested with threads disabled."
test_print_last
}
local libraries_path="${work_path}libraries/shared/"
local ci_arguments=
- if [[ $PATH != "" ]] ; then
+ if [[ ${PATH} != "" ]] ; then
env_path="${env_path}:${PATH}"
fi
- if [[ $LD_LIBRARY_PATH != "" ]] ; then
+ if [[ ${LD_LIBRARY_PATH} != "" ]] ; then
env_libs="${env_libs}:${LD_LIBRARY_PATH}"
fi
- if [[ $test_system == "github" || $test_system == "gitlab" ]] ; then
+ if [[ ${test_system} == "github" || ${test_system} == "gitlab" ]] ; then
ci_arguments="-d -I${includes_path} -d -L${libraries_path}"
test_operate_ci_prebuild
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
let failure=1
return 1
fi
fi
- if [[ $build_project == "yes" ]] ; then
+ if [[ ${build_project} == "yes" ]] ; then
test_operate_build_tools
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
let failure=1
return 1
test_operate_build_individual
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
let failure=1
return 1
fi
- if [[ $test_system == "github" || $test_system == "gitlab" ]] ; then
+ if [[ ${test_system} == "github" || ${test_system} == "gitlab" ]] ; then
test_operate_ci_pretest
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
let failure=1
return 1
test_operate_build_individual() {
local project=
- local path_original="$PWD/"
+ local path_original="${PWD}/"
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
test_print_first_or_always
echo -e "${c_highlight}Cleaning and building package.${c_reset}"
echo
fi
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- echo "$shell_command ${path_scripts_package} $verbose $context +F -d $path_test_package -i rebuild"
+ echo "${shell_command} ${path_scripts_package} ${verbose} ${context} +F -d ${path_test_package} -i rebuild"
fi
- $shell_command ${path_scripts_package} $verbose $context +F -d $path_test_package -i rebuild
+ ${shell_command} ${path_scripts_package} ${verbose} ${context} +F -d ${path_test_package} -i rebuild
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: Failed to clean and build the individual packages.${c_reset}"
return 1
fi
- for project in $projects ; do
+ for project in ${projects} ; do
- test_operate_build_project "$path_test_package_individual" "$path_test_work" "$project" individual
+ test_operate_build_project "${path_test_package_individual}" "${path_test_work}" "${project}" individual ${test_thread} ${test_thread_individual}
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
let failure=1
- cd $path_original
+ cd ${path_original}
break;
fi
- cd $path_original
+ cd ${path_original}
done
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
return 0
fi
}
test_operate_build_project() {
- local path_="$1"
- local destination="$2"
- local project="$3"
- local mode="$4"
- local bootstrap="$5"
+ local path_="${1}"
+ local destination="${2}"
+ local project="${3}"
+ local mode="${4}"
+ local bootstrap="${5}"
+ local mode_thread_param=
+ local mode_thread_value=
+ local mode_thread_individual_param=
+ local mode_thread_individual_value=
+
+ if [[ ${6} != "" ]] ; then
+ local mode_thread_param="-m"
+ local mode_thread_value="${6}"
+ fi
+
+ if [[ ${7} != "" ]] ; then
+ local mode_thread_individual_param="-m"
+ local mode_thread_individual_value="${7}"
+ fi
if [[ ! -d ${path_}${project}-${version}/ ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: Package directory '${c_notice}${path_}${project}-${version}${c_error}' is invalid or missing.${c_reset}"
return 1
fi
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
echo -e "Running '${c_notice}cd ${path_}${project}-${version}/${c_reset}'."
cd ${path_}${project}-${version}/
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: Failed to change into directory '${c_notice}${path_}${project}-${version}${c_error}'.${c_reset}"
return 1
fi
- if [[ $bootstrap == "" ]] ; then
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${bootstrap} == "" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- if [[ $build_compiler == "gcc" ]] ; then
- echo "PATH=\"$env_path\" LD_LIBRARY_PATH=\"$env_libs\" fake $verbose $context -w \"$destination\" -m $mode clean build $ci_arguments"
+ if [[ ${build_compiler} == "gcc" ]] ; then
+ echo "PATH=\"${env_path}\" LD_LIBRARY_PATH=\"${env_libs}\" fake ${verbose} ${context} -w \"${destination}\" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} clean build ${ci_arguments}"
else
- echo "PATH=\"$env_path\" LD_LIBRARY_PATH=\"$env_libs\" fake $verbose $context -w \"$destination\" -m $mode -m $build_compiler clean make -f testfile $ci_arguments"
+ echo "PATH=\"${env_path}\" LD_LIBRARY_PATH=\"${env_libs}\" fake ${verbose} ${context} -w \"${destination}\" -m ${mode} ${mode_thread_param} ${mode_thread_value} -m ${build_compiler} ${mode_thread_individual_param} ${mode_thread_individual_value} clean make -f testfile ${ci_arguments}"
fi
fi
- if [[ $build_compiler == "gcc" ]] ; then
- PATH="$env_path" LD_LIBRARY_PATH="$env_libs" fake $verbose $context -w "$destination" -m $mode -m test clean build $ci_arguments
+ if [[ ${build_compiler} == "gcc" ]] ; then
+ PATH="${env_path}" LD_LIBRARY_PATH="${env_libs}" fake ${verbose} ${context} -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test clean build ${ci_arguments}
else
- PATH="$env_path" LD_LIBRARY_PATH="$env_libs" fake $verbose $context -w "$destination" -m $mode -m test -m $build_compiler clean build $ci_arguments
+ PATH="${env_path}" LD_LIBRARY_PATH="${env_libs}" fake ${verbose} ${context} -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test -m ${build_compiler} clean build ${ci_arguments}
fi
else
- if [[ $SHELL_ENGINE == "zsh" ]] ; then
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- if [[ $build_compiler == "gcc" ]] ; then
- echo "zsh ./bootstrap.sh $verbose $context +F -w \"$destination\" -m $mode -m test build"
+ if [[ ${build_compiler} == "gcc" ]] ; then
+ echo "zsh ./bootstrap.sh ${verbose} ${context} +F -w \"${destination}\" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test build"
else
- echo "zsh ./bootstrap.sh $verbose $context +F -w \"$destination\" -m $mode -m test -m $build_compiler build"
+ echo "zsh ./bootstrap.sh ${verbose} ${context} +F -w \"${destination}\" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test -m ${build_compiler} build"
fi
fi
- if [[ $build_compiler == "gcc" ]] ; then
- zsh ./bootstrap.sh $verbose $context +F -w "$destination" -m $mode -m test build
+ if [[ ${build_compiler} == "gcc" ]] ; then
+ zsh ./bootstrap.sh ${verbose} ${context} +F -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test build
else
- zsh ./bootstrap.sh $verbose $context +F -w "$destination" -m $mode -m test -m $build_compiler build
+ zsh ./bootstrap.sh ${verbose} ${context} +F -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test -m ${build_compiler} build
fi
else
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- if [[ $build_compiler == "gcc" ]] ; then
- echo "./bootstrap.sh $verbose $context +F -w \"$destination\" -m $mode -m test build"
+ if [[ ${build_compiler} == "gcc" ]] ; then
+ echo "./bootstrap.sh ${verbose} ${context} +F -w \"${destination}\" -m ${mode} ${mode_thread_individual_param} ${mode_thread_individual_value} ${mode_thread_param} ${mode_thread_value} -m test build"
else
- echo "./bootstrap.sh $verbose $context +F -w \"$destination\" -m $mode -m test -m $build_compiler build"
+ echo "./bootstrap.sh ${verbose} ${context} +F -w \"${destination}\" -m ${mode} ${mode_thread_individual_param} ${mode_thread_individual_value} ${mode_thread_param} ${mode_thread_value} -m test -m ${build_compiler} build"
fi
fi
- if [[ $build_compiler == "gcc" ]] ; then
- ./bootstrap.sh $verbose $context +F -w "$destination" -m $mode -m test build
+ if [[ ${build_compiler} == "gcc" ]] ; then
+ ./bootstrap.sh ${verbose} ${context} +F -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test build
else
- ./bootstrap.sh $verbose $context +F -w "$destination" -m $mode -m test -m $build_compiler build
+ ./bootstrap.sh ${verbose} ${context} +F -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test -m ${build_compiler} build
fi
fi
fi
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
- echo -e "${c_error}ERROR: Failed to build $mode project '${c_notice}$project${c_reset}${c_error}'.${c_reset}"
+ echo -e "${c_error}ERROR: Failed to build ${mode} project '${c_notice}${project}${c_reset}${c_error}'.${c_reset}"
fi
let failure=1
return 1
fi
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
- echo -e "Installing $mode project '${c_notice}$project${c_reset}'."
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
+ echo -e "Installing ${mode} project '${c_notice}${project}${c_reset}'."
echo
fi
- if [[ $SHELL_ENGINE == "zsh" ]] ; then
- zsh ./install.sh $verbose $context +F +L -w "$destination"
+ if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
+ zsh ./install.sh ${verbose} ${context} +F +L -w "${destination}"
else
- ./install.sh $verbose $context +F +L -w "$destination"
+ ./install.sh ${verbose} ${context} +F +L -w "${destination}"
fi
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
- echo -e "${c_error}ERROR: Failed to install $mode project '${c_notice}$project${c_reset}${c_error}'.${c_reset}"
+ echo -e "${c_error}ERROR: Failed to install ${mode} project '${c_notice}${project}${c_reset}${c_error}'.${c_reset}"
fi
let failure=1
}
test_operate_build_tools() {
- local path_original="$PWD/"
+ local path_original="${PWD}/"
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
test_print_first_or_always
echo -e "${c_highlight}Building project build tools.${c_reset}"
echo
fi
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- echo "$shell_command ${path_scripts_package} $verbose $context +F -d $path_test_package -S fake rebuild"
+ echo "${shell_command} ${path_scripts_package} ${verbose} ${context} +F -d ${path_test_package} -S fake rebuild"
fi
- $shell_command ${path_scripts_package} $verbose $context +F -d $path_test_package -S fake rebuild
+ ${shell_command} ${path_scripts_package} ${verbose} ${context} +F -d ${path_test_package} -S fake rebuild
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: Failed to clean and build the stand_alone fake package.${c_reset}"
return 1
fi
- test_operate_build_project "$path_test_package_stand_alone" "$path_test_project" fake stand_alone bootstrap
+ test_operate_build_project "${path_test_package_stand_alone}" "${path_test_project}" fake stand_alone bootstrap ${build_project_thread}
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
let failure=1
fi
- cd $path_original
+ cd ${path_original}
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
return 0
fi
test_operate_ci_prebuild() {
local clone_quiet=
- local path_original="$PWD/"
+ local path_original="${PWD}/"
local result=
- if [[ $verbosity == "quiet" ]] ; then
+ if [[ ${verbosity} == "quiet" ]] ; then
clone_quiet="-q"
fi
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
test_print_first_or_always
echo -e "${c_highlight}Performing Github Specific Pre-Build Operations.${c_reset}"
test_operate_ci_prebuild_libcap
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
let failure=1
fi
cd ${path_original}
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
return 0
fi
test_operate_ci_pretest() {
local clone_quiet=
- local path_original="$PWD/"
+ local path_original="${PWD}/"
local result=
- if [[ $verbosity == "quiet" ]] ; then
+ if [[ ${verbosity} == "quiet" ]] ; then
clone_quiet="-q"
fi
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
test_print_first_or_always
echo -e "${c_highlight}Performing Github Specific Pre-Test Operations.${c_reset}"
test_operate_ci_pretest_cmocka
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
let failure=1
fi
cd ${path_original}
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
return 0
fi
local cmocka_uri="https://github.com/coreboot/cmocka.git"
local cmocka_branch="cmocka-1.1.5"
- if [[ -d $cmocka_path ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ -d ${cmocka_path} ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
test_print_first_or_always
- echo -e "Detected existing cmocka repository at \"${c_notice}$cmocka_path${c_reset}\", skipping the cmocka process."
+ echo -e "Detected existing cmocka repository at \"${c_notice}${cmocka_path}${c_reset}\", skipping the cmocka process."
fi
return 0
fi
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- echo "git clone $clone_quiet --single-branch -b $cmocka_branch \"$cmocka_uri\" $cmocka_path"
+ echo "git clone ${clone_quiet} --single-branch -b ${cmocka_branch} \"${cmocka_uri}\" ${cmocka_path}"
fi
- git clone $clone_quiet --single-branch -b $cmocka_branch "$cmocka_uri" $cmocka_path
+ git clone ${clone_quiet} --single-branch -b ${cmocka_branch} "${cmocka_uri}" ${cmocka_path}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
- echo -e "${c_error}ERROR: Failed to git clone '${c_notice}$cmocka_uri${c_error}' onto '${c_notice}$cmocka_path${c_error}'.${c_reset}"
+ echo -e "${c_error}ERROR: Failed to git clone '${c_notice}${cmocka_uri}${c_error}' onto '${c_notice}${cmocka_path}${c_error}'.${c_reset}"
fi
let failure=1
return 1
fi
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- echo "mkdir $verbose_common -p $cmocka_data"
+ echo "mkdir ${verbose_common} -p ${cmocka_data}"
fi
- mkdir $verbose_common -p $cmocka_data
+ mkdir ${verbose_common} -p ${cmocka_data}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
- echo -e "${c_error}ERROR: Failed to create cmocka build data directory '${c_notice}$cmocka_data${c_error}'.${c_reset}"
+ echo -e "${c_error}ERROR: Failed to create cmocka build data directory '${c_notice}${cmocka_data}${c_error}'.${c_reset}"
fi
let failure=1
return 1
fi
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- echo "cp $verbose_common $cmocka_settings $cmocka_data"
+ echo "cp ${verbose_common} ${cmocka_settings} ${cmocka_data}"
fi
- cp $verbose_common $cmocka_settings $cmocka_data
+ cp ${verbose_common} ${cmocka_settings} ${cmocka_data}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
- echo -e "${c_error}ERROR: Failed to copy cmocka build settings: '${c_notice}$cmocka_settings${c_error}'.${c_reset}"
+ echo -e "${c_error}ERROR: Failed to copy cmocka build settings: '${c_notice}${cmocka_settings}${c_error}'.${c_reset}"
fi
let failure=1
return 1
fi
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- echo "cd $cmocka_path"
+ echo "cd ${cmocka_path}"
fi
- cd $cmocka_path
+ cd ${cmocka_path}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
- echo -e "${c_error}ERROR: Failed to change cmocka source directory '${c_notice}$cmocka_path${c_error}'.${c_reset}"
+ echo -e "${c_error}ERROR: Failed to change cmocka source directory '${c_notice}${cmocka_path}${c_error}'.${c_reset}"
fi
let failure=1
return 1
fi
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- echo "PATH=\"$env_path\" LD_LIBRARY_PATH=\"$env_libs\" fake $verbose $context -w \"$path_test_work\" -m $build_compiler clean build $ci_arguments"
+ echo "PATH=\"${env_path}\" LD_LIBRARY_PATH=\"${env_libs}\" fake ${verbose} ${context} -w \"${path_test_work}\" -m ${build_compiler} -m ${test_thread} clean build ${ci_arguments}"
fi
- PATH="$env_path" LD_LIBRARY_PATH="$env_libs" fake $verbose $context -w "$path_test_work" -m $build_compiler clean build $ci_arguments
+ PATH="${env_path}" LD_LIBRARY_PATH="${env_libs}" fake ${verbose} ${context} -w "${path_test_work}" -m ${build_compiler} -m ${test_thread} clean build ${ci_arguments}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: Failed to build '${c_notice}cmocka${c_error}'.${c_reset}"
return 1
fi
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- echo "cp $verbose_common -R ${cmocka_build}includes/* ${work_path}includes/"
+ echo "cp ${verbose_common} -R ${cmocka_build}includes/* ${work_path}includes/"
fi
- cp $verbose_common -R ${cmocka_build}includes/* ${work_path}includes/
+ cp ${verbose_common} -R ${cmocka_build}includes/* ${work_path}includes/
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: Failed to install cmocka headers to '${c_notice}${work_path}includes/${c_error}'.${c_reset}"
return 1
fi
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- echo "cp $verbose_common -R ${cmocka_build}libraries/shared/* ${work_path}libraries/shared/"
+ echo "cp ${verbose_common} -R ${cmocka_build}libraries/shared/* ${work_path}libraries/shared/"
fi
- cp $verbose_common -R ${cmocka_build}libraries/shared/* ${work_path}libraries/shared/
+ cp ${verbose_common} -R ${cmocka_build}libraries/shared/* ${work_path}libraries/shared/
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: Failed to install cmocka libraries to '${c_notice}${work_path}libraries/shared/${c_error}'.${c_reset}"
local libcap_uri="https://github.com/thekevinday/kernel.org-libcap.git"
local libcap_branch="master"
- if [[ -d $libcap_path ]] ; then
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ -d ${libcap_path} ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
test_print_first_or_always
- echo -e "Detected existing libcap repository at \"${c_notice}$libcap_path${c_reset}\", skipping the libcap process."
+ echo -e "Detected existing libcap repository at \"${c_notice}${libcap_path}${c_reset}\", skipping the libcap process."
fi
return 0
fi
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- echo "git clone $clone_quiet --single-branch -b $libcap_branch \"$libcap_uri\" $libcap_path"
+ echo "git clone ${clone_quiet} --single-branch -b ${libcap_branch} \"${libcap_uri}\" ${libcap_path}"
fi
- git clone $clone_quiet --single-branch -b $libcap_branch "$libcap_uri" $libcap_path
+ git clone ${clone_quiet} --single-branch -b ${libcap_branch} "${libcap_uri}" ${libcap_path}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
- echo -e "${c_error}ERROR: Failed to git clone '${c_notice}$libcap_uri${c_error}' onto '${c_notice}$libcap_path${c_error}'.${c_reset}"
+ echo -e "${c_error}ERROR: Failed to git clone '${c_notice}${libcap_uri}${c_error}' onto '${c_notice}${libcap_path}${c_error}'.${c_reset}"
fi
let failure=1
return 1
fi
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- echo "cd $libcap_path"
+ echo "cd ${libcap_path}"
fi
- cd $libcap_path
+ cd ${libcap_path}
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
- echo -e "${c_error}ERROR: Failed to change libcap source directory '${c_notice}$libcap_path${c_error}'.${c_reset}"
+ echo -e "${c_error}ERROR: Failed to change libcap source directory '${c_notice}${libcap_path}${c_error}'.${c_reset}"
test_print_last
fi
return 1
fi
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
echo "make MANDIR=${work_path}fake/ SBINDIR=${work_path}fake/ INCDIR=${work_path}includes/ LIBDIR=${work_path}libraries/shared/ PKGCONFIGDIR=${work_path}fake/ install"
make MANDIR=${work_path}fake/ SBINDIR=${work_path}fake/ INCDIR=${work_path}includes/ LIBDIR=${work_path}libraries/shared/ PKGCONFIGDIR=${work_path}fake/ install
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
echo -e "${c_error}ERROR: Failed to build and install libcap into the work directory '${c_notice}${work_path}${c_error}'.${c_reset}"
test_operate_tests() {
local project=
- local path_original="$PWD/"
- local destination="$path_test_work"
+ local path_original="${PWD}/"
+ local destination="${path_test_work}"
+ local thread_individual_param=
+ local thread_individual_value="${test_thread_individual}"
+
+ if [[ ${test_thread_individual} != "" ]] ; then
+ thread_individual_param="-m"
+ fi
- for project in $projects ; do
+ for project in ${projects} ; do
- if [[ $verbosity != "quiet" && $verbosity != "error" ]] ; then
+ if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
test_print_first_or_always
- echo -e "${c_highlight}Testing Project $project.${c_reset}"
+ echo -e "${c_highlight}Testing Project ${project}.${c_reset}"
echo -e "${c_title}--------------------------------------${c_reset}"
echo
fi
- if [[ ! -d $path_test_package_individual$project-$version/ ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ! -d ${path_test_package_individual}${project}-${version}/ ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
- echo -e "${c_error}ERROR: Package directory '${c_notice}$path_test_package_individual$project-$version${c_error}' is invalid or missing.${c_reset}"
+ echo -e "${c_error}ERROR: Package directory '${c_notice}${path_test_package_individual}${project}-${version}${c_error}' is invalid or missing.${c_reset}"
test_print_last
fi
let failure=1
fi
- if [[ $failure == "" ]] ; then
- if [[ ! -f $path_test_package_individual$project-$version/data/build/testfile ]] ; then
- if [[ $(echo $projects_no_tests | grep -o "\<$project\>") == "" ]] ; then
- if [[ $verbosity == "verbose" || $verbosity == "debug" ]] ; then
+ if [[ ${failure} == "" ]] ; then
+ if [[ ! -f ${path_test_package_individual}${project}-${version}/data/build/testfile ]] ; then
+ if [[ $(echo ${projects_no_tests} | grep -o "\<${project}\>") == "" ]] ; then
+ if [[ ${verbosity} == "verbose" || ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- echo -e "${c_warning}WARNING: Project '${c_notice}$project${c_warning}' does not have a testfile.${c_reset}"
+ echo -e "${c_warning}WARNING: Project '${c_notice}${project}${c_warning}' does not have a testfile.${c_reset}"
fi
else
test_print_first_or_always
- echo -e "Project '${c_notice}$project${c_reset}' has no tests and is not expected to.${c_reset}"
+ echo -e "Project '${c_notice}${project}${c_reset}' has no tests and is not expected to.${c_reset}"
fi
continue
fi
fi
- if [[ $failure == "" ]] ; then
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${failure} == "" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- echo -e "Running '${c_notice}cd $path_test_package_individual$project-$version/${c_reset}'."
+ echo -e "Running '${c_notice}cd ${path_test_package_individual}${project}-${version}/${c_reset}'."
fi
- cd $path_test_package_individual$project-$version/
+ cd ${path_test_package_individual}${project}-${version}/
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
- echo -e "${c_error}ERROR: Failed to change into directory '${c_notice}$path_test_package_individual$project-$version${c_error}'.${c_reset}"
+ echo -e "${c_error}ERROR: Failed to change into directory '${c_notice}${path_test_package_individual}${project}-${version}${c_error}'.${c_reset}"
test_print_last
fi
fi
fi
- if [[ $failure == "" ]] ; then
- if [[ $verbosity == "debug" ]] ; then
+ if [[ ${failure} == "" ]] ; then
+ if [[ ${verbosity} == "debug" ]] ; then
test_print_first_or_always
- if [[ $build_compiler == "gcc" ]] ; then
- echo "PATH=\"$env_path\" LD_LIBRARY_PATH=\"$env_libs\" fake $verbose $context -w \"$destination\" -m individual -m test clean make -f testfile $ci_arguments"
+ if [[ ${build_compiler} == "gcc" ]] ; then
+ echo "PATH=\"${env_path}\" LD_LIBRARY_PATH=\"${env_libs}\" fake ${verbose} ${context} -w \"${destination}\" -m individual -m ${test_thread} ${thread_individual_param} ${thread_individual_value} -m test clean make -f testfile ${ci_arguments}"
else
- echo "PATH=\"$env_path\" LD_LIBRARY_PATH=\"$env_libs\" fake $verbose $context -w \"$destination\" -m individual -m test -m $build_compiler clean make -f testfile $ci_arguments"
+ echo "PATH=\"${env_path}\" LD_LIBRARY_PATH=\"${env_libs}\" fake ${verbose} ${context} -w \"${destination}\" -m individual -m ${test_thread} ${thread_individual_param} ${thread_individual_value} -m test -m ${build_compiler} clean make -f testfile ${ci_arguments}"
fi
fi
- if [[ $build_compiler == "gcc" ]] ; then
- PATH="$env_path" LD_LIBRARY_PATH="$env_libs" fake $verbose $context -w "$destination" -m individual -m test clean make -f testfile $ci_arguments
+ if [[ ${build_compiler} == "gcc" ]] ; then
+ PATH="${env_path}" LD_LIBRARY_PATH="${env_libs}" fake ${verbose} ${context} -w "${destination}" -m individual -m ${test_thread} ${thread_individual_param} ${thread_individual_value} -m test clean make -f testfile ${ci_arguments}
else
- PATH="$env_path" LD_LIBRARY_PATH="$env_libs" fake $verbose $context -w "$destination" -m individual -m test -m $build_compiler clean make -f testfile $ci_arguments
+ PATH="${env_path}" LD_LIBRARY_PATH="${env_libs}" fake ${verbose} ${context} -w "${destination}" -m individual -m ${test_thread} ${thread_individual_param} ${thread_individual_value} -m test -m ${build_compiler} clean make -f testfile ${ci_arguments}
fi
- if [[ $? -ne 0 ]] ; then
- if [[ $verbosity != "quiet" ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
+ if [[ ${verbosity} != "quiet" ]] ; then
test_print_first
- echo -e "${c_error}ERROR: Failure while testing project '${c_notice}$project${c_reset}${c_error}'.${c_reset}"
+ echo -e "${c_error}ERROR: Failure while testing project '${c_notice}${project}${c_reset}${c_error}'.${c_reset}"
test_print_last
fi
fi
fi
- cd $path_original
+ cd ${path_original}
- if [[ $failure != "" ]] ; then
+ if [[ ${failure} != "" ]] ; then
break;
fi
done
- if [[ $failure == "" ]] ; then
+ if [[ ${failure} == "" ]] ; then
return 0
fi
test_print_first() {
- if [[ $print_line_first == "yes" ]] ; then
+ if [[ ${print_line_first} == "yes" ]] ; then
echo
print_line_first=
test_print_first_or_always() {
- if [[ $print_line_first == "yes" ]] ; then
+ if [[ ${print_line_first} == "yes" ]] ; then
echo
print_line_first=
- elif [[ $print_line_first == "no" ]] ; then
+ elif [[ ${print_line_first} == "no" ]] ; then
print_line_first=
else
echo
test_print_last() {
- if [[ $print_line_last == "yes" ]] ; then
+ if [[ ${print_line_last} == "yes" ]] ; then
echo
fi
}
#define _di_f_signal_set_has_
#define _di_f_signal_suspend_
//#define _di_f_signal_t_
-#define _di_f_signal_wait_
+//#define _di_f_signal_wait_
#define _di_f_signal_wait_until_
#define _di_f_states_adjust_
#define _di_f_thread_attribute_stack_set_
#define _di_f_thread_attribute_stack_size_get_
#define _di_f_thread_attribute_stack_size_set_
-#define _di_f_thread_attribute_t_
+//#define _di_f_thread_attribute_t_
#define _di_f_thread_barrier_attribute_create_
#define _di_f_thread_barrier_attribute_delete_
#define _di_f_thread_barrier_attributes_adjust_
#define _di_f_thread_barrier_t_
#define _di_f_thread_barrier_wait_
#define _di_f_thread_caller_
-#define _di_f_thread_cancel_
-#define _di_f_thread_cancel_state_set_
+//#define _di_f_thread_cancel_
+//#define _di_f_thread_cancel_state_set_
#define _di_f_thread_cancel_test_
#define _di_f_thread_cancel_type_set_
#define _di_f_thread_clock_get_id_
#define _di_f_thread_condition_t_
#define _di_f_thread_condition_wait_
#define _di_f_thread_condition_wait_timed_
-#define _di_f_thread_create_
+//#define _di_f_thread_create_
#define _di_f_thread_detach_
#define _di_f_thread_exit_
#define _di_f_thread_ids_adjust_
#define _di_f_thread_ids_increase_by_
#define _di_f_thread_ids_resize_
#define _di_f_thread_ids_t_
-#define _di_f_thread_id_t_
-#define _di_f_thread_join_
+//#define _di_f_thread_id_t_
+//#define _di_f_thread_join_
#define _di_f_thread_join_timed_
#define _di_f_thread_join_try_
#define _di_f_thread_key_create_
# fss-0001
#
# A custom build for compiling fake as a stand alone binary building in all of the FLL dependencies.
-# This will compile a program that does not have a libfake.so library.
+# This will compile a program that does not have a libfake.so library and builds all of the FLL dependencies into the resulting program.
+#
+# Modes:
+# - stand_alone: The stand alone build mode, which in general should always be used.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
#
build_name fake
version_file micro
version_target minor
-modes stand_alone clang fanalyzer
-modes_default stand_alone
+modes stand_alone clang test fanalyzer thread threadless
+modes_default stand_alone thread
build_compiler gcc
build_compiler-clang clang
build_sources_program fll/level_0/signal.c
build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/private-dynamic.c fll/level_0/string/private-dynamics.c fll/level_0/string/private-dynamicss.c fll/level_0/string/private-maps.c fll/level_0/string/private-mapss.c fll/level_0/string/private-map_multis.c fll/level_0/string/private-map_multiss.c fll/level_0/string/private-quantitys.c fll/level_0/string/private-quantityss.c fll/level_0/string/private-ranges.c fll/level_0/string/private-rangess.c fll/level_0/string/private-triples.c fll/level_0/string/private-tripless.c
build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/quantity.c fll/level_0/string/quantitys.c fll/level_0/string/quantityss.c fll/level_0/string/range.c fll/level_0/string/ranges.c fll/level_0/string/rangess.c fll/level_0/string/static.c fll/level_0/string/statics.c fll/level_0/string/staticss.c fll/level_0/string/triple.c fll/level_0/string/triples.c fll/level_0/string/tripless.c
-build_sources_program fll/level_0/thread.c fll/level_0/private-thread.c fll/level_0/thread/attribute.c fll/level_0/thread/barrier.c fll/level_0/thread/barrier_attribute.c fll/level_0/thread/condition.c fll/level_0/thread/condition_attribute.c fll/level_0/thread/id.c fll/level_0/thread/key.c fll/level_0/thread/lock.c fll/level_0/thread/lock_attribute.c fll/level_0/thread/mutex.c fll/level_0/thread/mutex_attribute.c fll/level_0/thread/once.c fll/level_0/thread/semaphore.c fll/level_0/thread/set.c fll/level_0/thread/spin.c
build_sources_program fll/level_0/type_array/array_length.c fll/level_0/type_array/cell.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
build_sources_program fll/level_0/type_array/private-array_length.c fll/level_0/type_array/private-cell.c fll/level_0/type_array/private-fll_id.c fll/level_0/type_array/private-int8.c fll/level_0/type_array/private-int16.c fll/level_0/type_array/private-int32.c fll/level_0/type_array/private-int64.c fll/level_0/type_array/private-int128.c fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.c fll/level_0/type_array/private-uint8.c fll/level_0/type_array/private-uint16.c fll/level_0/type_array/private-uint32.c fll/level_0/type_array/private-uint64.c fll/level_0/type_array/private-uint128.c
build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c
build_sources_program fll/level_0/utf/common.c fll/level_0/utf/convert.c fll/level_0/utf/dynamic.c fll/level_0/utf/dynamics.c fll/level_0/utf/dynamicss.c fll/level_0/utf/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/maps.c fll/level_0/utf/mapss.c fll/level_0/utf/map_multi.c fll/level_0/utf/map_multis.c fll/level_0/utf/map_multiss.c fll/level_0/utf/static.c fll/level_0/utf/statics.c fll/level_0/utf/staticss.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/triples.c fll/level_0/utf/tripless.c
build_sources_program fll/level_0/utf/private-dynamic.c fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-dynamicss.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-mapss.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-map_multiss.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c fll/level_0/utf/private-tripless.c
+build_sources_program-thread fll/level_0/thread.c fll/level_0/private-thread.c fll/level_0/thread/attribute.c fll/level_0/thread/barrier.c fll/level_0/thread/barrier_attribute.c fll/level_0/thread/condition.c fll/level_0/thread/condition_attribute.c fll/level_0/thread/id.c fll/level_0/thread/key.c fll/level_0/thread/lock.c fll/level_0/thread/lock_attribute.c fll/level_0/thread/mutex.c fll/level_0/thread/mutex_attribute.c fll/level_0/thread/once.c fll/level_0/thread/semaphore.c fll/level_0/thread/set.c fll/level_0/thread/spin.c
+
build_sources_program fll/level_1/control_group.c
build_sources_program fll/level_1/conversion.c fll/level_1/private-conversion.c fll/level_1/conversion/common.c
build_sources_program fll/level_1/directory.c fll/level_1/private-directory.c
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_
-#defines -D_f_file_rename_use_renameat2_
defines -include sources/c/config.h -I sources/c/
-#defines -D_libcap_legacy_only_ -D_di_pthread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_f_file_rename_use_renameat2_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
defines-clang -D_clang_not_a_compile_time_constant_workaround_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
-flags -O2 -z now -g -pthread -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
+flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
flags_library -fPIC
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_account
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_capability
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_color
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_compare
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
#
# Memory leaks in the test program can be checked for by running valgrind with this executable.
#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name test-f_compare
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_console
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_control_group
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_conversion
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_directory
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_environment
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_execute
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_file
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_fss
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_iki
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_limit
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_memory
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_parse
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_path
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_pipe
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_print
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_rip
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_serialize
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_signal
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_socket
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_status
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_status_string
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_string
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
+# Note: This adds "threadless" and "thread" for consistency reasons. This should never use "threadless" and using "thread" is redundant.
+#
build_name f_thread
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
build_indexer_arguments rcs
build_language c
-build_libraries -pthread -lc
+build_libraries -lc
build_libraries-individual -lf_memory -lf_string
build_sources_library thread.c private-thread.c thread/attribute.c thread/barrier.c thread/barrier_attribute.c thread/condition.c thread/condition_attribute.c thread/id.c thread/key.c thread/lock.c thread/lock_attribute.c thread/mutex.c thread/mutex_attribute.c thread/once.c thread/semaphore.c thread/set.c thread/spin.c
defines -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_type
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_type_array
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name f_utf
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fl_control_group
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fl_conversion
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fl_directory
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fl_environment
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fl_execute
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc -lcap
build_libraries-individual -lf_capability -lf_execute -lf_limit -lf_memory -lf_signal -lf_string -lf_type_array
+build_libraries-individual_thread -lf_thread
build_sources_headers execute.h execute/common.h
#defines -D_di_libcap_
defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fl_fss
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fl_iki
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fl_path
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fl_print
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fl_signal
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fl_status_string
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fl_utf
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fl_utf_file
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fll_control_group
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fll_error
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fll_execute
version_file micro
version_target minor
-modes individual individual_threadless clang test
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
build_language c
build_libraries -lc -lcap
-build_libraries-individual -lfl_control_group -lfl_environment -lf_account -lf_capability -lf_control_group -lf_environment -lf_execute -lf_file -lf_limit -lf_memory -lf_path -lf_signal -lf_string -lf_thread -lf_type_array -lf_utf
-build_libraries-individual_threadless -lfl_control_group -lfl_environment -lf_account -lf_capability -lf_control_group -lf_environment -lf_execute -lf_file -lf_limit -lf_memory -lf_path -lf_signal -lf_string -lf_type_array -lf_utf
+build_libraries-individual -lfl_control_group -lfl_environment -lf_account -lf_capability -lf_control_group -lf_environment -lf_execute -lf_file -lf_limit -lf_memory -lf_path -lf_signal -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_sources_library execute.c private-execute.c
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
-defines-individual_threadless -D_di_thread_support_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
-flags-individual -pthread
flags_library -fPIC
flags_object -fPIC
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fll_file
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fll_fss
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fll_fss_status_string
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fll_iki
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fll_print
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fll_program
version_file micro
version_target minor
-modes individual clang test coverage
-modes_default individual
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default individual individual_thread thread
build_compiler gcc
build_compiler-clang clang
/**
* FLL - Level 3
*
- * Project: UTF8
+ * Project: Byte Dump
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*/
# fss-0000
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name byte_dump
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc
build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion -lfl_print -lf_color -lf_console -lf_conversion -lf_file -lf_memory -lf_pipe -lf_print -lf_rip -lf_signal -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
/**
* FLL - Level 3
*
- * Project: UTF8
+ * Project: Control
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*/
# fss-0000
+_di_thread_support_ Disables thread support.
+
_controller_as_init_ The controller program is compiled as an init replacement and this control program should treat it as such.
_override_controller_name_socket_ Use this as the default custom file name representing the controller program socket.
_override_controller_name_socket_length_ The number of bytes representing the string in _override_controller_name_socket_ (not including the terminating NULL).
_override_controller_path_socket_suffix_length_ The number of bytes representing the string in _override_controller_path_socket_suffix_ (not including the terminating NULL).
_override_control_path_settings_ Use this as the default full path to the controlsettings.
_override_control_path_settings_length_ The number of bytes representing the string in _override_controller_path_settings_length_ (not including the terminating NULL).
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name control
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc
build_libraries-individual -lfll_error -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_fss -lfl_print -lfl_status_string -lf_color -lf_compare -lf_console -lf_conversion -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_socket -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
/**
* FLL - Level 3
*
- * Project: UTF8
+ * Project: Controller
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*/
# fss-0000
_di_libcap_ Disable libcap support, allow for compiling and linking without libcap (-lcap).
+_di_thread_support_ Disables thread support.
_libcap_legacy_only_ Disable functionality provided by later versions of libcap (2.43 and later).
_controller_as_init_ Build the program to run as if it were "init" by default, including displaying the program name as "Init Program" or "Init". This changes the main.c file only, leaving the library shareable between both "controller" and "init".
_override_controller_path_socket_prefix_length_ The number of bytes representing the string in _override_controller_path_socket_prefix_ (not including the terminating NULL).
_override_controller_path_socket_suffix_ Use this as the default custom prefix prepended to the file name of the file representing the controller program socket.
_override_controller_path_socket_suffix_length_ The number of bytes representing the string in _override_controller_path_socket_suffix_ (not including the terminating NULL).
+
_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name controller
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer as_init
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless as_init
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc -lcap
build_libraries-individual -lfll_control_group -lfll_error -lfll_execute -lfll_fss -lfll_print -lfll_program -lfll_status_string
+build_libraries-individual_thread -lf_thread
build_libraries-individual -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_path -lfl_print
-build_libraries-individual -lf_account -lf_capability -lf_color -lf_compare -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_socket -lf_status_string -lf_string -lf_thread -lf_type_array -lf_utf
+build_libraries-individual -lf_account -lf_capability -lf_color -lf_compare -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_socket -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
defines-as_init -D_controller_as_init_
-flags -O2 -z now -g -pthread -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
#endif
/**
- * The program defines.
+ * The program allocation defines.
*
- * fake_*_d:
- * - allocation_console: An allocation step used for small buffers specifically for console parameter.
- * - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
- * - allocation_pipe: A buffer size used for processing piped data.
- * - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
+ * fake_allocation_*_d:
+ * - console: An allocation step used for small buffers specifically for console parameter.
+ * - large: An allocation step used for buffers that are anticipated to have large buffers.
+ * - pipe: A buffer size used for processing piped data.
+ * - small: An allocation step used for buffers that are anticipated to have small buffers.
*/
-#ifndef _di_fake_d_
+#ifndef _di_fake_allocation_d_
#define fake_allocation_console_d 4
#define fake_allocation_large_d 256
#define fake_allocation_pipe_d 16384
#define fake_allocation_small_d 16
-#endif // _di_fake_d_
+#endif // _di_fake_allocation_d_
/**
* The program signal defines.
#include <fll/level_0/rip.h>
#include <fll/level_0/signal.h>
+#ifndef _di_thread_support_
+ #include <fll/level_0/thread.h>
+#endif // _di_thread_support_
+
// FLL-1 includes.
#include <fll/level_1/control_group.h>
#include <fll/level_1/conversion.h>
_di_thread_support_ Disables thread support.
_libcap_legacy_only_ Disable functionality provided by later versions of libcap (2.43 and later).
+
_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fake
process_pre process_pre.sh
process_post process_post.sh
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc -lcap
build_libraries-individual -lfll_error -lfll_execute -lfll_file -lfll_fss -lfll_print -lfll_program
build_libraries-individual -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_path -lfl_print
-build_libraries-individual -lf_account -lf_capability -lf_color -lf_compare -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_thread -lf_type_array -lf_utf
+build_libraries-individual -lf_account -lf_capability -lf_color -lf_compare -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
-flags -O2 -z now -g -pthread -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
/**
* FLL - Level 3
*
- * Project: UTF8
+ * Project: Firewall
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*/
# fss-0000
_di_libcap_ Disable libcap support, allow for compiling and linking without libcap (-lcap).
+_di_thread_support_ Disables thread support.
_libcap_legacy_only_ Disable functionality provided by later versions of libcap (2.43 and later).
+
_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name firewall
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_language c
build_libraries -lc -lcap
-build_libraries-individual -lfll_error -lfll_execute -lfll_fss -lfll_print -lfll_program -lfl_control_group -lfl_conversion -lfl_environment -lfl_fss -lfl_print -lf_account -lf_capability -lf_color -lf_compare -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_limit -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_thread -lf_type_array -lf_utf
+build_libraries-individual -lfll_error -lfll_execute -lfll_fss -lfll_print -lfll_program -lfl_control_group -lfl_conversion -lfl_environment -lfl_fss -lfl_print -lf_account -lf_capability -lf_color -lf_compare -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_limit -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
-flags -O2 -z now -g -pthread -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
/**
* FLL - Level 3
*
- * Project: UTF8
+ * Project: FSS Basic List Read
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*/
# fss-0000
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fss_basic_list_read
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc
build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
/**
* FLL - Level 3
*
- * Project: UTF8
+ * Project: FSS Basic Read
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*/
# fss-0000
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fss_basic_read
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc
build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_rip -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_compare -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
/**
* FLL - Level 3
*
- * Project: UTF8
+ * Project: FSS Embedded List Read
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*/
# fss-0000
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fss_embedded_list_read
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc
build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
/**
* FLL - Level 3
*
- * Project: UTF8
+ * Project: FSS Embedded List Read
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*/
# fss-0000
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fss_extended_list_read
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc
build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
/**
* FLL - Level 3
*
- * Project: UTF8
+ * Project: FSS Extended Read
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*/
# fss-0000
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fss_extended_read
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc
build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
/**
* FLL - Level 3
*
- * Project: UTF8
+ * Project: FSS Identify
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*/
# fss-0000
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fss_identify
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc
build_libraries-individual -lfll_error -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_fss -lfl_print -lf_color -lf_console -lf_conversion -lf_file -lf_fss -lf_memory -lf_parse -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
/**
* FLL - Level 3
*
- * Project: UTF8
+ * Project: FSS Payload Read
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*/
# fss-0000
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fss_payload_read
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithi threadc
build_compiler gcc
build_compiler-clang clang
build_libraries -lc
build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
fll_program_standard_set_up(&data.program);
- {
- const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+ f_file_umask_get(&data.program.umask);
- fss_write_setting_load(arguments, &data, 0);
- }
+ #ifdef _di_thread_support_
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ fss_write_setting_load(arguments, &data);
+ }
+
+ fss_write_main(&data);
+ #else
+ {
+ f_thread_id_t id_signal;
+
+ memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+ data.setting.state.status = f_thread_create(0, &id_signal, &fss_write_thread_signal, (void *) &data);
+
+ if (F_status_is_error(data.setting.state.status)) {
+ fss_write_print_error(&data.program.error, macro_fss_write_f(f_thread_create));
+ }
+ else {
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ fss_write_setting_load(arguments, &data);
+ }
- fss_write_main(&data);
+ if (!fss_write_signal_check(&data)) {
+ fss_write_main(&data);
+ }
- fss_write_setting_unload(&data);
+ f_thread_cancel(id_signal);
+ f_thread_join(id_signal, 0);
+ }
+ }
+ #endif // _di_thread_support_
- fll_program_data_delete(&data.program);
+ fss_write_main_delete(&data);
fll_program_standard_set_down(&data.program);
fll_program_standard_set_up(&data.program);
- {
- const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+ f_file_umask_get(&data.program.umask);
- fss_write_setting_load(arguments, &data, 0);
- }
+ #ifdef _di_thread_support_
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ fss_write_setting_load(arguments, &data);
+ }
+
+ fss_write_main(&data);
+ #else
+ {
+ f_thread_id_t id_signal;
+
+ memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+ data.setting.state.status = f_thread_create(0, &id_signal, &fss_write_thread_signal, (void *) &data);
+
+ if (F_status_is_error(data.setting.state.status)) {
+ fss_write_print_error(&data.program.error, macro_fss_write_f(f_thread_create));
+ }
+ else {
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ fss_write_setting_load(arguments, &data);
+ }
- fss_write_main(&data);
+ if (!fss_write_signal_check(&data)) {
+ fss_write_main(&data);
+ }
- fss_write_setting_unload(&data);
+ f_thread_cancel(id_signal);
+ f_thread_join(id_signal, 0);
+ }
+ }
+ #endif // _di_thread_support_
- fll_program_data_delete(&data.program);
+ fss_write_main_delete(&data);
fll_program_standard_set_down(&data.program);
fll_program_standard_set_up(&data.program);
- {
- const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+ f_file_umask_get(&data.program.umask);
- fss_write_setting_load(arguments, &data, 0);
- }
+ #ifdef _di_thread_support_
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ fss_write_setting_load(arguments, &data);
+ }
+
+ fss_write_main(&data);
+ #else
+ {
+ f_thread_id_t id_signal;
+
+ memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+ data.setting.state.status = f_thread_create(0, &id_signal, &fss_write_thread_signal, (void *) &data);
+
+ if (F_status_is_error(data.setting.state.status)) {
+ fss_write_print_error(&data.program.error, macro_fss_write_f(f_thread_create));
+ }
+ else {
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ fss_write_setting_load(arguments, &data);
+ }
- fss_write_main(&data);
+ if (!fss_write_signal_check(&data)) {
+ fss_write_main(&data);
+ }
- fss_write_setting_unload(&data);
+ f_thread_cancel(id_signal);
+ f_thread_join(id_signal, 0);
+ }
+ }
+ #endif // _di_thread_support_
- fll_program_data_delete(&data.program);
+ fss_write_main_delete(&data);
fll_program_standard_set_down(&data.program);
fll_program_standard_set_up(&data.program);
- {
- const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+ f_file_umask_get(&data.program.umask);
- fss_write_setting_load(arguments, &data, 0);
- }
+ #ifdef _di_thread_support_
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ fss_write_setting_load(arguments, &data);
+ }
+
+ fss_write_main(&data);
+ #else
+ {
+ f_thread_id_t id_signal;
+
+ memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+ data.setting.state.status = f_thread_create(0, &id_signal, &fss_write_thread_signal, (void *) &data);
+
+ if (F_status_is_error(data.setting.state.status)) {
+ fss_write_print_error(&data.program.error, macro_fss_write_f(f_thread_create));
+ }
+ else {
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ fss_write_setting_load(arguments, &data);
+ }
- fss_write_main(&data);
+ if (!fss_write_signal_check(&data)) {
+ fss_write_main(&data);
+ }
- fss_write_setting_unload(&data);
+ f_thread_cancel(id_signal);
+ f_thread_join(id_signal, 0);
+ }
+ }
+ #endif // _di_thread_support_
- fll_program_data_delete(&data.program);
+ fss_write_main_delete(&data);
fll_program_standard_set_down(&data.program);
fll_program_standard_set_up(&data.program);
- {
- const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+ f_file_umask_get(&data.program.umask);
- fss_write_setting_load(arguments, &data, 0);
- }
+ #ifdef _di_thread_support_
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ fss_write_setting_load(arguments, &data);
+ }
+
+ fss_write_main(&data);
+ #else
+ {
+ f_thread_id_t id_signal;
+
+ memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+ data.setting.state.status = f_thread_create(0, &id_signal, &fss_write_thread_signal, (void *) &data);
+
+ if (F_status_is_error(data.setting.state.status)) {
+ fss_write_print_error(&data.program.error, macro_fss_write_f(f_thread_create));
+ }
+ else {
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ fss_write_setting_load(arguments, &data);
+ }
- fss_write_main(&data);
+ if (!fss_write_signal_check(&data)) {
+ fss_write_main(&data);
+ }
- fss_write_setting_unload(&data);
+ f_thread_cancel(id_signal);
+ f_thread_join(id_signal, 0);
+ }
+ }
+ #endif // _di_thread_support_
- fll_program_data_delete(&data.program);
+ fss_write_main_delete(&data);
fll_program_standard_set_down(&data.program);
extern "C" {
#endif
-#ifndef _di_fss_write_setting_delete_
- f_status_t fss_write_setting_delete(fss_write_setting_t * const setting) {
-
- if (!setting) return F_status_set_error(F_parameter);
-
- f_string_dynamic_resize(0, &setting->escaped);
- f_string_dynamic_resize(0, &setting->block);
- f_string_dynamic_resize(0, &setting->buffer);
- f_string_dynamic_resize(0, &setting->prepend);
-
- f_string_rangess_resize(0, &setting->ignoress);
- f_string_dynamics_resize(0, &setting->objects);
- f_string_dynamicss_resize(0, &setting->contentss);
-
- return F_none;
- }
-#endif // _di_fss_write_setting_delete_
-
#ifndef _di_fss_write_setting_load_
void fss_write_setting_load(const f_console_arguments_t arguments, fss_write_main_t * const main, void (*callback)(const f_console_arguments_t arguments, fss_write_main_t * const main)) {
}
#endif // _di_fss_write_setting_load_
-#ifndef _di_fss_write_setting_unload_
- f_status_t fss_write_setting_unload(fss_write_main_t * const main) {
-
- if (!main) return F_status_set_error(F_parameter);
-
- fss_write_setting_delete(&main->setting);
-
- return F_none;
- }
-#endif // _di_fss_write_setting_unload_
-
#ifdef __cplusplus
} // extern "C"
#endif
#endif
/**
- * Delete the program main setting data.
- *
- * @param setting
- * The program main setting data.
- *
- * This does not alter setting.state.status.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_fss_write_setting_delete_
- extern f_status_t fss_write_setting_delete(fss_write_setting_t * const setting);
-#endif // _di_fss_write_setting_delete_
-
-/**
* Perform the standard program setting load process.
*
* This prints error messages as appropriate.
extern void fss_write_setting_load(const f_console_arguments_t arguments, fss_write_main_t * const main, void (*callback)(const f_console_arguments_t arguments, fss_write_main_t * const main));
#endif // _di_fss_write_setting_load_
-/**
- * Perform the standard program setting unload process.
- *
- * @param main
- * The main program and setting data.
- * All buffers are deallocated.
- *
- * This does not alter main.setting.state.status.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: fss_write_setting_delete().
- *
- * @see fss_write_setting_delete()
- */
-#ifndef _di_fss_write_setting_unload_
- extern f_status_t fss_write_setting_unload(fss_write_main_t * const main);
-#endif // _di_fss_write_setting_unload_
-
#ifdef __cplusplus
} // extern "C"
#endif
#endif
/**
- * The program default defines.
+ * The program allocation defines.
*
- * fss_write_*_d:
- * - allocation_console: An allocation step used for small buffers specifically for console parameter.
- * - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
- * - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
- * - signal_check: Number of iterations before performing signal check in non-threaded signal handling.
+ * fss_write_allocation_*_d:
+ * - console: An allocation step used for small buffers specifically for console parameter.
+ * - large: An allocation step used for buffers that are anticipated to have large buffers.
+ * - pipe: A buffer size used for processing piped data.
+ * - small: An allocation step used for buffers that are anticipated to have small buffers.
*/
-#ifndef _di_fss_write_d_
+#ifndef _di_fss_write_allocation_d_
#define fss_write_allocation_console_d 4
#define fss_write_allocation_large_d 2048
+ #define fss_write_allocation_pipe_d 16384
#define fss_write_allocation_small_d 128
- #define fss_write_signal_check_d 20000
-#endif // _di_fss_write_d_
+#endif // _di_fss_write_allocation_d_
+
+/**
+ * The program signal defines.
+ *
+ * fss_write_signal_*_d:
+ * - check: Number of iterations before performing signal check in non-threaded signal handling.
+ * - check_failsafe: When using threads, how many consecutive failures to check signal before aborting (as a recursion failsafe).
+ * - check_tiny: The tiny check.
+ * - check_short: The short signal check.
+ */
+#ifndef _di_fss_write_signal_d_
+ #define fss_write_signal_check_d 500000
+ #define fss_write_signal_check_failsafe_d 20000
+ #define fss_write_signal_check_tiny_d 4
+ #define fss_write_signal_check_short_d 16
+#endif // _di_fss_write_signal_d_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
+#ifndef _di_fss_write_main_data_delete_
+ void fss_write_main_delete(fss_write_main_t * const main) {
+
+ if (!main) return;
+
+ fll_program_data_delete(&main->program);
+ fss_write_setting_delete(&main->setting);
+ }
+#endif // _di_fss_write_main_data_delete_
+
+#ifndef _di_fss_write_setting_delete_
+ f_status_t fss_write_setting_delete(fss_write_setting_t * const setting) {
+
+ if (!setting) return F_status_set_error(F_parameter);
+
+ f_string_dynamic_resize(0, &setting->escaped);
+ f_string_dynamic_resize(0, &setting->block);
+ f_string_dynamic_resize(0, &setting->buffer);
+ f_string_dynamic_resize(0, &setting->prepend);
+
+ f_string_rangess_resize(0, &setting->ignoress);
+ f_string_dynamics_resize(0, &setting->objects);
+ f_string_dynamicss_resize(0, &setting->contentss);
+
+ return F_none;
+ }
+#endif // _di_fss_write_setting_delete_
+
#ifdef __cplusplus
} // extern "C"
#endif
*
* flag: Flags passed to the main function.
*
- * state: The state data used when processing the FSS data.
+ * status_thread: A status used eclusively by the threaded signal handler.
+ * state: The state data used when processing the FSS data.
+ *
* range: A range used as a buffer during processing.
*
* quote: This holds the quote used during processing.
typedef struct {
uint16_t flag;
+ f_status_t status_thread;
f_state_t state;
+
f_string_range_t range;
f_string_static_t quote;
#define fss_write_setting_t_initialize \
{ \
fss_write_main_flag_none_e, \
+ F_none, \
macro_f_state_t_initialize_1(fss_write_allocation_large_d, fss_write_allocation_small_d, F_none, 0, 0, &fll_program_standard_signal_handle, 0, 0, 0), \
f_string_range_t_initialize, \
f_string_static_t_initialize, \
}
#endif // _di_fss_write_main_t_
+/**
+ * Deallocate main program data.
+ *
+ * @param setting_make
+ * The make setting data.
+ *
+ * This does not alter data_make.main.setting.state.status.
+ */
+#ifndef _di_fss_write_main_data_delete_
+ extern void fss_write_main_delete(fss_write_main_t * const main);
+#endif // _di_fss_write_main_data_delete_
+
+/**
+ * Delete the program main setting data.
+ *
+ * @param setting
+ * The program main setting data.
+ *
+ * This does not alter setting.state.status.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_fss_write_setting_delete_
+ extern f_status_t fss_write_setting_delete(fss_write_setting_t * const setting);
+#endif // _di_fss_write_setting_delete_
+
#ifdef __cplusplus
} // extern "C"
#endif
#include <fll/level_0/rip.h>
#include <fll/level_0/signal.h>
+#ifndef _di_thread_support_
+ #include <fll/level_0/thread.h>
+#endif // _di_thread_support_
+
// FLL-1 includes.
#include <fll/level_1/conversion.h>
#include <fll/level_1/print.h>
#include <program/fss_write/main/print/error.h>
#include <program/fss_write/main/print/message.h>
#include <program/fss_write/basic/print.h>
+#include <program/fss_write/main/signal.h>
+#include <program/fss_write/main/thread.h>
#ifdef __cplusplus
extern "C" {
fll_program_standard_set_up(&data.program);
- {
- const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+ f_file_umask_get(&data.program.umask);
- fss_write_setting_load(arguments, &data, &fss_write_main_setting_load_as);
- }
+ #ifdef _di_thread_support_
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ fss_write_setting_load(arguments, &data);
+ }
+
+ fss_write_main(&data);
+ #else
+ {
+ f_thread_id_t id_signal;
- fss_write_main(&data);
+ memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+ data.setting.state.status = f_thread_create(0, &id_signal, &fss_write_thread_signal, (void *) &data);
+
+ if (F_status_is_error(data.setting.state.status)) {
+ fss_write_print_error(&data.program.error, macro_fss_write_f(f_thread_create));
+ }
+ else {
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
- fss_write_setting_unload(&data);
+ fss_write_setting_load(arguments, &data);
+ }
+
+ if (!fss_write_signal_check(&data)) {
+ fss_write_main(&data);
+ }
+
+ f_thread_cancel(id_signal);
+ f_thread_join(id_signal, 0);
+ }
+ }
+ #endif // _di_thread_support_
- fll_program_data_delete(&data.program);
+ fss_write_main_delete(&data);
fll_program_standard_set_down(&data.program);
--- /dev/null
+#include "fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_fss_write_signal_check_) && defined(_di_thread_support_)
+ f_status_t fss_write_signal_check(fss_write_main_t * const main) {
+
+ if (!main) return F_false;
+ if (main->program.signal.id == -1) return F_false;
+
+ if (!((++main->program.signal_check) % fss_write_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+ main->setting.state.status = F_status_set_error(F_interrupt);
+
+ return F_true;
+ }
+
+ main->program.signal_check = 0;
+ }
+
+ return F_false;
+ }
+#endif // !defined(_di_fss_write_signal_check_) && defined(_di_thread_support_)
+
+#if !defined(_di_fss_write_signal_check_) && !defined(_di_thread_support_)
+ f_status_t fss_write_signal_check(fss_write_main_t * const main) {
+
+ if (!main) return F_false;
+ if (main->program.signal.id == -1) return F_false;
+
+ if (main->program.signal_received) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+ main->setting.state.status = F_status_set_error(F_interrupt);
+
+ return F_true;
+ }
+
+ return F_false;
+ }
+#endif // !defined(_di_fss_write_signal_check_) && !defined(_di_thread_support_)
+
+#if !defined(_di_fss_write_signal_handler_) && !defined(_di_thread_support_)
+ void fss_write_signal_handler(fss_write_main_t * const main) {
+
+ if (!main) return;
+
+ siginfo_t information;
+ f_array_length_t failsafe = 0;
+
+ memset(&information, 0, sizeof(siginfo_t));
+
+ main->program.signal_received = 0;
+
+ f_signal_set_empty(&main->program.signal.set);
+ f_signal_set_add(F_signal_abort, &main->program.signal.set);
+ f_signal_set_add(F_signal_broken_pipe, &main->program.signal.set);
+ f_signal_set_add(F_signal_hangup, &main->program.signal.set);
+ f_signal_set_add(F_signal_interrupt, &main->program.signal.set);
+ f_signal_set_add(F_signal_quit, &main->program.signal.set);
+ f_signal_set_add(F_signal_termination, &main->program.signal.set);
+
+ if (main->program.signal.id == -1) {
+ main->setting.status_thread = f_signal_open(&main->program.signal);
+
+ if (F_status_is_error(main->setting.status_thread)) {
+ main->program.signal_received = F_signal_abort;
+
+ return;
+ }
+ }
+
+ do {
+ memset(&information, 0, sizeof(siginfo_t));
+
+ main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information);
+
+ if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) {
+ if (++failsafe >= fss_write_signal_check_failsafe_d) break;
+ }
+
+ switch (information.si_signo) {
+ case F_signal_abort:
+ case F_signal_broken_pipe:
+ case F_signal_hangup:
+ case F_signal_interrupt:
+ case F_signal_quit:
+ case F_signal_termination:
+ main->program.signal_received = information.si_signo;
+
+ break;
+ }
+
+ failsafe = 0;
+ main->setting.status_thread = F_none;
+
+ } while (!main->program.signal_received);
+
+ f_signal_close(&main->program.signal);
+
+ if (F_status_is_error(main->setting.status_thread)) {
+ main->program.signal_received = F_signal_abort;
+ }
+ }
+#endif // !defined(_di_fss_write_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides signal functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _fss_write_signal_h
+#define _fss_write_signal_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Check to see if a signal is received.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ * - F_signal_abort
+ * - F_signal_broken_pipe
+ * - F_signal_hangup
+ * - F_signal_interrupt
+ * - F_signal_quit
+ * - F_signal_termination
+ *
+ * There is a threaded and a non-threaded version of this.
+ * The non-threaded version checks periodically using fss_write_signal_check_d and updates main->signal_check as needed.
+ * The threaded version checks the flag state which is set by a separate thread that is blocking until signal is received.
+ *
+ * @param main
+ * The main program and settings data.
+ *
+ * This does not alter main.setting.state.status.
+ *
+ * @return
+ * F_true on signal received.
+ * F_false otherwise.
+ *
+ * @see fss_write_signal_handler()
+ *
+ * @see fll_program_standard_signal_received()
+ */
+#ifndef _di_fss_write_signal_check_
+ extern f_status_t fss_write_signal_check(fss_write_main_t * const main);
+#endif // _di_fss_write_signal_check_
+
+/**
+ * Signal handler for signals/interrupts.
+ *
+ * This blocks until an expected signal is recieved.
+ * When an expected signal is received it then sets the
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ * - F_signal_abort
+ * - F_signal_broken_pipe
+ * - F_signal_hangup
+ * - F_signal_interrupt
+ * - F_signal_quit
+ * - F_signal_termination
+ *
+ * @param main
+ * The main program and settings data.
+ *
+ * This alters main.program.signal_received, setting it to a received signal.
+ *
+ * This alters setting.status:
+ * Errors with (error bit set) from: f_signal_open()
+ * Errors with (error bit set) from: f_signal_wait()
+ *
+ * @see f_signal_close()
+ * @see f_signal_open()
+ * @see f_signal_wait()
+ */
+#if !defined(_di_fss_write_signal_handler_) && !defined(_di_thread_support_)
+ extern void fss_write_signal_handler(fss_write_main_t * const main);
+#endif // !defined(_di_fss_write_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _fss_write_signal_h
--- /dev/null
+#include "fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_fss_write_thread_signal_) && !defined(_di_thread_support_)
+ void * fss_write_thread_signal(void * const main) {
+
+ f_thread_cancel_state_set(PTHREAD_CANCEL_DEFERRED, 0);
+
+ if (main) {
+ fss_write_signal_handler((fss_write_main_t *) main);
+ }
+
+ return 0;
+ }
+#endif // !defined(_di_fss_write_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides thread functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _fss_write_thread_h
+#define _fss_write_thread_h
+
+/**
+ * Thread handler for signals/interrupts.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ * - F_signal_abort
+ * - F_signal_broken_pipe
+ * - F_signal_hangup
+ * - F_signal_interrupt
+ * - F_signal_quit
+ * - F_signal_termination
+ *
+ * @param main
+ * The program and settings data.
+ *
+ * Must be of type fss_write_main_t.
+ *
+ * @return
+ * 0, always.
+ *
+ * @see f_thread_cancel_state_set()
+ *
+ * @see fss_write_signal_handler()
+ */
+#if !defined(_di_fss_write_thread_signal_) && !defined(_di_thread_support_)
+ extern void * fss_write_thread_signal(void * const main);
+#endif // !defined(_di_fss_write_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _fss_write_thread_h
fll_program_standard_set_up(&data.program);
- {
- const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+ f_file_umask_get(&data.program.umask);
- fss_write_setting_load(arguments, &data, &fss_write_payload_setting_load);
- }
+ #ifdef _di_thread_support_
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ fss_write_setting_load(arguments, &data);
+ }
+
+ fss_write_main(&data);
+ #else
+ {
+ f_thread_id_t id_signal;
+
+ memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+ data.setting.state.status = f_thread_create(0, &id_signal, &fss_write_thread_signal, (void *) &data);
+
+ if (F_status_is_error(data.setting.state.status)) {
+ fss_write_print_error(&data.program.error, macro_fss_write_f(f_thread_create));
+ }
+ else {
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ fss_write_setting_load(arguments, &data);
+ }
- fss_write_main(&data);
+ if (!fss_write_signal_check(&data)) {
+ fss_write_main(&data);
+ }
- fss_write_setting_unload(&data);
+ f_thread_cancel(id_signal);
+ f_thread_join(id_signal, 0);
+ }
+ }
+ #endif // _di_thread_support_
- fll_program_data_delete(&data.program);
+ fss_write_main_delete(&data);
fll_program_standard_set_down(&data.program);
# fss-0000
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
#
# Builds the main library of the project with all parts except "main" program related.
#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fss_write
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc
build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
-build_sources_library main/fss_write.c main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/print/error.c main/print/message.c
+build_sources_library main/fss_write.c main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/print/error.c main/print/message.c main/signal.c main/thread.c
build_sources_library basic/fss_write.c basic/common.c basic/print.c
build_sources_library basic_list/fss_write.c basic_list/common.c basic_list/print.c
build_sources_library embedded_list/fss_write.c embedded_list/common.c embedded_list/print.c
build_sources_library extended_list/fss_write.c extended_list/common.c extended_list/print.c
build_sources_library payload/fss_write.c payload/common.c payload/print.c
-build_sources_headers main/fss_write.h main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/print/error.h main/print/message.h
+build_sources_headers main/fss_write.h main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/print/error.h main/print/message.h main/signal.h main/thread.h
build_sources_headers basic/fss_write.h basic/common.h basic/print.h basic/private-common.h
build_sources_headers basic_list/fss_write.h basic_list/common.h basic_list/print.h
build_sources_headers embedded_list/fss_write.h embedded_list/common.h embedded_list/print.h
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
version_file micro
version_target minor
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual level monolithic clang test fanalyzer thread individual-thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc -lfss_write
build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual-thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
version_file micro
version_target minor
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual level monolithic clang test fanalyzer thread individual-thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc -lfss_write
build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual-thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
version_file micro
version_target minor
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual level monolithic clang test fanalyzer thread individual-thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc -lfss_write
build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual-thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
version_file micro
version_target minor
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual level monolithic clang test fanalyzer thread individual-thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc -lfss_write
build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual-thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
version_file micro
version_target minor
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual level monolithic clang test fanalyzer thread individual-thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc -lfss_write
build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual-thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
version_file micro
version_target minor
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual level monolithic clang test fanalyzer thread individual-thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc -lfss_write
build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual-thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
version_file micro
version_target minor
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual level monolithic clang test fanalyzer thread individual-thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc -lfss_write
build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual-thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_libcap_legacy_only_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
extern "C" {
#endif
-#ifndef _di_iki_read_setting_delete_
- f_status_t iki_read_setting_delete(iki_read_setting_t * const setting) {
-
- if (!setting) return F_status_set_error(F_parameter);
-
- f_string_dynamic_resize(0, &setting->buffer);
- f_string_dynamics_resize(0, &setting->names);
- f_string_dynamics_resize(0, &setting->files);
-
- f_string_maps_resize(0, &setting->replace);
- f_string_triples_resize(0, &setting->reassign);
- f_string_triples_resize(0, &setting->substitute);
- f_string_triples_resize(0, &setting->wrap);
-
- f_iki_data_delete(&setting->data);
-
- return F_none;
- }
-#endif // _di_iki_read_setting_delete_
-
#ifndef _di_iki_read_setting_load_
void iki_read_setting_load(const f_console_arguments_t arguments, iki_read_main_t * const main) {
}
#endif // _di_iki_read_setting_load_parameter_substitution_
-#ifndef _di_iki_read_setting_unload_
- f_status_t iki_read_setting_unload(iki_read_main_t * const main) {
-
- if (!main) return F_status_set_error(F_parameter);
-
- iki_read_setting_delete(&main->setting);
-
- return F_none;
- }
-#endif // _di_iki_read_setting_unload_
-
#ifdef __cplusplus
} // extern "C"
#endif
#endif
/**
- * Delete the program main setting data.
- *
- * @param setting
- * The program main setting data.
- *
- * This does not alter setting.state.status.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_iki_read_setting_delete_
- extern f_status_t iki_read_setting_delete(iki_read_setting_t * const setting);
-#endif // _di_iki_read_setting_delete_
-
-/**
* Perform the standard program setting load process.
*
* This prints error messages as appropriate.
extern f_status_t iki_read_setting_load_parameter_substitution(iki_read_main_t * const main, const f_console_parameter_t parameter, const f_string_static_t name, f_string_triples_t *triple);
#endif // _di_iki_read_setting_load_parameter_substitution_
-/**
- * Perform the standard program setting unload process.
- *
- * @param main
- * The program and settings data.
- *
- * All buffers are deallocated.
- *
- * This does not alter main.setting.state.status.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: iki_read_setting_delete().
- *
- * @see iki_read_setting_delete()
- */
-#ifndef _di_iki_read_setting_unload_
- extern f_status_t iki_read_setting_unload(iki_read_main_t * const main);
-#endif // _di_iki_read_setting_unload_
-
#ifdef __cplusplus
} // extern "C"
#endif
#endif
/**
- * The program defines.
+ * The program allocation defines.
*
- * iki_read_*_d:
- * - allocation_console: An allocation step used for small buffers specifically for console parameter.
- * - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
- * - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
- * - block_max: The max block read size before checking for interrupt.
- * - block_read_small: The block read size for small files.
- * - block_read_large: The block read size for large files.
- * - signal_check: Number of iterations before performing signal check in non-threaded signal handling.
+ * iki_read_allocation_*_d:
+ * - console: An allocation step used for small buffers specifically for console parameter.
+ * - large: An allocation step used for buffers that are anticipated to have large buffers.
+ * - pipe: A buffer size used for processing piped data.
+ * - small: An allocation step used for buffers that are anticipated to have small buffers.
*/
-#ifndef _di_iki_read_d_
+#ifndef _di_iki_read_allocation_d_
#define iki_read_allocation_console_d 4
#define iki_read_allocation_large_d 256
+ #define iki_read_allocation_pipe_d 16384
#define iki_read_allocation_small_d 16
- #define iki_read_block_max 16777216
- #define iki_read_block_read_small 8192
- #define iki_read_block_read_large 65536
- #define iki_read_signal_check_d 20000
+#endif // _di_iki_read_allocation_d_
+
+/**
+ * The program block defines.
+ *
+ * iki_read_block_*_d:
+ * - max: The max block read size before checking for interrupt.
+ * - read_small: The block read size for small files.
+ * - read_large: The block read size for large files.
+ */
+#ifndef _di_iki_read_d_
+ #define iki_read_block_max_d 16777216
+ #define iki_read_block_read_small_d 8192
+ #define iki_read_block_read_large_d 65536
#endif // _di_iki_read_d_
+/**
+ * The program signal defines.
+ *
+ * iki_read_signal_*_d:
+ * - check: Number of iterations before performing signal check in non-threaded signal handling.
+ * - check_failsafe: When using threads, how many consecutive failures to check signal before aborting (as a recursion failsafe).
+ * - check_tiny: The tiny check.
+ * - check_short: The short signal check.
+ */
+#ifndef _di_iki_read_signal_d_
+ #define iki_read_signal_check_d 500000
+ #define iki_read_signal_check_failsafe_d 20000
+ #define iki_read_signal_check_tiny_d 4
+ #define iki_read_signal_check_short_d 16
+#endif // _di_iki_read_signal_d_
+
#ifdef __cplusplus
} // extern "C"
#endif
"f_string_dynamics_resize",
"f_string_maps_increase_by",
"f_string_triples_increase_by",
+ "f_thread_create",
"fl_iki_read",
"fll_program_parameter_process_context",
"fll_program_parameter_process_verbosity",
iki_read_f_f_string_dynamics_resize_e,
iki_read_f_f_string_maps_increase_by_e,
iki_read_f_f_string_triples_increase_by_e,
+ iki_read_f_f_thread_create_e,
iki_read_f_fl_iki_read_e,
iki_read_f_fll_program_parameter_process_context_e,
iki_read_f_fll_program_parameter_process_verbosity_e,
#endif // _di_iki_read_program_name_s_
/**
- * The program defines.
- */
-#ifndef _di_iki_read_d_
- #define iki_read_signal_check_d 20000
-#endif // _di_iki_read_d_
-
-/**
* A collection of static strings associated with IKI Read.
*/
#ifndef _di_iki_read_s_
extern "C" {
#endif
+#ifndef _di_iki_read_main_data_delete_
+ void iki_read_main_delete(iki_read_main_t * const main) {
+
+ if (!main) return;
+
+ fll_program_data_delete(&main->program);
+ iki_read_setting_delete(&main->setting);
+ }
+#endif // _di_iki_read_main_data_delete_
+
+#ifndef _di_iki_read_setting_delete_
+ f_status_t iki_read_setting_delete(iki_read_setting_t * const setting) {
+
+ if (!setting) return F_status_set_error(F_parameter);
+
+ f_string_dynamic_resize(0, &setting->buffer);
+ f_string_dynamics_resize(0, &setting->names);
+ f_string_dynamics_resize(0, &setting->files);
+
+ f_string_maps_resize(0, &setting->replace);
+ f_string_triples_resize(0, &setting->reassign);
+ f_string_triples_resize(0, &setting->substitute);
+ f_string_triples_resize(0, &setting->wrap);
+
+ f_iki_data_delete(&setting->data);
+
+ return F_none;
+ }
+#endif // _di_iki_read_setting_delete_
+
#ifdef __cplusplus
} // extern "C"
#endif
*
* flag: Flags passed to the main function.
*
- * state: The state information.
+ * status_thread: A status used eclusively by the threaded signal handler.
+ * state: The state data used when processing the FSS data.
*
* at: The position representing the "at" index.
* line: The position representing the "line" index.
typedef struct {
uint16_t flag;
+ f_status_t status_thread;
f_state_t state;
f_array_length_t at;
#define iki_read_setting_t_initialize \
{ \
iki_read_main_flag_none_e, \
+ F_none, \
macro_f_state_t_initialize_1(iki_read_allocation_large_d, iki_read_allocation_small_d, F_none, 0, 0, 0, 0, 0, 0), \
0, \
0, \
}
#endif // _di_iki_read_main_t_
+/**
+ * Deallocate main program data.
+ *
+ * @param setting_make
+ * The make setting data.
+ *
+ * This does not alter data_make.main.setting.state.status.
+ */
+#ifndef _di_iki_read_main_data_delete_
+ extern void iki_read_main_delete(iki_read_main_t * const main);
+#endif // _di_iki_read_main_data_delete_
+
+/**
+ * Delete the program main setting data.
+ *
+ * @param setting
+ * The program main setting data.
+ *
+ * This does not alter setting.state.status.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_iki_read_setting_delete_
+ extern f_status_t iki_read_setting_delete(iki_read_setting_t * const setting);
+#endif // _di_iki_read_setting_delete_
+
#ifdef __cplusplus
} // extern "C"
#endif
/**
* FLL - Level 3
*
- * Project: IKI
+ * Project: IKI Read
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
}
// Enforce a max block read size to allow for interrupts to be processed between blocks.
- if (size_file > iki_read_block_max) {
- file.size_read = iki_read_block_read_large;
- size_block = iki_read_block_max;
+ if (size_file > iki_read_block_max_d) {
+ file.size_read = iki_read_block_read_large_d;
+ size_block = iki_read_block_max_d;
}
else {
- file.size_read = iki_read_block_read_small;
+ file.size_read = iki_read_block_read_small_d;
size_block = size_file;
}
for (size_read = 0; size_read < size_file; size_read += size_block) {
// The signal check is always performed on each pass.
- if (size_file > iki_read_block_max && fll_program_standard_signal_received(&main->program)) {
+ if (size_file > iki_read_block_max_d && fll_program_standard_signal_received(&main->program)) {
fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
main->setting.state.status = F_status_set_error(F_interrupt);
/**
* FLL - Level 3
*
- * Project: IKI
+ * Project: IKI Read
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
#include <fll/level_0/rip.h>
#include <fll/level_0/signal.h>
+#ifndef _di_thread_support_
+ #include <fll/level_0/thread.h>
+#endif // _di_thread_support_
+
// FLL-1 includes.
#include <fll/level_1/conversion.h>
#include <fll/level_1/iki.h>
#include <program/iki_read/main/print/error.h>
#include <program/iki_read/main/print/message.h>
#include <program/iki_read/main/process.h>
+#include <program/iki_read/main/signal.h>
+#include <program/iki_read/main/thread.h>
#ifdef __cplusplus
extern "C" {
fll_program_standard_set_up(&data.program);
- {
- const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+ f_file_umask_get(&data.program.umask);
- iki_read_setting_load(arguments, &data);
- }
+ #ifdef _di_thread_support_
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ iki_read_setting_load(arguments, &data);
+ }
+
+ iki_read_main(&data);
+ #else
+ {
+ f_thread_id_t id_signal;
+
+ memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+ data.setting.state.status = f_thread_create(0, &id_signal, &iki_read_thread_signal, (void *) &data);
+
+ if (F_status_is_error(data.setting.state.status)) {
+ iki_read_print_error(&data.program.error, macro_iki_read_f(f_thread_create));
+ }
+ else {
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ iki_read_setting_load(arguments, &data);
+ }
- iki_read_main(&data);
+ if (!iki_read_signal_check(&data)) {
+ iki_read_main(&data);
+ }
- iki_read_setting_unload(&data);
+ f_thread_cancel(id_signal);
+ f_thread_join(id_signal, 0);
+ }
+ }
+ #endif // _di_thread_support_
- fll_program_data_delete(&data.program);
+ iki_read_main_delete(&data);
fll_program_standard_set_down(&data.program);
/**
* FLL - Level 3
*
- * Project: IKI
+ * Project: IKI Read
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
/**
* FLL - Level 3
*
- * Project: UTF8
+ * Project: IKI Read
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
/**
* FLL - Level 3
*
- * Project: IKI
+ * Project: IKI Read
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
--- /dev/null
+#include "iki_read.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_iki_read_signal_check_) && defined(_di_thread_support_)
+ f_status_t iki_read_signal_check(iki_read_main_t * const main) {
+
+ if (!main) return F_false;
+ if (main->program.signal.id == -1) return F_false;
+
+ if (!((++main->program.signal_check) % iki_read_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+ main->setting.state.status = F_status_set_error(F_interrupt);
+
+ return F_true;
+ }
+
+ main->program.signal_check = 0;
+ }
+
+ return F_false;
+ }
+#endif // !defined(_di_iki_read_signal_check_) && defined(_di_thread_support_)
+
+#if !defined(_di_iki_read_signal_check_) && !defined(_di_thread_support_)
+ f_status_t iki_read_signal_check(iki_read_main_t * const main) {
+
+ if (!main) return F_false;
+ if (main->program.signal.id == -1) return F_false;
+
+ if (main->program.signal_received) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+ main->setting.state.status = F_status_set_error(F_interrupt);
+
+ return F_true;
+ }
+
+ return F_false;
+ }
+#endif // !defined(_di_iki_read_signal_check_) && !defined(_di_thread_support_)
+
+#if !defined(_di_iki_read_signal_handler_) && !defined(_di_thread_support_)
+ void iki_read_signal_handler(iki_read_main_t * const main) {
+
+ if (!main) return;
+
+ siginfo_t information;
+ f_array_length_t failsafe = 0;
+
+ memset(&information, 0, sizeof(siginfo_t));
+
+ main->program.signal_received = 0;
+
+ f_signal_set_empty(&main->program.signal.set);
+ f_signal_set_add(F_signal_abort, &main->program.signal.set);
+ f_signal_set_add(F_signal_broken_pipe, &main->program.signal.set);
+ f_signal_set_add(F_signal_hangup, &main->program.signal.set);
+ f_signal_set_add(F_signal_interrupt, &main->program.signal.set);
+ f_signal_set_add(F_signal_quit, &main->program.signal.set);
+ f_signal_set_add(F_signal_termination, &main->program.signal.set);
+
+ if (main->program.signal.id == -1) {
+ main->setting.status_thread = f_signal_open(&main->program.signal);
+
+ if (F_status_is_error(main->setting.status_thread)) {
+ main->program.signal_received = F_signal_abort;
+
+ return;
+ }
+ }
+
+ do {
+ memset(&information, 0, sizeof(siginfo_t));
+
+ main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information);
+
+ if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) {
+ if (++failsafe >= iki_read_signal_check_failsafe_d) break;
+ }
+
+ switch (information.si_signo) {
+ case F_signal_abort:
+ case F_signal_broken_pipe:
+ case F_signal_hangup:
+ case F_signal_interrupt:
+ case F_signal_quit:
+ case F_signal_termination:
+ main->program.signal_received = information.si_signo;
+
+ break;
+ }
+
+ failsafe = 0;
+ main->setting.status_thread = F_none;
+
+ } while (!main->program.signal_received);
+
+ f_signal_close(&main->program.signal);
+
+ if (F_status_is_error(main->setting.status_thread)) {
+ main->program.signal_received = F_signal_abort;
+ }
+ }
+#endif // !defined(_di_iki_read_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Read
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides signal functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_read_signal_h
+#define _iki_read_signal_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Check to see if a signal is received.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ * - F_signal_abort
+ * - F_signal_broken_pipe
+ * - F_signal_hangup
+ * - F_signal_interrupt
+ * - F_signal_quit
+ * - F_signal_termination
+ *
+ * There is a threaded and a non-threaded version of this.
+ * The non-threaded version checks periodically using iki_read_signal_check_d and updates main->signal_check as needed.
+ * The threaded version checks the flag state which is set by a separate thread that is blocking until signal is received.
+ *
+ * @param main
+ * The main program and settings data.
+ *
+ * This does not alter main.setting.state.status.
+ *
+ * @return
+ * F_true on signal received.
+ * F_false otherwise.
+ *
+ * @see iki_read_signal_handler()
+ *
+ * @see fll_program_standard_signal_received()
+ */
+#ifndef _di_iki_read_signal_check_
+ extern f_status_t iki_read_signal_check(iki_read_main_t * const main);
+#endif // _di_iki_read_signal_check_
+
+/**
+ * Signal handler for signals/interrupts.
+ *
+ * This blocks until an expected signal is recieved.
+ * When an expected signal is received it then sets the
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ * - F_signal_abort
+ * - F_signal_broken_pipe
+ * - F_signal_hangup
+ * - F_signal_interrupt
+ * - F_signal_quit
+ * - F_signal_termination
+ *
+ * @param main
+ * The main program and settings data.
+ *
+ * This alters main.program.signal_received, setting it to a received signal.
+ *
+ * This alters setting.status:
+ * Errors with (error bit set) from: f_signal_open()
+ * Errors with (error bit set) from: f_signal_wait()
+ *
+ * @see f_signal_close()
+ * @see f_signal_open()
+ * @see f_signal_wait()
+ */
+#if !defined(_di_iki_read_signal_handler_) && !defined(_di_thread_support_)
+ extern void iki_read_signal_handler(iki_read_main_t * const main);
+#endif // !defined(_di_iki_read_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_read_signal_h
--- /dev/null
+#include "iki_read.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_iki_read_thread_signal_) && !defined(_di_thread_support_)
+ void * iki_read_thread_signal(void * const main) {
+
+ f_thread_cancel_state_set(PTHREAD_CANCEL_DEFERRED, 0);
+
+ if (main) {
+ iki_read_signal_handler((iki_read_main_t *) main);
+ }
+
+ return 0;
+ }
+#endif // !defined(_di_iki_read_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Read
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides thread functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_read_thread_h
+#define _iki_read_thread_h
+
+/**
+ * Thread handler for signals/interrupts.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ * - F_signal_abort
+ * - F_signal_broken_pipe
+ * - F_signal_hangup
+ * - F_signal_interrupt
+ * - F_signal_quit
+ * - F_signal_termination
+ *
+ * @param main
+ * The program and settings data.
+ *
+ * Must be of type iki_read_main_t.
+ *
+ * @return
+ * 0, always.
+ *
+ * @see f_thread_cancel_state_set()
+ *
+ * @see iki_read_signal_handler()
+ */
+#if !defined(_di_iki_read_thread_signal_) && !defined(_di_thread_support_)
+ extern void * iki_read_thread_signal(void * const main);
+#endif // !defined(_di_iki_read_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_read_thread_h
# fss-0000
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name iki_read
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc
build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion -lfl_iki -lfl_print -lfl_signal -lf_color -lf_compare -lf_console -lf_conversion -lf_file -lf_iki -lf_memory -lf_pipe -lf_print -lf_rip -lf_signal -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
-build_sources_library main/iki_read.c main/common.c main/identify.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/print/data.c main/print/error.c main/print/message.c main/process.c
+build_sources_library main/iki_read.c main/common.c main/identify.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/print/data.c main/print/error.c main/print/message.c main/process.c main/signal.c main/thread.c
build_sources_program main/main.c
-build_sources_headers main/iki_read.h main/common.h main/identify.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/print/data.h main/print/error.h main/print/message.h main/process.h
+build_sources_headers main/iki_read.h main/common.h main/identify.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/print/data.h main/print/error.h main/print/message.h main/process.h main/signal.h main/thread.h
build_sources_documentation man
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
extern "C" {
#endif
-#ifndef _di_iki_write_setting_delete_
- f_status_t iki_write_setting_delete(iki_write_setting_t * const setting) {
-
- if (!setting) return F_status_set_error(F_parameter);
-
- f_string_dynamic_resize(0, &setting->escaped);
- f_string_dynamic_resize(0, &setting->buffer);
- f_string_dynamic_resize(0, &setting->object);
- f_string_dynamic_resize(0, &setting->content);
-
- f_string_dynamics_resize(0, &setting->objects);
- f_string_dynamics_resize(0, &setting->contents);
-
- return F_none;
- }
-#endif // _di_iki_write_setting_delete_
-
#ifndef _di_iki_write_setting_load_
void iki_write_setting_load(const f_console_arguments_t arguments, iki_write_main_t * const main) {
}
#endif // _di_iki_write_setting_load_
-#ifndef _di_iki_write_setting_unload_
- f_status_t iki_write_setting_unload(iki_write_main_t * const main) {
-
- if (!main) return F_status_set_error(F_parameter);
-
- iki_write_setting_delete(&main->setting);
-
- return F_none;
- }
-#endif // _di_iki_write_setting_unload_
-
#ifdef __cplusplus
} // extern "C"
#endif
#endif
/**
- * Delete the program main setting data.
- *
- * @param setting
- * The program main setting data.
- *
- * This does not alter setting.state.status.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_iki_write_setting_delete_
- extern f_status_t iki_write_setting_delete(iki_write_setting_t * const setting);
-#endif // _di_iki_write_setting_delete_
-
-/**
* Perform the standard program setting load process.
*
* This prints error messages as appropriate.
extern void iki_write_setting_load(const f_console_arguments_t arguments, iki_write_main_t * const main);
#endif // _di_iki_write_setting_load_
-/**
- * Perform the standard program setting unload process.
- *
- * @param main
- * The main program and setting data.
- * All buffers are deallocated.
- *
- * This does not alter main.setting.state.status.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: iki_write_setting_delete().
- *
- * @see iki_write_setting_delete()
- */
-#ifndef _di_iki_write_setting_unload_
- extern f_status_t iki_write_setting_unload(iki_write_main_t * const main);
-#endif // _di_iki_write_setting_unload_
-
#ifdef __cplusplus
} // extern "C"
#endif
#endif
/**
- * The program defines.
+ * The program allocation defines.
*
- * iki_write_*_d:
- * - allocation_console: An allocation step used for small buffers specifically for console parameter.
- * - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
- * - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
- * - signal_check: Number of iterations before performing signal check in non-threaded signal handling.
+ * iki_write_allocation_*_d:
+ * - console: An allocation step used for small buffers specifically for console parameter.
+ * - large: An allocation step used for buffers that are anticipated to have large buffers.
+ * - pipe: A buffer size used for processing piped data.
+ * - small: An allocation step used for buffers that are anticipated to have small buffers.
*/
-#ifndef _di_iki_write_d_
+#ifndef _di_iki_write_allocation_d_
#define iki_write_allocation_console_d 4
#define iki_write_allocation_large_d 256
+ #define iki_write_allocation_pipe_d 16384
#define iki_write_allocation_small_d 16
- #define iki_write_signal_check_d 20000
-#endif // _di_iki_write_d_
+#endif // _di_iki_write_allocation_d_
+
+/**
+ * The program signal defines.
+ *
+ * iki_write_signal_*_d:
+ * - check: Number of iterations before performing signal check in non-threaded signal handling.
+ * - check_failsafe: When using threads, how many consecutive failures to check signal before aborting (as a recursion failsafe).
+ * - check_tiny: The tiny check.
+ * - check_short: The short signal check.
+ */
+#ifndef _di_iki_write_signal_d_
+ #define iki_write_signal_check_d 500000
+ #define iki_write_signal_check_failsafe_d 20000
+ #define iki_write_signal_check_tiny_d 4
+ #define iki_write_signal_check_short_d 16
+#endif // _di_iki_write_signal_d_
+
+/**
+ * Deallocate main program data.
+ *
+ * @param setting_make
+ * The make setting data.
+ *
+ * This does not alter data_make.main.setting.state.status.
+ */
+#ifndef _di_iki_write_main_data_delete_
+ extern void iki_write_main_delete(iki_write_main_t * const main);
+#endif // _di_iki_write_main_data_delete_
#ifdef __cplusplus
} // extern "C"
"f_string_dynamic_partial_append_nulless",
"f_string_dynamic_seek_to",
"f_string_dynamics_resize",
+ "f_thread_create",
"fll_iki_content_escape",
"fll_program_parameter_process_context",
"fll_program_parameter_process_verbosity",
iki_write_f_f_string_dynamic_partial_append_nulless_e,
iki_write_f_f_string_dynamic_seek_to_e,
iki_write_f_f_string_dynamics_resize_e,
+ iki_write_f_f_thread_create_e,
iki_write_f_fll_iki_content_escape_e,
iki_write_f_fll_program_parameter_process_context_e,
iki_write_f_fll_program_parameter_process_verbosity_e,
extern "C" {
#endif
+#ifndef _di_iki_write_main_data_delete_
+ void iki_write_main_delete(iki_write_main_t * const main) {
+
+ if (!main) return;
+
+ fll_program_data_delete(&main->program);
+ iki_write_setting_delete(&main->setting);
+ }
+#endif // _di_iki_write_main_data_delete_
+
+#ifndef _di_iki_write_setting_delete_
+ f_status_t iki_write_setting_delete(iki_write_setting_t * const setting) {
+
+ if (!setting) return F_status_set_error(F_parameter);
+
+ f_string_dynamic_resize(0, &setting->escaped);
+ f_string_dynamic_resize(0, &setting->buffer);
+ f_string_dynamic_resize(0, &setting->object);
+ f_string_dynamic_resize(0, &setting->content);
+
+ f_string_dynamics_resize(0, &setting->objects);
+ f_string_dynamics_resize(0, &setting->contents);
+
+ return F_none;
+ }
+#endif // _di_iki_write_setting_delete_
+
#ifdef __cplusplus
} // extern "C"
#endif
*
* flag: Flags passed to the main function.
*
- * state: The state information.
+ * status_thread: A status used eclusively by the threaded signal handler.
+ * state: The state data used when processing the FSS data.
*
* quote: This holds the quote used during processing.
*
typedef struct {
uint16_t flag;
+ f_status_t status_thread;
f_state_t state;
f_string_static_t quote;
#define iki_write_setting_t_initialize \
{ \
iki_write_main_flag_none_e, \
+ F_none, \
f_state_t_initialize, \
f_string_dynamic_t_initialize, \
f_string_dynamic_t_initialize, \
}
#endif // _di_iki_write_main_t_
+/**
+ * Deallocate main program data.
+ *
+ * @param setting_make
+ * The make setting data.
+ *
+ * This does not alter data_make.main.setting.state.status.
+ */
+#ifndef _di_iki_write_main_data_delete_
+ extern void iki_write_main_delete(iki_write_main_t * const main);
+#endif // _di_iki_write_main_data_delete_
+
+/**
+ * Delete the program main setting data.
+ *
+ * @param setting
+ * The program main setting data.
+ *
+ * This does not alter setting.state.status.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_iki_write_setting_delete_
+ extern f_status_t iki_write_setting_delete(iki_write_setting_t * const setting);
+#endif // _di_iki_write_setting_delete_
+
#ifdef __cplusplus
} // extern "C"
#endif
/**
* FLL - Level 3
*
- * Project: IKI
+ * Project: IKI Write
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
#include <fll/level_0/rip.h>
#include <fll/level_0/signal.h>
+#ifndef _di_thread_support_
+ #include <fll/level_0/thread.h>
+#endif // _di_thread_support_
+
// FLL-1 includes.
#include <fll/level_1/conversion.h>
#include <fll/level_1/iki.h>
#include <program/iki_write/main/print/error.h>
#include <program/iki_write/main/print/message.h>
#include <program/iki_write/main/process.h>
+#include <program/iki_write/main/signal.h>
+#include <program/iki_write/main/thread.h>
#ifdef __cplusplus
extern "C" {
fll_program_standard_set_up(&data.program);
- {
- const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+ f_file_umask_get(&data.program.umask);
- iki_write_setting_load(arguments, &data);
- }
+ #ifdef _di_thread_support_
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ iki_write_setting_load(arguments, &data);
+ }
+
+ iki_write_main(&data);
+ #else
+ {
+ f_thread_id_t id_signal;
+
+ memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+ data.setting.state.status = f_thread_create(0, &id_signal, &iki_write_thread_signal, (void *) &data);
+
+ if (F_status_is_error(data.setting.state.status)) {
+ iki_write_print_error(&data.program.error, macro_iki_write_f(f_thread_create));
+ }
+ else {
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ iki_write_setting_load(arguments, &data);
+ }
- iki_write_main(&data);
+ if (!iki_write_signal_check(&data)) {
+ iki_write_main(&data);
+ }
- iki_write_setting_unload(&data);
+ f_thread_cancel(id_signal);
+ f_thread_join(id_signal, 0);
+ }
+ }
+ #endif // _di_thread_support_
- fll_program_data_delete(&data.program);
+ iki_write_main_delete(&data);
fll_program_standard_set_down(&data.program);
/**
* FLL - Level 3
*
- * Project: IKI
+ * Project: IKI Write
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
--- /dev/null
+#include "iki_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_iki_write_signal_check_) && defined(_di_thread_support_)
+ f_status_t iki_write_signal_check(iki_write_main_t * const main) {
+
+ if (!main) return F_false;
+ if (main->program.signal.id == -1) return F_false;
+
+ if (!((++main->program.signal_check) % iki_write_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+ main->setting.state.status = F_status_set_error(F_interrupt);
+
+ return F_true;
+ }
+
+ main->program.signal_check = 0;
+ }
+
+ return F_false;
+ }
+#endif // !defined(_di_iki_write_signal_check_) && defined(_di_thread_support_)
+
+#if !defined(_di_iki_write_signal_check_) && !defined(_di_thread_support_)
+ f_status_t iki_write_signal_check(iki_write_main_t * const main) {
+
+ if (!main) return F_false;
+ if (main->program.signal.id == -1) return F_false;
+
+ if (main->program.signal_received) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+ main->setting.state.status = F_status_set_error(F_interrupt);
+
+ return F_true;
+ }
+
+ return F_false;
+ }
+#endif // !defined(_di_iki_write_signal_check_) && !defined(_di_thread_support_)
+
+#if !defined(_di_iki_write_signal_handler_) && !defined(_di_thread_support_)
+ void iki_write_signal_handler(iki_write_main_t * const main) {
+
+ if (!main) return;
+
+ siginfo_t information;
+ f_array_length_t failsafe = 0;
+
+ memset(&information, 0, sizeof(siginfo_t));
+
+ main->program.signal_received = 0;
+
+ f_signal_set_empty(&main->program.signal.set);
+ f_signal_set_add(F_signal_abort, &main->program.signal.set);
+ f_signal_set_add(F_signal_broken_pipe, &main->program.signal.set);
+ f_signal_set_add(F_signal_hangup, &main->program.signal.set);
+ f_signal_set_add(F_signal_interrupt, &main->program.signal.set);
+ f_signal_set_add(F_signal_quit, &main->program.signal.set);
+ f_signal_set_add(F_signal_termination, &main->program.signal.set);
+
+ if (main->program.signal.id == -1) {
+ main->setting.status_thread = f_signal_open(&main->program.signal);
+
+ if (F_status_is_error(main->setting.status_thread)) {
+ main->program.signal_received = F_signal_abort;
+
+ return;
+ }
+ }
+
+ do {
+ memset(&information, 0, sizeof(siginfo_t));
+
+ main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information);
+
+ if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) {
+ if (++failsafe >= iki_write_signal_check_failsafe_d) break;
+ }
+
+ switch (information.si_signo) {
+ case F_signal_abort:
+ case F_signal_broken_pipe:
+ case F_signal_hangup:
+ case F_signal_interrupt:
+ case F_signal_quit:
+ case F_signal_termination:
+ main->program.signal_received = information.si_signo;
+
+ break;
+ }
+
+ failsafe = 0;
+ main->setting.status_thread = F_none;
+
+ } while (!main->program.signal_received);
+
+ f_signal_close(&main->program.signal);
+
+ if (F_status_is_error(main->setting.status_thread)) {
+ main->program.signal_received = F_signal_abort;
+ }
+ }
+#endif // !defined(_di_iki_write_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides signal functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_write_signal_h
+#define _iki_write_signal_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Check to see if a signal is received.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ * - F_signal_abort
+ * - F_signal_broken_pipe
+ * - F_signal_hangup
+ * - F_signal_interrupt
+ * - F_signal_quit
+ * - F_signal_termination
+ *
+ * There is a threaded and a non-threaded version of this.
+ * The non-threaded version checks periodically using iki_write_signal_check_d and updates main->signal_check as needed.
+ * The threaded version checks the flag state which is set by a separate thread that is blocking until signal is received.
+ *
+ * @param main
+ * The main program and settings data.
+ *
+ * This does not alter main.setting.state.status.
+ *
+ * @return
+ * F_true on signal received.
+ * F_false otherwise.
+ *
+ * @see iki_write_signal_handler()
+ *
+ * @see fll_program_standard_signal_received()
+ */
+#ifndef _di_iki_write_signal_check_
+ extern f_status_t iki_write_signal_check(iki_write_main_t * const main);
+#endif // _di_iki_write_signal_check_
+
+/**
+ * Signal handler for signals/interrupts.
+ *
+ * This blocks until an expected signal is recieved.
+ * When an expected signal is received it then sets the
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ * - F_signal_abort
+ * - F_signal_broken_pipe
+ * - F_signal_hangup
+ * - F_signal_interrupt
+ * - F_signal_quit
+ * - F_signal_termination
+ *
+ * @param main
+ * The main program and settings data.
+ *
+ * This alters main.program.signal_received, setting it to a received signal.
+ *
+ * This alters setting.status:
+ * Errors with (error bit set) from: f_signal_open()
+ * Errors with (error bit set) from: f_signal_wait()
+ *
+ * @see f_signal_close()
+ * @see f_signal_open()
+ * @see f_signal_wait()
+ */
+#if !defined(_di_iki_write_signal_handler_) && !defined(_di_thread_support_)
+ extern void iki_write_signal_handler(iki_write_main_t * const main);
+#endif // !defined(_di_iki_write_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_write_signal_h
--- /dev/null
+#include "iki_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_iki_write_thread_signal_) && !defined(_di_thread_support_)
+ void * iki_write_thread_signal(void * const main) {
+
+ f_thread_cancel_state_set(PTHREAD_CANCEL_DEFERRED, 0);
+
+ if (main) {
+ iki_write_signal_handler((iki_write_main_t *) main);
+ }
+
+ return 0;
+ }
+#endif // !defined(_di_iki_write_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides thread functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_write_thread_h
+#define _iki_write_thread_h
+
+/**
+ * Thread handler for signals/interrupts.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ * - F_signal_abort
+ * - F_signal_broken_pipe
+ * - F_signal_hangup
+ * - F_signal_interrupt
+ * - F_signal_quit
+ * - F_signal_termination
+ *
+ * @param main
+ * The program and settings data.
+ *
+ * Must be of type iki_write_main_t.
+ *
+ * @return
+ * 0, always.
+ *
+ * @see f_thread_cancel_state_set()
+ *
+ * @see iki_write_signal_handler()
+ */
+#if !defined(_di_iki_write_thread_signal_) && !defined(_di_thread_support_)
+ extern void * iki_write_thread_signal(void * const main);
+#endif // !defined(_di_iki_write_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_write_thread_h
# fss-0000
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name iki_write
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_language c
build_libraries -lc
build_libraries-individual -lfll_error -lfll_iki -lfll_print -lfll_program -lfl_iki -lfl_print -lf_color -lf_console -lf_conversion -lf_file -lf_iki -lf_memory -lf_pipe -lf_print -lf_rip -lf_signal -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
-build_sources_library main/iki_write.c main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/print/error.c main/print/message.c main/process.c
+build_sources_library main/iki_write.c main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/print/error.c main/print/message.c main/process.c main/signal.c main/thread.c
build_sources_program main/main.c
-build_sources_headers main/iki_write.h main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/print/error.h main/print/message.h main/process.h
+build_sources_headers main/iki_write.h main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/print/error.h main/print/message.h main/process.h main/signal.h main/thread.h
build_sources_documentation man
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
+
flags_library -fPIC
flags_object -fPIC
flags_program -fPIE
fll_program_standard_set_up(&data.program);
- {
- const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+ f_file_umask_get(&data.program.umask);
- status_code_setting_load(arguments, &data);
- }
+ #ifdef _di_thread_support_
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ status_code_setting_load(arguments, &data);
+ }
+
+ status_code_main(&data);
+ #else
+ {
+ f_thread_id_t id_signal;
+
+ memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+ data.setting.state.status = f_thread_create(0, &id_signal, &status_code_thread_signal, (void *) &data);
+
+ if (F_status_is_error(data.setting.state.status)) {
+ status_code_print_error(&data.program.error, macro_status_code_f(f_thread_create));
+ }
+ else {
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ status_code_setting_load(arguments, &data);
+ }
- status_code_main(&data);
+ if (!status_code_signal_check(&data)) {
+ status_code_main(&data);
+ }
- status_code_setting_unload(&data);
+ f_thread_cancel(id_signal);
+ f_thread_join(id_signal, 0);
+ }
+ }
+ #endif // _di_thread_support_
- fll_program_data_delete(&data.program);
+ status_code_main_delete(&data);
fll_program_standard_set_down(&data.program);
extern "C" {
#endif
-#ifndef _di_status_code_setting_delete_
- f_status_t status_code_setting_delete(status_code_setting_t * const setting) {
-
- if (!setting) return F_status_set_error(F_parameter);
-
- return F_none;
- }
-#endif // _di_status_code_setting_delete_
-
#ifndef _di_status_code_setting_load_
void status_code_setting_load(const f_console_arguments_t arguments, status_code_main_t * const main) {
}
#endif // _di_status_code_setting_load_
-#ifndef _di_status_code_setting_unload_
- f_status_t status_code_setting_unload(status_code_main_t * const main) {
-
- if (!main) return F_status_set_error(F_parameter);
-
- status_code_setting_delete(&main->setting);
-
- return F_none;
- }
-#endif // _di_status_code_setting_unload_
-
#ifdef __cplusplus
} // extern "C"
#endif
#endif
/**
- * Delete the program main setting data.
- *
- * @param setting
- * The program main setting data.
- *
- * This does not alter setting.state.status.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_status_code_setting_delete_
- extern f_status_t status_code_setting_delete(status_code_setting_t * const setting);
-#endif // _di_status_code_setting_delete_
-
-/**
* Perform the standard program setting load process.
*
* This prints error messages as appropriate.
extern void status_code_setting_load(const f_console_arguments_t arguments, status_code_main_t * const main);
#endif // _di_status_code_setting_load_
-/**
- * Perform the standard program setting unload process.
- *
- * @param main
- * The main program and setting data.
- * All buffers are deallocated.
- *
- * This does not alter main.setting.state.status.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: status_code_setting_delete().
- *
- * @see status_code_setting_delete()
- */
-#ifndef _di_status_code_setting_unload_
- extern f_status_t status_code_setting_unload(status_code_main_t * const main);
-#endif // _di_status_code_setting_unload_
-
#ifdef __cplusplus
} // extern "C"
#endif
#endif
/**
- * The program defines.
+ * The program allocation defines.
*
- * status_code_*_d:
- * - allocation_console: An allocation step used for small buffers specifically for console parameter.
- * - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
- * - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
- * - signal_check: Number of iterations before performing signal check in non-threaded signal handling.
+ * status_code_allocation_*_d:
+ * - console: An allocation step used for small buffers specifically for console parameter.
+ * - large: An allocation step used for buffers that are anticipated to have large buffers.
+ * - pipe: A buffer size used for processing piped data.
+ * - small: An allocation step used for buffers that are anticipated to have small buffers.
*/
-#ifndef _di_status_code_d_
+#ifndef _di_status_code_allocation_d_
#define status_code_allocation_console_d 4
#define status_code_allocation_large_d 256
+ #define status_code_allocation_pipe_d 16384
#define status_code_allocation_small_d 16
- #define status_code_signal_check_d 20000
-#endif // _di_status_code_d_
+#endif // _di_status_code_allocation_d_
+
+/**
+ * The program signal defines.
+ *
+ * status_code_signal_*_d:
+ * - check: Number of iterations before performing signal check in non-threaded signal handling.
+ * - check_failsafe: When using threads, how many consecutive failures to check signal before aborting (as a recursion failsafe).
+ * - check_tiny: The tiny check.
+ * - check_short: The short signal check.
+ */
+#ifndef _di_status_code_signal_d_
+ #define status_code_signal_check_d 500000
+ #define status_code_signal_check_failsafe_d 20000
+ #define status_code_signal_check_tiny_d 4
+ #define status_code_signal_check_short_d 16
+#endif // _di_status_code_signal_d_
#ifdef __cplusplus
} // extern "C"
#ifndef _di_status_code_f_a_
const f_string_t status_code_f_a[] = {
"f_console_parameter_process",
- "status_string_from",
- "status_string_to",
+ "f_thread_create",
"fll_program_parameter_process_context",
"fll_program_parameter_process_verbosity",
+ "status_string_from",
+ "status_string_to",
};
#endif // _di_status_code_f_a_
#ifndef _di_status_code_f_e_
enum {
status_code_f_f_console_parameter_process_e,
- status_code_f_status_string_from_e,
- status_code_f_status_string_to_e,
+ status_code_f_f_thread_create_e,
status_code_f_fll_program_parameter_process_context_e,
status_code_f_fll_program_parameter_process_verbosity_e,
+ status_code_f_status_string_from_e,
+ status_code_f_status_string_to_e,
}; // enum
#endif // _di_status_code_f_e_
extern "C" {
#endif
+#ifndef _di_status_code_main_data_delete_
+ void status_code_main_delete(status_code_main_t * const main) {
+
+ if (!main) return;
+
+ fll_program_data_delete(&main->program);
+ status_code_setting_delete(&main->setting);
+ }
+#endif // _di_status_code_main_data_delete_
+
+#ifndef _di_status_code_setting_delete_
+ f_status_t status_code_setting_delete(status_code_setting_t * const setting) {
+
+ if (!setting) return F_status_set_error(F_parameter);
+
+ return F_none;
+ }
+#endif // _di_status_code_setting_delete_
+
#ifdef __cplusplus
} // extern "C"
#endif
*
* flag: Flags passed to the main function.
*
- * state: The state information.
+ * status_thread: A status used eclusively by the threaded signal handler.
+ * state: The state data used when processing the FSS data.
*
* status_string_from: A pointer to the status string function (usually either fl_status_string_from() or fll_fss_status_string_from()).
* status_string_to: A pointer to the status string function (usually either f_status_string_to() or fll_fss_status_string_to()).
typedef struct {
uint16_t flag;
+ f_status_t status_thread;
f_state_t state;
const f_string_static_t *program_name;
#define status_code_setting_t_initialize \
{ \
status_code_main_flag_none_e, \
+ F_none, \
f_state_t_initialize, \
0, \
0, \
}
#endif // _di_status_code_main_t_
+/**
+ * Deallocate main program data.
+ *
+ * @param setting_make
+ * The make setting data.
+ *
+ * This does not alter data_make.main.setting.state.status.
+ */
+#ifndef _di_status_code_main_data_delete_
+ extern void status_code_main_delete(status_code_main_t * const main);
+#endif // _di_status_code_main_data_delete_
+
+/**
+ * Delete the program main setting data.
+ *
+ * @param setting
+ * The program main setting data.
+ *
+ * This does not alter setting.state.status.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_status_code_setting_delete_
+ extern f_status_t status_code_setting_delete(status_code_setting_t * const setting);
+#endif // _di_status_code_setting_delete_
+
#ifdef __cplusplus
} // extern "C"
#endif
fll_program_standard_set_up(&data.program);
- {
- const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+ f_file_umask_get(&data.program.umask);
- status_code_setting_load(arguments, &data);
- }
+ #ifdef _di_thread_support_
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ status_code_setting_load(arguments, &data);
+ }
+
+ status_code_main(&data);
+ #else
+ {
+ f_thread_id_t id_signal;
+
+ memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+ data.setting.state.status = f_thread_create(0, &id_signal, &status_code_thread_signal, (void *) &data);
+
+ if (F_status_is_error(data.setting.state.status)) {
+ status_code_print_error(&data.program.error, macro_status_code_f(f_thread_create));
+ }
+ else {
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ status_code_setting_load(arguments, &data);
+ }
- status_code_main(&data);
+ if (!status_code_signal_check(&data)) {
+ status_code_main(&data);
+ }
- status_code_setting_unload(&data);
+ f_thread_cancel(id_signal);
+ f_thread_join(id_signal, 0);
+ }
+ }
+ #endif // _di_thread_support_
- fll_program_data_delete(&data.program);
+ status_code_main_delete(&data);
fll_program_standard_set_down(&data.program);
--- /dev/null
+#include "status_code.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_status_code_signal_check_) && defined(_di_thread_support_)
+ f_status_t status_code_signal_check(status_code_main_t * const main) {
+
+ if (!main) return F_false;
+ if (main->program.signal.id == -1) return F_false;
+
+ if (!((++main->program.signal_check) % status_code_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+ main->setting.state.status = F_status_set_error(F_interrupt);
+
+ return F_true;
+ }
+
+ main->program.signal_check = 0;
+ }
+
+ return F_false;
+ }
+#endif // !defined(_di_status_code_signal_check_) && defined(_di_thread_support_)
+
+#if !defined(_di_status_code_signal_check_) && !defined(_di_thread_support_)
+ f_status_t status_code_signal_check(status_code_main_t * const main) {
+
+ if (!main) return F_false;
+ if (main->program.signal.id == -1) return F_false;
+
+ if (main->program.signal_received) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+ main->setting.state.status = F_status_set_error(F_interrupt);
+
+ return F_true;
+ }
+
+ return F_false;
+ }
+#endif // !defined(_di_status_code_signal_check_) && !defined(_di_thread_support_)
+
+#if !defined(_di_status_code_signal_handler_) && !defined(_di_thread_support_)
+ void status_code_signal_handler(status_code_main_t * const main) {
+
+ if (!main) return;
+
+ siginfo_t information;
+ f_array_length_t failsafe = 0;
+
+ memset(&information, 0, sizeof(siginfo_t));
+
+ main->program.signal_received = 0;
+
+ f_signal_set_empty(&main->program.signal.set);
+ f_signal_set_add(F_signal_abort, &main->program.signal.set);
+ f_signal_set_add(F_signal_broken_pipe, &main->program.signal.set);
+ f_signal_set_add(F_signal_hangup, &main->program.signal.set);
+ f_signal_set_add(F_signal_interrupt, &main->program.signal.set);
+ f_signal_set_add(F_signal_quit, &main->program.signal.set);
+ f_signal_set_add(F_signal_termination, &main->program.signal.set);
+
+ if (main->program.signal.id == -1) {
+ main->setting.status_thread = f_signal_open(&main->program.signal);
+
+ if (F_status_is_error(main->setting.status_thread)) {
+ main->program.signal_received = F_signal_abort;
+
+ return;
+ }
+ }
+
+ do {
+ memset(&information, 0, sizeof(siginfo_t));
+
+ main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information);
+
+ if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) {
+ if (++failsafe >= status_code_signal_check_failsafe_d) break;
+ }
+
+ switch (information.si_signo) {
+ case F_signal_abort:
+ case F_signal_broken_pipe:
+ case F_signal_hangup:
+ case F_signal_interrupt:
+ case F_signal_quit:
+ case F_signal_termination:
+ main->program.signal_received = information.si_signo;
+
+ break;
+ }
+
+ failsafe = 0;
+ main->setting.status_thread = F_none;
+
+ } while (!main->program.signal_received);
+
+ f_signal_close(&main->program.signal);
+
+ if (F_status_is_error(main->setting.status_thread)) {
+ main->program.signal_received = F_signal_abort;
+ }
+ }
+#endif // !defined(_di_status_code_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Status Code
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides signal functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _status_code_signal_h
+#define _status_code_signal_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Check to see if a signal is received.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ * - F_signal_abort
+ * - F_signal_broken_pipe
+ * - F_signal_hangup
+ * - F_signal_interrupt
+ * - F_signal_quit
+ * - F_signal_termination
+ *
+ * There is a threaded and a non-threaded version of this.
+ * The non-threaded version checks periodically using status_code_signal_check_d and updates main->signal_check as needed.
+ * The threaded version checks the flag state which is set by a separate thread that is blocking until signal is received.
+ *
+ * @param main
+ * The main program and settings data.
+ *
+ * This does not alter main.setting.state.status.
+ *
+ * @return
+ * F_true on signal received.
+ * F_false otherwise.
+ *
+ * @see status_code_signal_handler()
+ *
+ * @see fll_program_standard_signal_received()
+ */
+#ifndef _di_status_code_signal_check_
+ extern f_status_t status_code_signal_check(status_code_main_t * const main);
+#endif // _di_status_code_signal_check_
+
+/**
+ * Signal handler for signals/interrupts.
+ *
+ * This blocks until an expected signal is recieved.
+ * When an expected signal is received it then sets the
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ * - F_signal_abort
+ * - F_signal_broken_pipe
+ * - F_signal_hangup
+ * - F_signal_interrupt
+ * - F_signal_quit
+ * - F_signal_termination
+ *
+ * @param main
+ * The main program and settings data.
+ *
+ * This alters main.program.signal_received, setting it to a received signal.
+ *
+ * This alters setting.status:
+ * Errors with (error bit set) from: f_signal_open()
+ * Errors with (error bit set) from: f_signal_wait()
+ *
+ * @see f_signal_close()
+ * @see f_signal_open()
+ * @see f_signal_wait()
+ */
+#if !defined(_di_status_code_signal_handler_) && !defined(_di_thread_support_)
+ extern void status_code_signal_handler(status_code_main_t * const main);
+#endif // !defined(_di_status_code_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _status_code_signal_h
#include <fll/level_0/signal.h>
#include <fll/level_0/status_string.h>
+#ifndef _di_thread_support_
+ #include <fll/level_0/thread.h>
+#endif // _di_thread_support_
+
// FLL-1 includes.
#include <fll/level_1/conversion.h>
#include <fll/level_1/print.h>
#include <program/status_code/main/print/error.h>
#include <program/status_code/main/print/message.h>
#include <program/status_code/main/process.h>
+#include <program/status_code/main/signal.h>
+#include <program/status_code/main/thread.h>
#ifdef __cplusplus
extern "C" {
--- /dev/null
+#include "status_code.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_status_code_thread_signal_) && !defined(_di_thread_support_)
+ void * status_code_thread_signal(void * const main) {
+
+ f_thread_cancel_state_set(PTHREAD_CANCEL_DEFERRED, 0);
+
+ if (main) {
+ status_code_signal_handler((status_code_main_t *) main);
+ }
+
+ return 0;
+ }
+#endif // !defined(_di_status_code_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Status Code
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides thread functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _status_code_thread_h
+#define _status_code_thread_h
+
+/**
+ * Thread handler for signals/interrupts.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ * - F_signal_abort
+ * - F_signal_broken_pipe
+ * - F_signal_hangup
+ * - F_signal_interrupt
+ * - F_signal_quit
+ * - F_signal_termination
+ *
+ * @param main
+ * The program and settings data.
+ *
+ * Must be of type status_code_main_t.
+ *
+ * @return
+ * 0, always.
+ *
+ * @see f_thread_cancel_state_set()
+ *
+ * @see status_code_signal_handler()
+ */
+#if !defined(_di_status_code_thread_signal_) && !defined(_di_thread_support_)
+ extern void * status_code_thread_signal(void * const main);
+#endif // !defined(_di_status_code_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _status_code_thread_h
# Defines for the "status_code" program.
#
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
#
# Defines for the "fss_status_code" program.
#
+
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
#
# Builds the main library of the project with all parts except "main" program related.
#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name status_code
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc
build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_print -lfl_status_string -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_file -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
-build_sources_library main/status_code.c main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/convert.c main/print/data.c main/print/error.c main/print/message.c main/process.c
+build_sources_library main/status_code.c main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/convert.c main/print/data.c main/print/error.c main/print/message.c main/process.c main/signal.c main/thread.c
build_sources_library fss/status_code.c fss/common.c
-build_sources_headers main/status_code.h main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/convert.h main/print/data.h main/print/error.h main/print/message.h main/process.h
+build_sources_headers main/status_code.h main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/convert.h main/print/data.h main/print/error.h main/print/message.h main/process.h main/signal.h main/thread.h
build_sources_headers fss/status_code.h fss/common.h
build_sources_documentation man
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer
# Builds the "fss" program (fss_status_code).
# This must be called after the "setting".
#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name fss_status_code
version_file micro
version_target minor
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc -lstatus_code
build_libraries-individual -lfll_error -lfll_fss_status_string -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status_string -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
# Builds the "main" program (status_code).
# This must be called after the "setting".
#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name status_code
version_file micro
version_target minor
-modes individual level monolithic clang test
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc -lstatus_code
build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_print -lfl_status_string -lf_color -lf_console -lf_conversion -lf_directory -lf_file -lf_memory -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
if (*mode != utf8_codepoint_mode_end_e) {
if (main->setting.text.used + unicode.used >= main->setting.text.size) {
- main->setting.state.status = f_string_dynamic_increase_by(utf8_default_allocation_step_d, &main->setting.text);
+ main->setting.state.status = f_string_dynamic_increase_by(utf8_allocation_small_d, &main->setting.text);
if (F_status_is_error(main->setting.state.status)) return;
}
if (*mode != utf8_codepoint_mode_raw_end_e) {
if (main->setting.text.used + hex.used >= main->setting.text.size) {
- main->setting.state.status = f_string_dynamic_increase_by(utf8_default_allocation_step_d, &main->setting.text);
+ main->setting.state.status = f_string_dynamic_increase_by(utf8_allocation_small_d, &main->setting.text);
if (F_status_is_error(main->setting.state.status)) return;
}
extern "C" {
#endif
-#ifndef _di_utf8_setting_delete_
- f_status_t utf8_setting_delete(utf8_setting_t * const setting) {
-
- if (!setting) return F_status_set_error(F_parameter);
-
- f_string_dynamic_resize(0, &setting->buffer);
- f_string_dynamic_resize(0, &setting->text);
-
- f_string_dynamics_resize(0, &setting->path_files_from);
- f_string_dynamics_resize(0, &setting->path_files_to);
- f_string_dynamics_resize(0, &setting->remaining);
-
- return F_none;
- }
-#endif // _di_utf8_setting_delete_
-
#ifndef _di_utf8_setting_load_
void utf8_setting_load(const f_console_arguments_t arguments, utf8_main_t * const main) {
}
#endif // _di_utf8_setting_load_
-#ifndef _di_utf8_setting_unload_
- f_status_t utf8_setting_unload(utf8_main_t * const main) {
-
- if (!main) return F_status_set_error(F_parameter);
-
- utf8_setting_delete(&main->setting);
-
- return F_none;
- }
-#endif // _di_utf8_setting_unload_
-
#ifdef __cplusplus
} // extern "C"
#endif
#endif
/**
- * Delete the program main setting data.
- *
- * @param setting
- * The program main setting data.
- *
- * This does not alter setting.state.status.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_utf8_setting_delete_
- extern f_status_t utf8_setting_delete(utf8_setting_t * const setting);
-#endif // _di_utf8_setting_delete_
-
-/**
* Perform the standard program setting load process.
*
* This prints error messages as appropriate.
extern void utf8_setting_load(const f_console_arguments_t arguments, utf8_main_t * const main);
#endif // _di_utf8_setting_load_
-/**
- * Perform the standard program setting unload process.
- *
- * @param main
- * The main program and setting data.
- * All buffers are deallocated.
- *
- * This does not alter main.setting.state.status.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: utf8_setting_delete().
- *
- * @see utf8_setting_delete()
- */
-#ifndef _di_utf8_setting_unload_
- extern f_status_t utf8_setting_unload(utf8_main_t * const main);
-#endif // _di_utf8_setting_unload_
-
#ifdef __cplusplus
} // extern "C"
#endif
#endif
/**
- * Set to at least 4 to provide a UTF-8 friendly allocation step.
- */
-#ifndef _di_utf8_default_d_
- #define utf8_default_allocation_step_d 16
-#endif // _di_utf8_default_d_
-
-/**
- * The program defines.
+ * The program allocation defines.
*
- * utf8_*_d:
- * - allocation_console: An allocation step used for small buffers specifically for console parameter.
- * - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
- * - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
- * - signal_check: Number of iterations before performing signal check in non-threaded signal handling.
+ * utf8_allocation_*_d:
+ * - console: An allocation step used for small buffers specifically for console parameter.
+ * - large: An allocation step used for buffers that are anticipated to have large buffers.
+ * - pipe: A buffer size used for processing piped data.
+ * - small: An allocation step used for buffers that are anticipated to have small buffers.
*/
-#ifndef _di_utf8_d_
+#ifndef _di_utf8_allocation_d_
#define utf8_allocation_console_d 4
#define utf8_allocation_large_d 256
+ #define utf8_allocation_pipe_d 16384
#define utf8_allocation_small_d 16
- #define utf8_signal_check_d 20000
-#endif // _di_utf8_d_
+#endif // _di_utf8_allocation_d_
+
+/**
+ * The program signal defines.
+ *
+ * utf8_signal_*_d:
+ * - check: Number of iterations before performing signal check in non-threaded signal handling.
+ * - check_failsafe: When using threads, how many consecutive failures to check signal before aborting (as a recursion failsafe).
+ * - check_tiny: The tiny check.
+ * - check_short: The short signal check.
+ */
+#ifndef _di_utf8_signal_d_
+ #define utf8_signal_check_d 500000
+ #define utf8_signal_check_failsafe_d 20000
+ #define utf8_signal_check_tiny_d 4
+ #define utf8_signal_check_short_d 16
+#endif // _di_utf8_signal_d_
#ifdef __cplusplus
} // extern "C"
"f_file_stream_open",
"f_string_dynamic_append_nulless",
"f_string_dynamics_increase_by",
+ "f_thread_create",
"fll_program_parameter_process_context",
"fll_program_parameter_process_verbosity",
"utf8_detect_codepoint",
utf8_f_f_file_stream_open_e,
utf8_f_f_string_dynamic_append_nulless_e,
utf8_f_f_string_dynamics_increase_by_e,
+ utf8_f_f_thread_create_e,
utf8_f_fll_program_parameter_process_context_e,
utf8_f_fll_program_parameter_process_verbosity_e,
utf8_f_utf8_detect_codepoint_e,
extern "C" {
#endif
+#ifndef _di_utf8_main_data_delete_
+ void utf8_main_delete(utf8_main_t * const main) {
+
+ if (!main) return;
+
+ fll_program_data_delete(&main->program);
+ utf8_setting_delete(&main->setting);
+ }
+#endif // _di_utf8_main_data_delete_
+
+#ifndef _di_utf8_setting_delete_
+ f_status_t utf8_setting_delete(utf8_setting_t * const setting) {
+
+ if (!setting) return F_status_set_error(F_parameter);
+
+ f_string_dynamic_resize(0, &setting->buffer);
+ f_string_dynamic_resize(0, &setting->text);
+
+ f_string_dynamics_resize(0, &setting->path_files_from);
+ f_string_dynamics_resize(0, &setting->path_files_to);
+ f_string_dynamics_resize(0, &setting->remaining);
+
+ return F_none;
+ }
+#endif // _di_utf8_setting_delete_
+
#ifdef __cplusplus
} // extern "C"
#endif
* mode: The input/output mode (see utf8_modes_e).
* flag: Flags passed to the main function.
*
- * state: The state information.
+ * status_thread: A status used eclusively by the threaded signal handler.
+ * state: The state data used when processing the FSS data.
*
* valid: Designate the output context set for valid characters.
* valid_not: Designate the output context set for invalid characters.
uint8_t mode;
uint16_t flag;
+ f_status_t status_thread;
f_state_t state;
f_color_set_t valid;
{ \
utf8_mode_from_bytesequence_e | utf8_mode_to_codepoint_e, \
utf8_main_flag_none_e, \
+ F_none, \
f_state_t_initialize, \
f_color_set_t_initialize, \
f_color_set_t_initialize, \
}
#endif // _di_utf8_main_t_
+/**
+ * Deallocate main program data.
+ *
+ * @param setting_make
+ * The make setting data.
+ *
+ * This does not alter data_make.main.setting.state.status.
+ */
+#ifndef _di_utf8_main_data_delete_
+ extern void utf8_main_delete(utf8_main_t * const main);
+#endif // _di_utf8_main_data_delete_
+
+/**
+ * Delete the program main setting data.
+ *
+ * @param setting
+ * The program main setting data.
+ *
+ * This does not alter setting.state.status.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_utf8_setting_delete_
+ extern f_status_t utf8_setting_delete(utf8_setting_t * const setting);
+#endif // _di_utf8_setting_delete_
+
#ifdef __cplusplus
} // extern "C"
#endif
fll_program_standard_set_up(&data.program);
- {
- const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+ f_file_umask_get(&data.program.umask);
- utf8_setting_load(arguments, &data);
- }
+ #ifdef _di_thread_support_
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ utf8_setting_load(arguments, &data);
+ }
+
+ utf8_main(&data);
+ #else
+ {
+ f_thread_id_t id_signal;
+
+ memset(&id_signal, 0, sizeof(f_thread_id_t));
+
+ data.setting.state.status = f_thread_create(0, &id_signal, &utf8_thread_signal, (void *) &data);
+
+ if (F_status_is_error(data.setting.state.status)) {
+ utf8_print_error(&data.program.error, macro_utf8_f(f_thread_create));
+ }
+ else {
+ {
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
+ utf8_setting_load(arguments, &data);
+ }
- utf8_main(&data);
+ if (!utf8_signal_check(&data)) {
+ utf8_main(&data);
+ }
- utf8_setting_unload(&data);
+ f_thread_cancel(id_signal);
+ f_thread_join(id_signal, 0);
+ }
+ }
+ #endif // _di_thread_support_
- fll_program_data_delete(&data.program);
+ utf8_main_delete(&data);
fll_program_standard_set_down(&data.program);
--- /dev/null
+#include "utf8.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_utf8_signal_check_) && defined(_di_thread_support_)
+ f_status_t utf8_signal_check(utf8_main_t * const main) {
+
+ if (!main) return F_false;
+ if (main->program.signal.id == -1) return F_false;
+
+ if (!((++main->program.signal_check) % utf8_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+ main->setting.state.status = F_status_set_error(F_interrupt);
+
+ return F_true;
+ }
+
+ main->program.signal_check = 0;
+ }
+
+ return F_false;
+ }
+#endif // !defined(_di_utf8_signal_check_) && defined(_di_thread_support_)
+
+#if !defined(_di_utf8_signal_check_) && !defined(_di_thread_support_)
+ f_status_t utf8_signal_check(utf8_main_t * const main) {
+
+ if (!main) return F_false;
+ if (main->program.signal.id == -1) return F_false;
+
+ if (main->program.signal_received) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+ main->setting.state.status = F_status_set_error(F_interrupt);
+
+ return F_true;
+ }
+
+ return F_false;
+ }
+#endif // !defined(_di_utf8_signal_check_) && !defined(_di_thread_support_)
+
+#if !defined(_di_utf8_signal_handler_) && !defined(_di_thread_support_)
+ void utf8_signal_handler(utf8_main_t * const main) {
+
+ if (!main) return;
+
+ siginfo_t information;
+ f_array_length_t failsafe = 0;
+
+ memset(&information, 0, sizeof(siginfo_t));
+
+ main->program.signal_received = 0;
+
+ f_signal_set_empty(&main->program.signal.set);
+ f_signal_set_add(F_signal_abort, &main->program.signal.set);
+ f_signal_set_add(F_signal_broken_pipe, &main->program.signal.set);
+ f_signal_set_add(F_signal_hangup, &main->program.signal.set);
+ f_signal_set_add(F_signal_interrupt, &main->program.signal.set);
+ f_signal_set_add(F_signal_quit, &main->program.signal.set);
+ f_signal_set_add(F_signal_termination, &main->program.signal.set);
+
+ if (main->program.signal.id == -1) {
+ main->setting.status_thread = f_signal_open(&main->program.signal);
+
+ if (F_status_is_error(main->setting.status_thread)) {
+ main->program.signal_received = F_signal_abort;
+
+ return;
+ }
+ }
+
+ do {
+ memset(&information, 0, sizeof(siginfo_t));
+
+ main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information);
+
+ if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) {
+ if (++failsafe >= utf8_signal_check_failsafe_d) break;
+ }
+
+ switch (information.si_signo) {
+ case F_signal_abort:
+ case F_signal_broken_pipe:
+ case F_signal_hangup:
+ case F_signal_interrupt:
+ case F_signal_quit:
+ case F_signal_termination:
+ main->program.signal_received = information.si_signo;
+
+ break;
+ }
+
+ failsafe = 0;
+ main->setting.status_thread = F_none;
+
+ } while (!main->program.signal_received);
+
+ f_signal_close(&main->program.signal);
+
+ if (F_status_is_error(main->setting.status_thread)) {
+ main->program.signal_received = F_signal_abort;
+ }
+ }
+#endif // !defined(_di_utf8_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: UTF8
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides signal functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _utf8_signal_h
+#define _utf8_signal_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Check to see if a signal is received.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ * - F_signal_abort
+ * - F_signal_broken_pipe
+ * - F_signal_hangup
+ * - F_signal_interrupt
+ * - F_signal_quit
+ * - F_signal_termination
+ *
+ * There is a threaded and a non-threaded version of this.
+ * The non-threaded version checks periodically using utf8_signal_check_d and updates main->signal_check as needed.
+ * The threaded version checks the flag state which is set by a separate thread that is blocking until signal is received.
+ *
+ * @param main
+ * The main program and settings data.
+ *
+ * This does not alter main.setting.state.status.
+ *
+ * @return
+ * F_true on signal received.
+ * F_false otherwise.
+ *
+ * @see utf8_signal_handler()
+ *
+ * @see fll_program_standard_signal_received()
+ */
+#ifndef _di_utf8_signal_check_
+ extern f_status_t utf8_signal_check(utf8_main_t * const main);
+#endif // _di_utf8_signal_check_
+
+/**
+ * Signal handler for signals/interrupts.
+ *
+ * This blocks until an expected signal is recieved.
+ * When an expected signal is received it then sets the
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ * - F_signal_abort
+ * - F_signal_broken_pipe
+ * - F_signal_hangup
+ * - F_signal_interrupt
+ * - F_signal_quit
+ * - F_signal_termination
+ *
+ * @param main
+ * The main program and settings data.
+ *
+ * This alters main.program.signal_received, setting it to a received signal.
+ *
+ * This alters setting.status:
+ * Errors with (error bit set) from: f_signal_open()
+ * Errors with (error bit set) from: f_signal_wait()
+ *
+ * @see f_signal_close()
+ * @see f_signal_open()
+ * @see f_signal_wait()
+ */
+#if !defined(_di_utf8_signal_handler_) && !defined(_di_thread_support_)
+ extern void utf8_signal_handler(utf8_main_t * const main);
+#endif // !defined(_di_utf8_signal_handler_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _utf8_signal_h
--- /dev/null
+#include "utf8.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_utf8_thread_signal_) && !defined(_di_thread_support_)
+ void * utf8_thread_signal(void * const main) {
+
+ f_thread_cancel_state_set(PTHREAD_CANCEL_DEFERRED, 0);
+
+ if (main) {
+ utf8_signal_handler((utf8_main_t *) main);
+ }
+
+ return 0;
+ }
+#endif // !defined(_di_utf8_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: UTF8
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides thread functionality.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _utf8_thread_h
+#define _utf8_thread_h
+
+/**
+ * Thread handler for signals/interrupts.
+ *
+ * If main.signal is non-zero, then this handles the following signals:
+ * - F_signal_abort
+ * - F_signal_broken_pipe
+ * - F_signal_hangup
+ * - F_signal_interrupt
+ * - F_signal_quit
+ * - F_signal_termination
+ *
+ * @param main
+ * The program and settings data.
+ *
+ * Must be of type utf8_main_t.
+ *
+ * @return
+ * 0, always.
+ *
+ * @see f_thread_cancel_state_set()
+ *
+ * @see utf8_signal_handler()
+ */
+#if !defined(_di_utf8_thread_signal_) && !defined(_di_thread_support_)
+ extern void * utf8_thread_signal(void * const main);
+#endif // !defined(_di_utf8_thread_signal_) && !defined(_di_thread_support_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _utf8_thread_h
#include <fll/level_0/rip.h>
#include <fll/level_0/signal.h>
+#ifndef _di_thread_support_
+ #include <fll/level_0/thread.h>
+#endif // _di_thread_support_
+
// FLL-1 includes.
#include <fll/level_1/conversion.h>
#include <fll/level_1/print.h>
#include <program/utf8/main/print/error.h>
#include <program/utf8/main/print/message.h>
#include <program/utf8/main/process.h>
+#include <program/utf8/main/signal.h>
+#include <program/utf8/main/thread.h>
#ifdef __cplusplus
extern "C" {
# fss-0000
+_di_thread_support_ Disables thread support.
+
+_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
+_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
# fss-0001
+#
+# Modes:
+# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases.
+# - individual_thread: This is required when compiling in individual mode with "thread" mode.
+# - level: Compile using per level libraries.
+# - monolithic: Compile using per monolithic libraries.
+# - clang: Use clang rather than the default, which is generally gcc.
+# - test: Compile for a test, such as unit testing.
+# - fanalyzer: Compile using GCC's -fanalyzer compile time option.
+# - thread: Compile with thread support.
+# - threadless: Compile without thread support.
+#
build_name utf8
version_file micro
version_target minor
-modes individual level monolithic clang test fanalyzer
-modes_default monolithic
+modes individual individual_thread level monolithic clang test fanalyzer thread threadless
+modes_default monolithic thread
build_compiler gcc
build_compiler-clang clang
build_libraries -lc
build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion -lfl_print -lf_color -lf_console -lf_conversion -lf_file -lf_memory -lf_pipe -lf_print -lf_rip -lf_signal -lf_string -lf_type_array -lf_utf
+build_libraries-individual_thread -lf_thread
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
-build_sources_library main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/bytesequence.c main/codepoint.c main/print/data.c main/print/error.c main/print/message.c main/process.c main/utf8.c
+build_sources_library main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c main/bytesequence.c main/codepoint.c main/print/data.c main/print/error.c main/print/message.c main/process.c main/signal.c main/thread.c main/utf8.c
build_sources_program main/main.c
-build_sources_headers main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/bytesequence.h main/codepoint.h main/print.h main/print/data.h main/print/error.h main/print/message.h main/process.h main/utf8.h
+build_sources_headers main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h main/bytesequence.h main/codepoint.h main/print.h main/print/data.h main/print/error.h main/print/message.h main/process.h main/signal.h main/thread.h main/utf8.h
build_sources_documentation man
environment PATH LD_LIBRARY_PATH
environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-#defines -D_di_libcap_ -D_di_thread_support_
-defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+#defines -D_di_libcap_
+defines -D_libcap_legacy_only_
+defines-threadless -D_di_thread_support_
+defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces
+flags-thread -pthread
flags-clang -Wno-logical-op-parentheses
flags-test -O0 -fstack-protector -Wall
flags-fanalyzer -fanalyzer