The build state stage files are conflicting in some cases.
The old solution to this problem has been observed as insufficient.
The different build settings might have the same exact file name.
I have tossed around the idea of a settings Object such as "stage" in the past but I had previously opted against it.
I now believe that skipping over this was a mistake.
Add a new feature to the standards to fix this bug.
The "stage" value may now be specified.
The fakefile files accept the "stage" setting and passes the result along to any build settings.
The settings files accept the "stage" setting and uses the value by appending it to the stage files.
Only a single value is supported.
The forward and backward slashes are explicitly prohibited.
Other special characters are recommended to be avoided given the possibility of local file system problems.
Rather than erroring out, this slashes are stripped out.
The bootstrap.sh script is updated to support this.
The support for "stage" in the boostrap.sh script is very limited.
local key=
local -A variables=()
+ local define_extra=
local failure=0
local settings_name=settings
local settings_file=
local path_sources=sources/
local path_language=c/
local path_work=
+ local process=
local project_built=
local project_built_shared=
local project_built_static=
local override_path_data=
local override_path_sources=
local override_path_work=
- local define_extra=
- local process=
+ local stage=
local verbosity=normal
local verbose=
local verbose_common=
project_built="${project_built}-${process}"
fi
- project_built_shared="${project_built}.shared"
- project_built_static="${project_built}.static"
+ key=
+ stage=
+ bootstrap_id "stage"
+ if [[ ${variables[${key}]} != "" ]] ; then
+ stage="-${variables[${key}]}"
+ fi
+
+ project_built="${project_built}${stage}"
+ project_built_shared="${project_built}${stage}.shared"
+ project_built_static="${project_built}${stage}.static"
if [[ ${modes_available} == "" ]] ; then
if [[ ${modes} != "" ]] ; then
"search_exclusive") let key=80;;
"search_shared") let key=81;;
"search_static") let key=82;;
- "version_file") let key=83;;
- "version_major") let key=84;;
- "version_major_prefix") let key=85;;
- "version_micro") let key=86;;
- "version_micro_prefix") let key=87;;
- "version_minor") let key=88;;
- "version_minor_prefix") let key=89;;
- "version_nano") let key=90;;
- "version_nano_prefix") let key=91;;
- "version_target") let key=92;;
-
- "build_compiler-mode") let key=93;;
- "build_indexer-mode") let key=94;;
- "build_indexer_arguments-mode") let key=95;;
- "build_language-mode") let key=96;;
- "build_libraries-mode") let key=97;;
- "build_libraries_shared-mode") let key=98;;
- "build_libraries_static-mode") let key=99;;
- "build_name-mode") let key=100;;
- "build_objects_library-mode") let key=101;;
- "build_objects_library_shared-mode") let key=102;;
- "build_objects_library_static-mode") let key=103;;
- "build_objects_program-mode") let key=104;;
- "build_objects_program_shared-mode") let key=105;;
- "build_objects_program_static-mode") let key=106;;
- "build_script-mode") let key=107;;
- "build_shared-mode") let key=108;;
- "build_sources_documentation-mode") let key=109;;
- "build_sources_headers-mode") let key=110;;
- "build_sources_headers_shared-mode") let key=111;;
- "build_sources_headers_static-mode") let key=112;;
- "build_sources_library-mode") let key=113;;
- "build_sources_library_shared-mode") let key=114;;
- "build_sources_library_static-mode") let key=115;;
- "build_sources_object-mode") let key=116;;
- "build_sources_object_shared-mode") let key=117;;
- "build_sources_object_static-mode") let key=118;;
- "build_sources_program-mode") let key=119;;
- "build_sources_program_shared-mode") let key=120;;
- "build_sources_program_static-mode") let key=121;;
- "build_sources_script-mode") let key=122;;
- "build_sources_setting-mode") let key=123;;
- "build_static-mode") let key=124;;
- "defines-mode") let key=125;;
- "defines_library-mode") let key=126;;
- "defines_library_shared-mode") let key=127;;
- "defines_library_static-mode") let key=128;;
- "defines_object-mode") let key=129;;
- "defines_object_shared-mode") let key=130;;
- "defines_object_static-mode") let key=131;;
- "defines_program-mode") let key=132;;
- "defines_program_shared-mode") let key=133;;
- "defines_program_static-mode") let key=134;;
- "defines_shared-mode") let key=135;;
- "defines_static-mode") let key=136;;
- "environment-mode") let key=137;;
- "flags-mode") let key=138;;
- "flags_library-mode") let key=139;;
- "flags_library_shared-mode") let key=140;;
- "flags_library_static-mode") let key=141;;
- "flags_object-mode") let key=142;;
- "flags_object_shared-mode") let key=143;;
- "flags_object_static-mode") let key=144;;
- "flags_program-mode") let key=145;;
- "flags_program_shared-mode") let key=146;;
- "flags_program_static-mode") let key=147;;
- "flags_shared-mode") let key=148;;
- "flags_static-mode") let key=149;;
- "has_path_standard-mode") let key=150;;
- "path_headers-mode") let key=151;;
- "path_language-mode") let key=152;;
- "path_library_script-mode") let key=153;;
- "path_library_shared-mode") let key=154;;
- "path_library_static-mode") let key=155;;
- "path_object_script-mode") let key=156;;
- "path_object_shared-mode") let key=157;;
- "path_object_static-mode") let key=158;;
- "path_program_script-mode") let key=159;;
- "path_program_shared-mode") let key=160;;
- "path_program_static-mode") let key=161;;
- "path_sources-mode") let key=162;;
- "path_sources_headers-mode") let key=163;;
- "path_sources_library-mode") let key=164;;
- "path_sources_object-mode") let key=165;;
- "path_sources_program-mode") let key=166;;
- "path_sources_script-mode") let key=167;;
- "preserve_path_headers-mode") let key=168;;
- "process_post-mode") let key=169;;
- "process_pre-mode") let key=170;;
- "search_exclusive-mode") let key=171;;
- "search_shared-mode") let key=172;;
- "search_static-mode") let key=173;;
- "version_file-mode") let key=174;;
- "version_major-mode") let key=175;;
- "version_major_prefix-mode") let key=176;;
- "version_micro-mode") let key=177;;
- "version_micro_prefix-mode") let key=178;;
- "version_minor-mode") let key=179;;
- "version_minor_prefix-mode") let key=180;;
- "version_nano-mode") let key=181;;
- "version_nano_prefix-mode") let key=182;;
- "version_target-mode") let key=183;;
-
- "has-build_compiler") let key=184;;
- "has-build_indexer") let key=185;;
- "has-build_indexer_arguments") let key=186;;
- "has-build_name") let key=187;;
- "has-has_path_standard") let key=188;;
- "has-path_library_script") let key=189;;
- "has-path_library_shared") let key=190;;
- "has-path_library_static") let key=191;;
- "has-path_object_script") let key=192;;
- "has-path_object_shared") let key=193;;
- "has-path_object_static") let key=194;;
- "has-path_program_script") let key=195;;
- "has-path_program_shared") let key=196;;
- "has-path_program_static") let key=197;;
- "has-path_sources") let key=198;;
- "has-path_sources_headers") let key=199;;
- "has-path_sources_library") let key=200;;
- "has-path_sources_object") let key=201;;
- "has-path_sources_program") let key=202;;
- "has-path_sources_script") let key=203;;
- "has-search_exclusive") let key=204;;
- "has-search_shared") let key=205;;
- "has-search_static") let key=206;;
- "has-version_major_prefix") let key=207;;
- "has-version_micro_prefix") let key=208;;
- "has-version_minor_prefix") let key=209;;
- "has-version_nano_prefix") let key=210;;
-
- "has-build_compiler-mode") let key=207;;
- "has-build_indexer-mode") let key=208;;
- "has-build_indexer_arguments-mode") let key=209;;
- "has-build_name-mode") let key=210;;
- "has-has_path_standard-mode") let key=211;;
- "has-path_library_script-mode") let key=212;;
- "has-path_library_shared-mode") let key=213;;
- "has-path_library_static-mode") let key=214;;
- "has-path_object_script-mode") let key=215;;
- "has-path_object_shared-mode") let key=216;;
- "has-path_object_static-mode") let key=217;;
- "has-path_program_script-mode") let key=218;;
- "has-path_program_shared-mode") let key=219;;
- "has-path_program_static-mode") let key=220;;
- "has-path_sources-mode") let key=221;;
- "has-path_sources_headers-mode") let key=222;;
- "has-path_sources_library-mode") let key=223;;
- "has-path_sources_object-mode") let key=224;;
- "has-path_sources_program-mode") let key=225;;
- "has-path_sources_script-mode") let key=226;;
- "has-search_exclusive-mode") let key=227;;
- "has-search_shared-mode") let key=228;;
- "has-search_static-mode") let key=229;;
- "has-version_major_prefix-mode") let key=230;;
- "has-version_micro_prefix-mode") let key=231;;
- "has-version_minor_prefix-mode") let key=232;;
- "has-version_nano_prefix-mode") let key=233;;
+ "stage") let key=83;;
+ "version_file") let key=84;;
+ "version_major") let key=85;;
+ "version_major_prefix") let key=86;;
+ "version_micro") let key=87;;
+ "version_micro_prefix") let key=88;;
+ "version_minor") let key=89;;
+ "version_minor_prefix") let key=90;;
+ "version_nano") let key=91;;
+ "version_nano_prefix") let key=92;;
+ "version_target") let key=93;;
+
+ "build_compiler-mode") let key=94;;
+ "build_indexer-mode") let key=95;;
+ "build_indexer_arguments-mode") let key=96;;
+ "build_language-mode") let key=97;;
+ "build_libraries-mode") let key=98;;
+ "build_libraries_shared-mode") let key=99;;
+ "build_libraries_static-mode") let key=100;;
+ "build_name-mode") let key=101;;
+ "build_objects_library-mode") let key=102;;
+ "build_objects_library_shared-mode") let key=103;;
+ "build_objects_library_static-mode") let key=104;;
+ "build_objects_program-mode") let key=105;;
+ "build_objects_program_shared-mode") let key=106;;
+ "build_objects_program_static-mode") let key=107;;
+ "build_script-mode") let key=108;;
+ "build_shared-mode") let key=109;;
+ "build_sources_documentation-mode") let key=110;;
+ "build_sources_headers-mode") let key=111;;
+ "build_sources_headers_shared-mode") let key=112;;
+ "build_sources_headers_static-mode") let key=113;;
+ "build_sources_library-mode") let key=114;;
+ "build_sources_library_shared-mode") let key=115;;
+ "build_sources_library_static-mode") let key=116;;
+ "build_sources_object-mode") let key=117;;
+ "build_sources_object_shared-mode") let key=118;;
+ "build_sources_object_static-mode") let key=119;;
+ "build_sources_program-mode") let key=120;;
+ "build_sources_program_shared-mode") let key=121;;
+ "build_sources_program_static-mode") let key=122;;
+ "build_sources_script-mode") let key=123;;
+ "build_sources_setting-mode") let key=124;;
+ "build_static-mode") let key=125;;
+ "defines-mode") let key=126;;
+ "defines_library-mode") let key=127;;
+ "defines_library_shared-mode") let key=128;;
+ "defines_library_static-mode") let key=129;;
+ "defines_object-mode") let key=130;;
+ "defines_object_shared-mode") let key=131;;
+ "defines_object_static-mode") let key=132;;
+ "defines_program-mode") let key=133;;
+ "defines_program_shared-mode") let key=134;;
+ "defines_program_static-mode") let key=135;;
+ "defines_shared-mode") let key=136;;
+ "defines_static-mode") let key=137;;
+ "environment-mode") let key=138;;
+ "flags-mode") let key=139;;
+ "flags_library-mode") let key=140;;
+ "flags_library_shared-mode") let key=141;;
+ "flags_library_static-mode") let key=142;;
+ "flags_object-mode") let key=143;;
+ "flags_object_shared-mode") let key=144;;
+ "flags_object_static-mode") let key=145;;
+ "flags_program-mode") let key=146;;
+ "flags_program_shared-mode") let key=147;;
+ "flags_program_static-mode") let key=148;;
+ "flags_shared-mode") let key=149;;
+ "flags_static-mode") let key=150;;
+ "has_path_standard-mode") let key=151;;
+ "path_headers-mode") let key=152;;
+ "path_language-mode") let key=153;;
+ "path_library_script-mode") let key=154;;
+ "path_library_shared-mode") let key=155;;
+ "path_library_static-mode") let key=156;;
+ "path_object_script-mode") let key=157;;
+ "path_object_shared-mode") let key=158;;
+ "path_object_static-mode") let key=159;;
+ "path_program_script-mode") let key=160;;
+ "path_program_shared-mode") let key=161;;
+ "path_program_static-mode") let key=162;;
+ "path_sources-mode") let key=163;;
+ "path_sources_headers-mode") let key=164;;
+ "path_sources_library-mode") let key=165;;
+ "path_sources_object-mode") let key=166;;
+ "path_sources_program-mode") let key=167;;
+ "path_sources_script-mode") let key=168;;
+ "preserve_path_headers-mode") let key=169;;
+ "process_post-mode") let key=170;;
+ "process_pre-mode") let key=171;;
+ "search_exclusive-mode") let key=172;;
+ "search_shared-mode") let key=173;;
+ "search_static-mode") let key=174;;
+ "stage-mode") let key=175;;
+ "version_file-mode") let key=176;;
+ "version_major-mode") let key=177;;
+ "version_major_prefix-mode") let key=178;;
+ "version_micro-mode") let key=179;;
+ "version_micro_prefix-mode") let key=180;;
+ "version_minor-mode") let key=181;;
+ "version_minor_prefix-mode") let key=182;;
+ "version_nano-mode") let key=183;;
+ "version_nano_prefix-mode") let key=184;;
+ "version_target-mode") let key=185;;
+
+ "has-build_compiler") let key=186;;
+ "has-build_indexer") let key=187;;
+ "has-build_indexer_arguments") let key=188;;
+ "has-build_name") let key=189;;
+ "has-has_path_standard") let key=190;;
+ "has-path_library_script") let key=191;;
+ "has-path_library_shared") let key=192;;
+ "has-path_library_static") let key=193;;
+ "has-path_object_script") let key=194;;
+ "has-path_object_shared") let key=195;;
+ "has-path_object_static") let key=196;;
+ "has-path_program_script") let key=197;;
+ "has-path_program_shared") let key=198;;
+ "has-path_program_static") let key=199;;
+ "has-path_sources") let key=200;;
+ "has-path_sources_headers") let key=201;;
+ "has-path_sources_library") let key=202;;
+ "has-path_sources_object") let key=203;;
+ "has-path_sources_program") let key=204;;
+ "has-path_sources_script") let key=205;;
+ "has-search_exclusive") let key=206;;
+ "has-search_shared") let key=207;;
+ "has-search_static") let key=208;;
+ "has-stage") let key=209;;
+ "has-version_major_prefix") let key=210;;
+ "has-version_micro_prefix") let key=211;;
+ "has-version_minor_prefix") let key=212;;
+ "has-version_nano_prefix") let key=213;;
+
+ "has-build_compiler-mode") let key=214;;
+ "has-build_indexer-mode") let key=215;;
+ "has-build_indexer_arguments-mode") let key=216;;
+ "has-build_name-mode") let key=217;;
+ "has-has_path_standard-mode") let key=218;;
+ "has-path_library_script-mode") let key=219;;
+ "has-path_library_shared-mode") let key=220;;
+ "has-path_library_static-mode") let key=221;;
+ "has-path_object_script-mode") let key=222;;
+ "has-path_object_shared-mode") let key=223;;
+ "has-path_object_static-mode") let key=224;;
+ "has-path_program_script-mode") let key=225;;
+ "has-path_program_shared-mode") let key=226;;
+ "has-path_program_static-mode") let key=227;;
+ "has-path_sources-mode") let key=228;;
+ "has-path_sources_headers-mode") let key=229;;
+ "has-path_sources_library-mode") let key=230;;
+ "has-path_sources_object-mode") let key=231;;
+ "has-path_sources_program-mode") let key=232;;
+ "has-path_sources_script-mode") let key=233;;
+ "has-search_exclusive-mode") let key=234;;
+ "has-search_shared-mode") let key=235;;
+ "has-search_static-mode") let key=236;;
+ "has-stage-mode") let key=237;;
+ "has-version_major_prefix-mode") let key=238;;
+ "has-version_micro_prefix-mode") let key=239;;
+ "has-version_minor_prefix-mode") let key=240;;
+ "has-version_nano_prefix-mode") let key=241;;
esac
}
fi
# Single value Objects.
- for i in build_compiler build_indexer build_language build_name build_script build_shared build_sources_object build_sources_object_shared build_sources_object_static build_static has_path_standard path_headers path_language path_library_script path_library_shared path_library_static path_object_script path_object_shared path_object_static path_program_script path_program_shared path_program_static path_sources path_sources_headers path_sources_library path_sources_object path_sources_program path_sources_script preserve_path_headers process_post process_pre search_exclusive search_shared search_static 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
+ for i in build_compiler build_indexer build_language build_name build_script build_shared build_sources_object build_sources_object_shared build_sources_object_static build_static has_path_standard path_headers path_language path_library_script path_library_shared path_library_static path_object_script path_object_shared path_object_static path_program_script path_program_shared path_program_static path_sources path_sources_headers path_sources_library path_sources_object path_sources_program path_sources_script preserve_path_headers process_post process_pre search_exclusive search_shared search_static stage version_file version_major version_major_prefix version_micro version_micro_prefix version_minor version_minor_prefix version_nano version_nano_prefix version_target ; do
bootstrap_id "${i}"
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_headers path_sources_library path_sources_object path_sources_program path_sources_script preserve_path_headers process_post process_pre search_exclusive search_shared search_static 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
+ for i in build_compiler build_indexer build_language build_name build_script build_shared build_sources_object build_sources_object_shared build_sources_object_static build_static has_path_standard path_headers path_language path_library_script path_library_shared path_library_static path_object_script path_object_shared path_object_static path_program_script path_program_shared path_program_static path_sources path_sources_headers path_sources_library path_sources_object path_sources_program path_sources_script preserve_path_headers process_post process_pre search_exclusive search_shared search_static stage version_file version_major version_major_prefix version_micro version_micro_prefix version_minor version_minor_prefix version_nano version_nano_prefix version_target ; do
bootstrap_id "${i}-mode"
bootstrap_id "search_static-mode"
search_static=${variables[${key}]}
fi
+
+ bootstrap_id "has-stage-mode"
+ if [[ ${variables[${key}]} == "yes" ]] ; then
+ bootstrap_id "stage-mode"
+ stage=${variables[${key}]}
+ fi
}
bootstrap_operation_build_prepare_settings() {
}
if (F_status_is_error_not(status)) {
- status = fake_build_operate(&data, 0, main->process_pipe);
+ status = fake_build_operate(&data, 0, main->process_pipe, f_string_empty_s);
}
}
else if (data.operation == fake_operation_clean_e) {
f_string_dynamics_t search_exclusive = f_string_dynamics_t_initialize;
f_string_dynamics_t search_shared = f_string_dynamics_t_initialize;
f_string_dynamics_t search_static = f_string_dynamics_t_initialize;
+ f_string_dynamics_t stage = f_string_dynamics_t_initialize;
f_string_dynamics_t version_file = f_string_dynamics_t_initialize;
f_string_dynamics_t version_major = f_string_dynamics_t_initialize;
f_string_dynamics_t version_major_prefix = f_string_dynamics_t_initialize;
fake_build_setting_name_search_exclusive_s,
fake_build_setting_name_search_shared_s,
fake_build_setting_name_search_static_s,
+ fake_build_setting_name_stage_s,
fake_build_setting_name_version_file_s,
fake_build_setting_name_version_major_s,
fake_build_setting_name_version_major_prefix_s,
&search_exclusive,
&search_shared,
&search_static,
+ &stage,
&version_file,
&version_major,
&version_major_prefix,
F_false, // search_exclusive
F_false, // search_shared
F_false, // search_static
+ F_false, // stage
F_false, // version_file
F_false, // version_major
F_false, // version_major_prefix
fake_build_setting_name_search_exclusive_s,
fake_build_setting_name_search_shared_s,
fake_build_setting_name_search_static_s,
+ fake_build_setting_name_stage_s,
fake_build_setting_name_version_file_s,
fake_build_setting_name_version_major_s,
fake_build_setting_name_version_major_prefix_s,
&search_exclusive,
&search_shared,
&search_static,
+ &stage,
&version_file,
&version_major,
&version_major_prefix,
&setting->search_exclusive, // search_exclusive
&setting->search_shared, // search_shared
&setting->search_static, // search_static
+ 0, // stage
};
f_string_dynamic_t *settings_single_destination[] = {
0, // search_exclusive
0, // search_shared
0, // search_static
+ &setting->stage, // stage
0, // version_file
&setting->version_major, // version_major
&setting->version_major_prefix, // version_major_prefix
settings_matches[80], // search_exclusive
settings_matches[81], // search_shared
settings_matches[82], // search_static
- settings_matches[83], // version_file
- settings_matches[84], // version_major
- settings_matches[85], // version_major_prefix
- settings_matches[86], // version_micro
- settings_matches[87], // version_micro_prefix
- settings_matches[88], // version_minor
- settings_matches[89], // version_minor_prefix
- settings_matches[90], // version_nano
- settings_matches[91], // version_nano_prefix
- settings_matches[92], // version_target
+ settings_matches[83], // stage
+ settings_matches[84], // version_file
+ settings_matches[85], // version_major
+ settings_matches[86], // version_major_prefix
+ settings_matches[87], // version_micro
+ settings_matches[88], // version_micro_prefix
+ settings_matches[89], // version_minor
+ settings_matches[90], // version_minor_prefix
+ settings_matches[91], // version_nano
+ settings_matches[92], // version_nano_prefix
+ settings_matches[93], // version_target
};
const f_string_static_t settings_single_string_default[] = {
fake_build_setting_default_yes_s, // search_exclusive
f_string_empty_s, // search_shared
f_string_empty_s, // search_static
+ f_string_empty_s, // stage
f_string_empty_s, // version_file
f_string_empty_s, // version_major
fake_build_setting_default_version_prefix_s, // version_major_prefix
0, // search_exclusive
0, // search_shared
0, // search_static
+ 0, // stage
&setting->version_file, // version_file
0, // version_major
0, // version_major_prefix
0, // search_exclusive
0, // search_shared
0, // search_static
+ 0, // stage
fake_build_version_type_micro_e, // version_file
0, // version_major
0, // version_major_prefix
f_string_empty_s, // search_exclusive
f_string_empty_s, // search_shared
f_string_empty_s, // search_static
+ f_string_empty_s, // stage
fake_build_version_micro_s, // version_file
f_string_empty_s, // version_major
f_string_empty_s, // version_major_prefix
fake_build_version_major_s, // version_target
};
- // 1 = "yes" or "no", 2 = path/, 3 = literal, 4 = "bash", "c", or "c++", 5 = "major", "minor", "micro", or "nano".
+ // 1 = "yes" or "no", 2 = path/, 3 = literal, 4 = "bash", "c", or "c++", 5 = "major", "minor", "micro", or "nano", 6 = literal, no slash.
const uint8_t settings_single_type[] = {
3, // build_compiler
3, // build_indexer
1, // search_exclusive
1, // search_shared
1, // search_static
+ 6, // stage
5, // version_file
3, // version_major
3, // version_major_prefix
5, // version_target
};
- for (f_array_length_t i = 0; i < 41; ++i) {
+ f_array_length_t j = 0;
+
+ for (f_array_length_t i = 0; i < 42; ++i) {
// Assign the default for literal and path types.
if (!settings_single_matches[i] && settings_single_destination[i]) {
break;
}
+ // Verify that there are no forward or backward slashes in the string.
+ if (settings_single_type[i] == 6) {
+ *status = F_none;
+
+ for (j = 0; j < settings_single_source[i]->array[settings_single_source[i]->used - 1].used; ++j) {
+
+ if (settings_single_source[i]->array[settings_single_source[i]->used - 1].string[j] == f_string_ascii_slash_forward_s.string[0] || settings_single_source[i]->array[settings_single_source[i]->used - 1].string[j] == f_string_ascii_slash_backward_s.string[0]) {
+ *status = F_warning;
+
+ // Prevent the slash from being copied.
+ settings_single_source[i]->array[settings_single_source[i]->used - 1].string[j] = 0;
+ }
+ } // for
+
+ if (*status == F_warning) {
+ if (data->main->warning.verbosity >= f_console_verbosity_verbose_e) {
+ flockfile(data->main->warning.to.stream);
+
+ fl_print_format("%r%[%QThe setting '%]", data->main->warning.to.stream, f_string_eol_s, data->main->warning.context, data->main->warning.prefix, data->main->warning.context);
+ fl_print_format("%[%r%]", data->main->warning.to.stream, data->main->warning.notable, settings_single_name[i], data->main->warning.notable);
+ fl_print_format("%[' in the file '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context);
+ fl_print_format("%[%Q%]", data->main->warning.to.stream, data->main->warning.notable, path_file, data->main->warning.notable);
+ fl_print_format("%[' has and must not have forward or backward slashes, ignoring slashes.%]%r", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context, f_string_eol_s);
+
+ funlockfile(data->main->warning.to.stream);
+ }
+ }
+ }
+
*status = f_string_dynamic_append_nulless(settings_single_source[i]->array[settings_single_source[i]->used - 1], settings_single_destination[i]);
if (F_status_is_error(*status)) {
f_string_dynamics_resize(0, &search_exclusive);
f_string_dynamics_resize(0, &search_shared);
f_string_dynamics_resize(0, &search_static);
+ f_string_dynamics_resize(0, &stage);
f_string_dynamics_resize(0, &version_file);
f_string_dynamics_resize(0, &version_major);
f_string_dynamics_resize(0, &version_major_prefix);
#endif // _di_fake_build_load_setting_override_
#ifndef _di_fake_build_load_stage_
- void fake_build_load_stage(fake_data_t * const data, const f_string_static_t settings_file, fake_build_stage_t * const stage, f_status_t * const status) {
+ void fake_build_load_stage(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t fakefile_stage, const f_string_static_t settings_file, fake_build_stage_t * const stage, f_status_t * const status) {
if (F_status_is_error(*status)) return;
*status = f_string_dynamic_append_nulless(settings_file_base, values[i]);
}
+ if (F_status_is_error_not(*status) && fakefile_stage.used) {
+ *status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]);
+
+ if (F_status_is_error_not(*status)) {
+ *status = f_string_dynamic_append_nulless(fakefile_stage, values[i]);
+ }
+ }
+
+ if (F_status_is_error_not(*status) && data_build->setting.stage.used) {
+ *status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]);
+
+ if (F_status_is_error_not(*status)) {
+ *status = f_string_dynamic_append_nulless(data_build->setting.stage, values[i]);
+ }
+ }
+
if (F_status_is_error_not(*status)) {
*status = f_string_dynamic_append_nulless(fake_build_stage_built_s, values[i]);
}
*
* @param data
* The program data.
+ * @param data_build
+ * The build data.
+ * @param fakefile_stage
+ * (optional) The stage setting value from the fakefile.
+ *
+ * Set fakefile_stage.used to 0 to not use.
* @param settings_file
* The path to the settings file.
* @param stage
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_load_stage_
- extern void fake_build_load_stage(fake_data_t * const data, const f_string_static_t settings_file, fake_build_stage_t * const stage, f_status_t * const status) F_attribute_visibility_internal_d;
+ extern void fake_build_load_stage(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t fakefile_stage, const f_string_static_t settings_file, fake_build_stage_t * const stage, f_status_t * const status) F_attribute_visibility_internal_d;
#endif // _di_fake_build_load_stage_
#ifdef __cplusplus
#endif // _di_fake_build_objects_add_
#ifndef _di_fake_build_operate_
- f_status_t fake_build_operate(fake_data_t * const data, const f_string_statics_t * const build_arguments, const bool process_pipe) {
+ f_status_t fake_build_operate(fake_data_t * const data, const f_string_statics_t * const build_arguments, const bool process_pipe, const f_string_dynamic_t fakefile_stage) {
if (!((++data->main->signal_check) % fake_signal_check_d)) {
if (fll_program_standard_signal_received(data->main)) {
}
}
- fake_build_load_stage(data, build_arguments && build_arguments->array[0].used ? build_arguments->array[0] : f_string_empty_s, &stage, &status);
+ fake_build_load_stage(data, &data_build, fakefile_stage, build_arguments && build_arguments->array[0].used ? build_arguments->array[0] : f_string_empty_s, &stage, &status);
fake_build_load_environment(data, &data_build, &data_build.environment, &status);
* @param process_pipe
* If TRUE, then use the program input pipe.
* If FALSE, then ignore the program input pipe.
+ * @param fakefile_stage
+ * (optional) The stage setting value from the fakefile.
+ *
+ * Set fakefile_stage.used to 0 to not use.
*
* @return
* F_none on success.
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_operate_
- extern f_status_t fake_build_operate(fake_data_t * const data, const f_string_statics_t * const build_arguments, const bool process_pipe) F_attribute_visibility_internal_d;
+ extern f_status_t fake_build_operate(fake_data_t * const data, const f_string_statics_t * const build_arguments, const bool process_pipe, const f_string_static_t fakefile_stage) F_attribute_visibility_internal_d;
#endif // _di_fake_build_operate_
/**
const f_string_static_t fake_build_setting_name_search_exclusive_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_search_exclusive_s, 0, FAKE_build_setting_name_search_exclusive_s_length);
const f_string_static_t fake_build_setting_name_search_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_search_shared_s, 0, FAKE_build_setting_name_search_shared_s_length);
const f_string_static_t fake_build_setting_name_search_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_search_static_s, 0, FAKE_build_setting_name_search_static_s_length);
+ const f_string_static_t fake_build_setting_name_stage_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_stage_s, 0, FAKE_build_setting_name_stage_s_length);
const f_string_static_t fake_build_setting_name_version_file_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_file_s, 0, FAKE_build_setting_name_version_file_s_length);
const f_string_static_t fake_build_setting_name_version_major_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_major_s, 0, FAKE_build_setting_name_version_major_s_length);
const f_string_static_t fake_build_setting_name_version_major_prefix_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_major_prefix_s, 0, FAKE_build_setting_name_version_major_prefix_s_length);
const f_string_static_t fake_make_setting_load_build_s = macro_f_string_static_t_initialize(FAKE_make_setting_load_build_s, 0, FAKE_make_setting_load_build_s_length);
const f_string_static_t fake_make_setting_parameter_s = macro_f_string_static_t_initialize(FAKE_make_setting_parameter_s, 0, FAKE_make_setting_parameter_s_length);
const f_string_static_t fake_make_setting_return_s = macro_f_string_static_t_initialize(FAKE_make_setting_return_s, 0, FAKE_make_setting_return_s_length);
+ const f_string_static_t fake_make_setting_stage_s = macro_f_string_static_t_initialize(FAKE_make_setting_stage_s, 0, FAKE_make_setting_stage_s_length);
#endif // _di_fake_make_setting_t_
#ifndef _di_fake_make_operation_
* path_sources_script: The path_sources_script setting.
* process_post: The process_post setting.
* process_pre: The process_pre setting.
+ * stage: The stage setting.
* version_major: The version_major setting.
* version_major_prefix: The version_major_prefix setting.
* version_micro: The version_micro setting.
f_string_dynamic_t path_sources_script;
f_string_dynamic_t process_post;
f_string_dynamic_t process_pre;
+ f_string_dynamic_t stage;
f_string_dynamic_t version_major;
f_string_dynamic_t version_major_prefix;
f_string_dynamic_t version_micro;
f_string_dynamic_t_initialize, \
f_string_dynamic_t_initialize, \
f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
f_string_dynamics_t_initialize, \
f_string_dynamics_t_initialize, \
f_string_dynamics_t_initialize, \
macro_f_string_dynamic_t_delete_simple(setting.path_sources_script) \
macro_f_string_dynamic_t_delete_simple(setting.process_post) \
macro_f_string_dynamic_t_delete_simple(setting.process_pre) \
+ macro_f_string_dynamic_t_delete_simple(setting.stage) \
macro_f_string_dynamic_t_delete_simple(setting.version_major) \
macro_f_string_dynamic_t_delete_simple(setting.version_major_prefix) \
macro_f_string_dynamic_t_delete_simple(setting.version_micro) \
#define FAKE_build_setting_name_search_exclusive_s "search_exclusive"
#define FAKE_build_setting_name_search_shared_s "search_shared"
#define FAKE_build_setting_name_search_static_s "search_static"
+ #define FAKE_build_setting_name_stage_s "stage"
#define FAKE_build_setting_name_version_file_s "version_file"
#define FAKE_build_setting_name_version_major_s "version_major"
#define FAKE_build_setting_name_version_major_prefix_s "version_major_prefix"
#define FAKE_build_setting_name_search_exclusive_s_length 16
#define FAKE_build_setting_name_search_shared_s_length 13
#define FAKE_build_setting_name_search_static_s_length 13
+ #define FAKE_build_setting_name_stage_s_length 5
#define FAKE_build_setting_name_version_file_s_length 12
#define FAKE_build_setting_name_version_major_s_length 13
#define FAKE_build_setting_name_version_major_prefix_s_length 20
extern const f_string_static_t fake_build_setting_name_search_exclusive_s;
extern const f_string_static_t fake_build_setting_name_search_shared_s;
extern const f_string_static_t fake_build_setting_name_search_static_s;
+ extern const f_string_static_t fake_build_setting_name_stage_s;
extern const f_string_static_t fake_build_setting_name_version_file_s;
extern const f_string_static_t fake_build_setting_name_version_major_s;
extern const f_string_static_t fake_build_setting_name_version_major_prefix_s;
extern const f_string_static_t fake_build_setting_name_version_nano_prefix_s;
extern const f_string_static_t fake_build_setting_name_version_target_s;
- #define fake_build_setting_total_d 93
+ #define fake_build_setting_total_d 94
#endif // _di_fake_build_setting_t_
#ifndef _di_fake_build_stage_t_
uint8_t fail;
+ f_string_dynamic_t stage;
f_string_map_multis_t parameter;
} fake_make_setting_t;
#define fake_make_setting_t_initialize { \
0, \
0, \
+ f_string_dynamic_t_initialize, \
f_string_map_multis_t_initialize, \
}
#define macro_fake_make_setting_t_delete_simple(setting) \
+ macro_f_string_dynamic_t_delete_simple(setting.stage) \
macro_f_string_map_multis_t_delete_simple(setting.parameter)
#define FAKE_make_setting_compiler_s "compiler"
#define FAKE_make_setting_load_build_s "load_build"
#define FAKE_make_setting_parameter_s "parameter"
#define FAKE_make_setting_return_s "return"
+ #define FAKE_make_setting_stage_s "stage"
#define FAKE_make_setting_compiler_s_length 8
#define FAKE_make_setting_define_s_length 6
#define FAKE_make_setting_load_build_s_length 10
#define FAKE_make_setting_parameter_s_length 9
#define FAKE_make_setting_return_s_length 6
+ #define FAKE_make_setting_stage_s_length 5
extern const f_string_static_t fake_make_setting_compiler_s;
extern const f_string_static_t fake_make_setting_define_s;
extern const f_string_static_t fake_make_setting_load_build_s;
extern const f_string_static_t fake_make_setting_parameter_s;
extern const f_string_static_t fake_make_setting_return_s;
+ extern const f_string_static_t fake_make_setting_stage_s;
#endif // _di_fake_make_setting_t_
#ifndef _di_fake_make_operation_
for (f_array_length_t i = 0; i < settings.objects.used; ++i) {
if (fl_string_dynamic_partial_compare_string(fake_make_setting_load_build_s.string, data_make->buffer, fake_make_setting_load_build_s.used, settings.objects.array[i]) == F_equal_to) {
- fake_make_load_fakefile_setting_build(data_make, &settings.objects.array[i], &settings.contents.array[i]);
+ fake_make_load_fakefile_setting_build(data_make, settings.objects.array[i], &settings.contents.array[i]);
}
else if (fl_string_dynamic_partial_compare_string(fake_make_setting_compiler_s.string, data_make->buffer, fake_make_setting_compiler_s.used, settings.objects.array[i]) == F_equal_to) {
- fake_make_load_fakefile_setting_compiler(data_make, &settings.objects.array[i], &settings.contents.array[i], &range_compiler);
+ fake_make_load_fakefile_setting_compiler(data_make, settings.objects.array[i], &settings.contents.array[i], &range_compiler);
}
else if (fl_string_dynamic_partial_compare_string(fake_make_setting_environment_s.string, data_make->buffer, fake_make_setting_environment_s.used, settings.objects.array[i]) == F_equal_to) {
*status = fake_make_load_fakefile_setting_environment(data_make, &settings.contents.array[i]);
if (F_status_is_error(*status)) break;
}
else if (fl_string_dynamic_partial_compare_string(fake_make_setting_fail_s.string, data_make->buffer, fake_make_setting_fail_s.used, settings.objects.array[i]) == F_equal_to) {
- fake_make_load_fakefile_setting_fail(data_make, &settings.objects.array[i], &settings.contents.array[i]);
+ fake_make_load_fakefile_setting_fail(data_make, settings.objects.array[i], &settings.contents.array[i]);
}
else if (fl_string_dynamic_partial_compare_string(fake_make_setting_indexer_s.string, data_make->buffer, fake_make_setting_indexer_s.used, settings.objects.array[i]) == F_equal_to) {
- fake_make_load_fakefile_setting_indexer(data_make, &settings.objects.array[i], &settings.contents.array[i], &range_indexer);
+ fake_make_load_fakefile_setting_indexer(data_make, settings.objects.array[i], &settings.contents.array[i], &range_indexer);
}
else if (fl_string_dynamic_partial_compare_string(fake_make_setting_parameter_s.string, data_make->buffer, fake_make_setting_parameter_s.used, settings.objects.array[i]) == F_equal_to) {
- *status = fake_make_load_fakefile_setting_parameter(data_make, &settings.objects.array[i], &settings.contents.array[i]);
+ *status = fake_make_load_fakefile_setting_parameter(data_make, settings.objects.array[i], &settings.contents.array[i]);
+ if (F_status_is_error(*status)) break;
+ }
+ else if (fl_string_dynamic_partial_compare_string(fake_make_setting_stage_s.string, data_make->buffer, fake_make_setting_stage_s.used, settings.objects.array[i]) == F_equal_to) {
+ *status = fake_make_load_fakefile_setting_stage(data_make, &settings.contents.array[i]);
if (F_status_is_error(*status)) break;
}
} // for
#endif // _di_fake_make_load_fakefile_
#ifndef _di_fake_make_load_fakefile_setting_build_
- void fake_make_load_fakefile_setting_build(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) {
+ void fake_make_load_fakefile_setting_build(fake_make_data_t * const data_make, const f_fss_object_t object, f_fss_content_t * const content) {
if (content->used) {
if (fl_string_dynamic_partial_compare_string(fake_common_setting_bool_yes_s.string, data_make->buffer, fake_common_setting_bool_yes_s.used, content->array[0]) == F_equal_to) {
data_make->setting_make.load_build = F_false;
}
else {
- fake_print_warning_settings_content_invalid(data_make->data, data_make->data->file_data_build_fakefile, data_make->buffer, *object, content->array[0], fake_make_section_settings_s);
+ fake_print_warning_settings_content_invalid(data_make->data, data_make->data->file_data_build_fakefile, data_make->buffer, object, content->array[0], fake_make_section_settings_s);
}
if (content->used > 1) {
}
}
else {
- fake_print_warning_settings_content_empty(data_make->data, data_make->data->file_data_build_fakefile, data_make->buffer, *object, fake_make_setting_load_build_s);
+ fake_print_warning_settings_content_empty(data_make->data, data_make->data->file_data_build_fakefile, data_make->buffer, object, fake_make_setting_load_build_s);
}
}
#endif // _di_fake_make_load_fakefile_setting_build_
#ifndef _di_fake_make_load_fakefile_setting_compiler_
- void fake_make_load_fakefile_setting_compiler(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_compiler) {
+ void fake_make_load_fakefile_setting_compiler(fake_make_data_t * const data_make, const f_fss_object_t object, f_fss_content_t * const content, f_string_range_t ** const range_compiler) {
if (content->used) {
*range_compiler = &content->array[content->used - 1];
}
}
else {
- fake_print_warning_settings_content_empty(data_make->data, data_make->data->file_data_build_fakefile, data_make->buffer, *object, fake_make_setting_compiler_s);
+ fake_print_warning_settings_content_empty(data_make->data, data_make->data->file_data_build_fakefile, data_make->buffer, object, fake_make_setting_compiler_s);
}
}
#endif // _di_fake_make_load_fakefile_setting_compiler_
#endif // _di_fake_make_load_fakefile_setting_environment_
#ifndef _di_fake_make_load_fakefile_setting_fail_
- void fake_make_load_fakefile_setting_fail(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) {
+ void fake_make_load_fakefile_setting_fail(fake_make_data_t * const data_make, const f_fss_object_t object, f_fss_content_t * const content) {
if (content->used) {
if (fl_string_dynamic_partial_compare_string(fake_make_operation_argument_exit_s.string, data_make->buffer, fake_make_operation_argument_exit_s.used, content->array[content->used - 1]) == F_equal_to) {
data_make->setting_make.fail = fake_make_operation_fail_type_ignore_e;
}
else {
- fake_print_warning_settings_content_invalid(data_make->data, data_make->data->file_data_build_fakefile, data_make->buffer, *object, content->array[content->used - 1], fake_make_section_settings_s);
+ fake_print_warning_settings_content_invalid(data_make->data, data_make->data->file_data_build_fakefile, data_make->buffer, object, content->array[content->used - 1], fake_make_section_settings_s);
}
if (content->used > 1) {
}
}
else {
- fake_print_warning_settings_content_empty(data_make->data, data_make->data->file_data_build_fakefile, data_make->buffer, *object, fake_make_setting_fail_s);
+ fake_print_warning_settings_content_empty(data_make->data, data_make->data->file_data_build_fakefile, data_make->buffer, object, fake_make_setting_fail_s);
}
}
#endif // _di_fake_make_load_fakefile_setting_fail_
#ifndef _di_fake_make_load_fakefile_setting_indexer_
- void fake_make_load_fakefile_setting_indexer(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_indexer) {
+ void fake_make_load_fakefile_setting_indexer(fake_make_data_t * const data_make, const f_fss_object_t object, f_fss_content_t * const content, f_string_range_t ** const range_indexer) {
if (content->used) {
*range_indexer = &content->array[content->used - 1];
}
}
else {
- fake_print_warning_settings_content_empty(data_make->data, data_make->data->file_data_build_fakefile, data_make->buffer, *object, fake_make_setting_indexer_s);
+ fake_print_warning_settings_content_empty(data_make->data, data_make->data->file_data_build_fakefile, data_make->buffer, object, fake_make_setting_indexer_s);
}
}
#endif // _di_fake_make_load_fakefile_setting_indexer_
#ifndef _di_fake_make_load_fakefile_setting_parameter_
- f_status_t fake_make_load_fakefile_setting_parameter(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) {
+ f_status_t fake_make_load_fakefile_setting_parameter(fake_make_data_t * const data_make, const f_fss_object_t object, f_fss_content_t * const content) {
if (content->used) {
f_status_t status = F_none;
}
}
else {
- fake_print_warning_settings_content_empty(data_make->data, data_make->data->file_data_build_fakefile, data_make->buffer, *object, fake_make_setting_return_s);
+ fake_print_warning_settings_content_empty(data_make->data, data_make->data->file_data_build_fakefile, data_make->buffer, object, fake_make_setting_return_s);
}
return F_none;
}
#endif // _di_fake_make_load_fakefile_setting_parameter_
+#ifndef _di_fake_make_load_fakefile_setting_stage_
+ f_status_t fake_make_load_fakefile_setting_stage(fake_make_data_t * const data_make, f_fss_content_t * const content) {
+
+ if (content->used) {
+ if (content->used > 1) {
+ fake_print_warning_settings_content_multiple(data_make->data, data_make->data->file_data_build_fakefile, fake_make_setting_stage_s);
+ }
+
+ f_status_t status = F_none;
+
+ // Verify that there are no forward or backward slashes in the string.
+ for (f_number_unsigned_t i = content->array[content->used - 1].start; i <= content->array[content->used - 1].stop; ++i) {
+
+ if (data_make->buffer.string[i] == f_string_ascii_slash_forward_s.string[0] || data_make->buffer.string[i] == f_string_ascii_slash_backward_s.string[0]) {
+ status = F_warning;
+
+ // Prevent the slash from being copied.
+ data_make->buffer.string[i] = 0;
+ }
+ } // for
+
+ if (status == F_warning) {
+ if (data_make->main->warning.verbosity >= f_console_verbosity_verbose_e) {
+ flockfile(data_make->main->warning.to.stream);
+
+ fl_print_format("%r%[%QThe setting '%]", data_make->main->warning.to.stream, f_string_eol_s, data_make->main->warning.context, data_make->main->warning.prefix, data_make->main->warning.context);
+ fl_print_format("%[%Q%]", data_make->main->warning.to.stream, data_make->main->warning.notable, fake_make_setting_stage_s, data_make->main->warning.notable);
+ fl_print_format("%[' in the file '%]", data_make->main->warning.to.stream, data_make->main->warning.context, data_make->main->warning.context);
+ fl_print_format("%[%Q%]", data_make->main->warning.to.stream, data_make->main->warning.notable, data_make->data->file_data_build_fakefile, data_make->main->warning.notable);
+ fl_print_format("%[' has and must not have forward or backward slashes, ignoring slashes.%]%r", data_make->main->warning.to.stream, data_make->main->warning.context, data_make->main->warning.context, f_string_eol_s);
+
+ funlockfile(data_make->main->warning.to.stream);
+ }
+ }
+
+ data_make->setting_make.stage.used = 0;
+
+ status = f_string_dynamic_partial_append_nulless(data_make->buffer, content->array[content->used - 1], &data_make->setting_make.stage);
+
+ if (F_status_is_error(status)) {
+ fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
+
+ return status;
+ }
+ }
+ else {
+ const f_string_range_t range = macro_f_string_range_t_initialize2(fake_make_setting_stage_s.used);
+
+ fake_print_warning_settings_content_empty(data_make->data, data_make->data->file_data_build_fakefile, fake_make_setting_stage_s, range, fake_make_setting_stage_s);
+ }
+
+ return F_none;
+ }
+#endif // _di_fake_make_load_fakefile_setting_stage_
+
#ifdef __cplusplus
} // extern "C"
#endif
* The setting content.
*/
#ifndef _di_fake_make_load_fakefile_setting_build_
- extern void fake_make_load_fakefile_setting_build(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) F_attribute_visibility_internal_d;
+ extern void fake_make_load_fakefile_setting_build(fake_make_data_t * const data_make, const f_fss_object_t object, f_fss_content_t * const content) F_attribute_visibility_internal_d;
#endif // _di_fake_make_load_fakefile_setting_build_
/**
* A pointer to the range that representing the compiler setting within the buffer.
*/
#ifndef _di_fake_make_load_fakefile_setting_compiler_
- extern void fake_make_load_fakefile_setting_compiler(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_compiler) F_attribute_visibility_internal_d;
+ extern void fake_make_load_fakefile_setting_compiler(fake_make_data_t * const data_make, const f_fss_object_t object, f_fss_content_t * const content, f_string_range_t ** const range_compiler) F_attribute_visibility_internal_d;
#endif // _di_fake_make_load_fakefile_setting_compiler_
/**
* The setting content.
*/
#ifndef _di_fake_make_load_fakefile_setting_fail_
- extern void fake_make_load_fakefile_setting_fail(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) F_attribute_visibility_internal_d;
+ extern void fake_make_load_fakefile_setting_fail(fake_make_data_t * const data_make, const f_fss_object_t object, f_fss_content_t * const content) F_attribute_visibility_internal_d;
#endif // _di_fake_make_load_fakefile_setting_fail_
/**
* A pointer to the range that representing the indexer setting within the buffer.
*/
#ifndef _di_fake_make_load_fakefile_setting_indexer_
- extern void fake_make_load_fakefile_setting_indexer(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_indexer) F_attribute_visibility_internal_d;
+ extern void fake_make_load_fakefile_setting_indexer(fake_make_data_t * const data_make, const f_fss_object_t object, f_fss_content_t * const content, f_string_range_t ** const range_indexer) F_attribute_visibility_internal_d;
#endif // _di_fake_make_load_fakefile_setting_indexer_
/**
* @see fake_make_load_fakefile_setting_define_and_parameter()
*/
#ifndef _di_fake_make_load_fakefile_setting_parameter_
- extern f_status_t fake_make_load_fakefile_setting_parameter(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) F_attribute_visibility_internal_d;
+ extern f_status_t fake_make_load_fakefile_setting_parameter(fake_make_data_t * const data_make, const f_fss_object_t object, f_fss_content_t * const content) F_attribute_visibility_internal_d;
#endif // _di_fake_make_load_fakefile_setting_parameter_
+/**
+ * Load the fakefile setting "stage".
+ *
+ * @param data_make
+ * All make related setting data, including data from the fakefile and the build settings file.
+ * @param content
+ * The setting content.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
+ *
+ * @see f_string_dynamic_partial_append_nulless()
+ */
+#ifndef _di_fake_make_load_fakefile_setting_stage_
+ extern f_status_t fake_make_load_fakefile_setting_stage(fake_make_data_t * const data_make, f_fss_content_t * const content) F_attribute_visibility_internal_d;
+#endif // _di_fake_make_load_fakefile_setting_stage_
+
#ifdef __cplusplus
} // extern "C"
#endif
#ifndef _di_fake_make_operate_process_type_build_
f_status_t fake_make_operate_process_type_build(fake_make_data_t * const data_make) {
- const f_status_t status = fake_build_operate(data_make->data, data_make->cache_arguments.used ? &data_make->cache_arguments : 0, F_false);
+ const f_status_t status = fake_build_operate(data_make->data, data_make->cache_arguments.used ? &data_make->cache_arguments : 0, F_false, data_make->setting_make.stage);
if (F_status_set_fine(status) == F_interrupt) return status;
return fake_make_operate_process_return(data_make, F_status_is_error(status) ? 1 : 0, status);
# fss-0002 iki-0000
#
# license: open-standard-license-1.0-or-later
-# version 2024/03/23
+# version 2024/07/30
#
# This file (assumed to be named fakefile.txt) can be more easily read using the following iki_read commands:
# iki_read fakefile.txt +Q -w -rrr ASCII ASCII GCC GCC HTML HTML -WW character "'" "'" code '"' '"'
The parameter variable name code:"return" is used to store the return result of a code:"run" or code:"shell" operation.
Setting this here only sets the default code:"return" parameter variable value.
+ - code:"stage"\:
+ This defines a name that is added to the build stage files to help uniquely identify build stages associated with this file.
+ This name must only have valid characters for a particular file system.
+ The variables allowed are different from file system to file system and so special characters should generally be avoided.
+
+ To help prevent problems with paths, slashes (forward slash and backward slash) are not allowed in the stage name.
+
- code:"main"\:
This is the main entry point when processing the file:"fakefile".
This is processed top-down until the end of the list is reached.
- code:"documents"\:
This variable holds the code:"documents" program parameters, such as code:"-O documents/".
This supports both code:":option" and code:":value".
+
This is neither implemented nor supported by Featureless Make 0.6.x and earlier.
- code:"fakefile"\:
- code:"licenses"\:
This variable holds the code:"licenses" program parameters, such as code:"-l licenses/".
This supports both code:":option" and code:":value".
+
This is neither implemented nor supported by Featureless Make 0.6.x and earlier.
- code:"mode"\:
# fss-0002 iki-0000
#
# license: open-standard-license-1.0-or-later
-# version 2024/03/23
+# version 2024/07/30
#
# This file (assumed to be named settings.txt) can be more easily read using the following iki_read commands:
# iki_read settings.txt +Q -w -rrr ASCII ASCII FLL FLL GCC GCC -WW character "'" "'" code '"' '"'
When code:"yes", static library paths are searched during compile.
Both this and search_shared cannot be code:"no" at the same time.
+ - code:"stage"\:
+ This defines a name that is added to the build stage files to help uniquely identify build stages associated with this file.
+ This name must only have valid characters for a particular file system.
+ The variables allowed are different from file system to file system and so special characters should generally be avoided.
+
+ To help prevent problems with paths, slashes (forward slash and backward slash) are not allowed in the stage name.
+
- code:"version_file"\:
Designates which version should be used when building the symbolic links.
Any version prefixes are used as defined.
# fss-0002 iki-0000
#
# license: open-standard-license-1.0-or-later
-# version 2024/03/23
+# version 2024/07/30
#
# This file (assumed to be named fakefile.txt) can be more easily read using the following iki_read commands:
# iki_read fakefile.txt +Q -w -WW character "'" "'" code '"' '"'
The bold:"Settings Objects" are\:
- code:"compiler": Only one bold:"Content", which must only be a valid filename.
- - code:"define": First bold:"Content" represents variable name (case-sensitive), remaining bold:"Content" represents the value.
+ - code:"define": First bold:"Content" represents the variable name (case-sensitive), remaining bold:"Content" represents the value.
- code:"environment": Zero or more bold:"Content" representing valid environment variable names (alpha-numeric with underscore, but cannot begin with a number).
- code:"fail": Only one bold:"Content", which must be either code:"exit", code:"warn" or code:"ignore" (quotes not required) (case-sensitive).
- code:"import": Only one bold:"Content", which must only be a valid filename.
- code:"indexer": Only one bold:"Content", which must only be a valid filename.
- code:"indexer_arguments: Zero or more arguments supported by the indexer specified in code:"build_indexer".
- code:"load_build": Only one bold:"Content", which must be either code:"yes" or code:"no" (quotes not required) (case-sensitive).
- - code:"parameter": First bold:"Content" represents variable name (case-sensitive), remaining bold:"Content" represents the value.
+ - code:"parameter": First bold:"Content" represents the variable name (case-sensitive), remaining bold:"Content" represents the value.
+ - code:"stage": Zero or one bold:"Content", which represents the build stage name (case-sensitive) (no slashes allowed).
The build settings may also be specified in the bold:"Settings Section".
The code:"if" bold:"Section Operation" condition code:"parameter"\:
The following reserved words are available for parameter names: code:"build", code:"color", code:"current", code:"data", code:"documents", code:"define", code:"fakefile", code:"licenses", code:"mode", code:"process", code:"return", code:"settings", code:"sources", code:"top", code:"under", code:"verbosity", and code:"work".
- The reserved words code:"documents" and code:"licenses" are neither implemented nor supported by Featureless Make 0.6.x and earlier).
Each of the reserved words supports having code:":option" and code:":value" appended, such as: code:"work:value".
# fss-0002 iki-0000
#
# license: open-standard-license-1.0-or-later
-# version 2024/03/23
+# version 2024/07/30
#
# This file (assumed to be named settings.txt) can be more easily read using the following iki_read commands:
# iki_read settings.txt +Q -w -WW character "'" "'" code '"' '"'
- code:"search_exclusive": Must only one of: code:"yes" or code:"no".
- code:"search_shared": Must only one of: code:"yes" or code:"no".
- code:"search_static": Must only one of: code:"yes" or code:"no".
+ - code:"stage": Only zero or one bold:"Content", which represents the build stage name (case-sensitive) (no slashes allowed).
- code:"version_file": Must only be one of: code:"major", code:"minor", code:"micro", or code:"nano".
- code:"version_major": Must only be a single value containing valid filename characters.
- code:"version_major_prefix": Must be zero or more valid filename characters.