"search_exclusive") echo -n 39;;
"search_shared") echo -n 40;;
"search_static") echo -n 41;;
- "version_major") echo -n 42;;
- "version_major_prefix") echo -n 43;;
- "version_micro") echo -n 44;;
- "version_micro_prefix") echo -n 45;;
- "version_minor") echo -n 46;;
- "version_minor_prefix") echo -n 47;;
- "version_nano") echo -n 48;;
- "version_nano_prefix") echo -n 49;;
- "version_target") echo -n 50;;
-
- "build_libraries-$mode") echo -n 51;;
- "build_sources_headers-$mode") echo -n 52;;
- "build_sources_library-$mode") echo -n 53;;
- "build_sources_program-$mode") echo -n 54;;
- "build_sources_script-$mode") echo -n 55;;
- "build_sources_setting-$mode") echo -n 56;;
- "defines_all-$mode") echo -n 57;;
- "defines_library-$mode") echo -n 58;;
- "defines_program-$mode") echo -n 59;;
- "defines_shared-$mode") echo -n 60;;
- "defines_static-$mode") echo -n 61;;
- "environment-$mode") echo -n 62;;
- "flags_all-$mode") echo -n 63;;
- "flags_library-$mode") echo -n 64;;
- "flags_program-$mode") echo -n 65;;
- "flags_shared-$mode") echo -n 66;;
- "flags_static-$mode") echo -n 67;;
-
- "has-version_major_prefix") echo -n 68;;
- "has-version_micro_prefix") echo -n 69;;
- "has-version_minor_prefix") echo -n 70;;
- "has-version_nano_prefix") echo -n 71;;
-
- "has-version_major_prefix-$mode") echo -n 72;;
- "has-version_micro_prefix-$mode") echo -n 73;;
- "has-version_minor_prefix-$mode") echo -n 74;;
- "has-version_nano_prefix-$mode") echo -n 75;;
+ "version_file") echo -n 42;;
+ "version_major") echo -n 43;;
+ "version_major_prefix") echo -n 44;;
+ "version_micro") echo -n 45;;
+ "version_micro_prefix") echo -n 46;;
+ "version_minor") echo -n 47;;
+ "version_minor_prefix") echo -n 48;;
+ "version_nano") echo -n 49;;
+ "version_nano_prefix") echo -n 50;;
+ "version_target") echo -n 51;;
+
+ "build_libraries-$mode") echo -n 52;;
+ "build_sources_headers-$mode") echo -n 53;;
+ "build_sources_library-$mode") echo -n 54;;
+ "build_sources_program-$mode") echo -n 55;;
+ "build_sources_script-$mode") echo -n 56;;
+ "build_sources_setting-$mode") echo -n 57;;
+ "defines_all-$mode") echo -n 58;;
+ "defines_library-$mode") echo -n 59;;
+ "defines_program-$mode") echo -n 60;;
+ "defines_shared-$mode") echo -n 61;;
+ "defines_static-$mode") echo -n 62;;
+ "environment-$mode") echo -n 63;;
+ "flags_all-$mode") echo -n 64;;
+ "flags_library-$mode") echo -n 65;;
+ "flags_program-$mode") echo -n 66;;
+ "flags_shared-$mode") echo -n 67;;
+ "flags_static-$mode") echo -n 68;;
+
+ "has-version_major_prefix") echo -n 69;;
+ "has-version_micro_prefix") echo -n 70;;
+ "has-version_minor_prefix") echo -n 71;;
+ "has-version_nano_prefix") echo -n 72;;
+
+ "has-version_major_prefix-$mode") echo -n 73;;
+ "has-version_micro_prefix-$mode") echo -n 74;;
+ "has-version_minor_prefix-$mode") echo -n 75;;
+ "has-version_nano_prefix-$mode") echo -n 76;;
esac
}
local micro_prefix=${variables[$(bootstrap_id version_micro_prefix)]}
local nano=${variables[$(bootstrap_id version_nano)]}
local nano_prefix=${variables[$(bootstrap_id version_nano_prefix)]}
+ local file=${variables[$(bootstrap_id version_file)]}
local target=${variables[$(bootstrap_id version_target)]}
local compiler=${variables[$(bootstrap_id build_compiler)]}
local indexer=${variables[$(bootstrap_id build_indexer)]}
local flags_static=${variables[$(bootstrap_id flags_static)]}
local i=
local n=
- local version=
+ local version_file=
+ local version_target=
local alt=$1
local directory=
local path_headers=${variables[$(bootstrap_id path_headers)]}
nano_prefix="."
fi
+ if [[ $file == "" ]] ; then
+ file="micro"
+ fi
+
if [[ $target == "" ]] ; then
- target="micro"
+ target="major"
+ fi
+
+ if [[ $file == "major" ]] ; then
+ version_file="$major_prefix$major"
+ elif [[ $file == "minor" ]] ; then
+ version_file="$major_prefix$major$minor_prefix$minor"
+ elif [[ $file == "micro" ]] ; then
+ version_file="$major_prefix$major$minor_prefix$minor$micro_prefix$micro"
+ elif [[ $file == "nano" ]] ; then
+ version_file="$major_prefix$major$minor_prefix$minor$micro_prefix$micro$nano_prefix$nano"
fi
if [[ $target == "major" ]] ; then
- version="$major_prefix$major"
+ version_target="$major_prefix$major"
elif [[ $target == "minor" ]] ; then
- version="$major_prefix$major$minor_prefix$minor"
+ version_target="$major_prefix$major$minor_prefix$minor"
elif [[ $target == "micro" ]] ; then
- version="$major_prefix$major$minor_prefix$minor$micro_prefix$micro"
+ version_target="$major_prefix$major$minor_prefix$minor$micro_prefix$micro"
elif [[ $target == "nano" ]] ; then
- version="$major_prefix$major$minor_prefix$minor$micro_prefix$micro$nano_prefix$nano"
+ version_target="$major_prefix$major$minor_prefix$minor$micro_prefix$micro$nano_prefix$nano"
fi
if [[ $sources_library == "" ]] ; then
done
if [[ $verbosity == "verbose" ]] ; then
- echo $compiler $sources -shared -Wl,-soname,lib$name.so.$version -o ${path_build}libraries/shared/lib$name.so.$version $arguments_shared $arguments_include $libraries $flags_all $flags_shared $flags_library $defines_all $defines_shared $defines_library
+ echo $compiler $sources -shared -Wl,-soname,lib$name.so.$version_target -o ${path_build}libraries/shared/lib$name.so.$version_file $arguments_shared $arguments_include $libraries $flags_all $flags_shared $flags_library $defines_all $defines_shared $defines_library
fi
- $compiler $sources -shared -Wl,-soname,lib$name.so.$version -o ${path_build}libraries/shared/lib$name.so.$version $arguments_shared $arguments_include $libraries $flags_all $flags_shared $flags_library $defines_all $defines_shared $defines_library || failure=1
+ $compiler $sources -shared -Wl,-soname,lib$name.so.$version_target -o ${path_build}libraries/shared/lib$name.so.$version_file $arguments_shared $arguments_include $libraries $flags_all $flags_shared $flags_library $defines_all $defines_shared $defines_library || failure=1
if [[ $failure == "" ]] ; then
- if [[ $target != "major" ]] ; then
- ln $verbose -sf lib$name.so.$version ${path_build}libraries/shared/lib$name.so.$major || failure=1
+ if [[ $file != "major" ]] ; then
+ if [[ $file == "minor" ]] ; then
+ ln $verbose -sf lib$name.so.$version_file ${path_build}libraries/shared/lib$name.so.$major_prefix$major || failure=1
+ else
+ ln $verbose -sf lib$name.so.$major_prefix$major$minor_prefix$minor ${path_build}libraries/shared/lib$name.so.$major_prefix$major || failure=1
+
+ if [[ $failure == "" ]] ; then
+ if [[ $file == "micro" ]] ; then
+ ln $verbose -sf lib$name.so.$version_file ${path_build}libraries/shared/lib$name.so.$major_prefix$major$minor_prefix$minor || failure=1
+ else
+ ln $verbose -sf lib$name.so.$major_prefix$major$minor_prefix$minor$micro_prefix$micro ${path_build}libraries/shared/lib$name.so.$major_prefix$major$minor_prefix$minor || failure=1
+
+ if [[ $failure == "" ]] ; then
+ ln $verbose -sf lib$name.so.$version_file ${path_build}libraries/shared/lib$name.so.$major_prefix$major$minor_prefix$minor_prefix$minor$micro_prefix$micro || failure=1
+ fi
+ fi
+ fi
+ fi
fi
- ln $verbose -sf lib$name.so.$major ${path_build}libraries/shared/lib$name.so || failure=1
+ if [[ $failure == "" ]] ; then
+ ln $verbose -sf lib$name.so.$major_prefix$major ${path_build}libraries/shared/lib$name.so || failure=1
+ fi
fi
fi
f_array_length_t parameter_linker_length = fake_build_parameter_library_shared_prefix_length;
f_array_length_t parameter_file_path_length = main.path_build_libraries_shared.used;
+ if (data_build.setting.version_file == fake_build_version_type_major) {
+ parameter_file_path_length += parameter_file_name_major_length;
+ }
+ else if (data_build.setting.version_file == fake_build_version_type_minor) {
+ parameter_file_path_length += parameter_file_name_minor_length;
+ }
+ else if (data_build.setting.version_file == fake_build_version_type_micro) {
+ parameter_file_path_length += parameter_file_name_micro_length;
+ }
+ else if (data_build.setting.version_file == fake_build_version_type_nano) {
+ parameter_file_path_length += parameter_file_name_nano_length;
+ }
+
if (data_build.setting.version_target == fake_build_version_type_major) {
parameter_linker_length += parameter_file_name_major_length;
- parameter_file_path_length += parameter_file_name_major_length;
}
else if (data_build.setting.version_target == fake_build_version_type_minor) {
parameter_linker_length += parameter_file_name_minor_length;
- parameter_file_path_length += parameter_file_name_minor_length;
}
else if (data_build.setting.version_target == fake_build_version_type_micro) {
parameter_linker_length += parameter_file_name_micro_length;
- parameter_file_path_length += parameter_file_name_micro_length;
}
else if (data_build.setting.version_target == fake_build_version_type_nano) {
parameter_linker_length += parameter_file_name_nano_length;
- parameter_file_path_length += parameter_file_name_nano_length;
}
char parameter_linker[parameter_linker_length + 1];
memcpy(parameter_linker, fake_build_parameter_library_shared_prefix, fake_build_parameter_library_shared_prefix_length);
memcpy(parameter_file_path, main.path_build_libraries_shared.string, main.path_build_libraries_shared.used);
+ if (data_build.setting.version_file == fake_build_version_type_major) {
+ memcpy(parameter_file_path + main.path_build_libraries_shared.used, parameter_file_name_major, parameter_file_name_major_length);
+ }
+ else if (data_build.setting.version_file == fake_build_version_type_minor) {
+ memcpy(parameter_file_path + main.path_build_libraries_shared.used, parameter_file_name_minor, parameter_file_name_minor_length);
+ }
+ else if (data_build.setting.version_file == fake_build_version_type_micro) {
+ memcpy(parameter_file_path + main.path_build_libraries_shared.used, parameter_file_name_micro, parameter_file_name_micro_length);
+ }
+ else if (data_build.setting.version_file == fake_build_version_type_nano) {
+ memcpy(parameter_file_path + main.path_build_libraries_shared.used, parameter_file_name_nano, parameter_file_name_nano_length);
+ }
+
if (data_build.setting.version_target == fake_build_version_type_major) {
memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_length, parameter_file_name_major, parameter_file_name_major_length);
- memcpy(parameter_file_path + main.path_build_libraries_shared.used, parameter_file_name_major, parameter_file_name_major_length);
}
else if (data_build.setting.version_target == fake_build_version_type_minor) {
memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_length, parameter_file_name_minor, parameter_file_name_minor_length);
- memcpy(parameter_file_path + main.path_build_libraries_shared.used, parameter_file_name_minor, parameter_file_name_minor_length);
}
else if (data_build.setting.version_target == fake_build_version_type_micro) {
memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_length, parameter_file_name_micro, parameter_file_name_micro_length);
- memcpy(parameter_file_path + main.path_build_libraries_shared.used, parameter_file_name_micro, parameter_file_name_micro_length);
}
else if (data_build.setting.version_target == fake_build_version_type_nano) {
memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_length, parameter_file_name_nano, parameter_file_name_nano_length);
- memcpy(parameter_file_path + main.path_build_libraries_shared.used, parameter_file_name_nano, parameter_file_name_nano_length);
}
parameter_linker[parameter_linker_length] = 0;
}
}
- if (data_build.setting.version_target != fake_build_version_type_major && parameter_file_name_major_length) {
- f_array_length_t parameter_file_path_length = main.path_build_libraries_shared.used + parameter_file_name_major_length;
+ if (parameter_file_name_major_length) {
- char *link_target = 0;
- char parameter_file_path[parameter_file_path_length + 1];
+ f_array_length_t parameter_file_path_length = main.path_build_libraries_shared.used + parameter_file_name_length;
- if (data_build.setting.version_target == fake_build_version_type_minor) {
- link_target = parameter_file_name_minor;
- }
- else if (data_build.setting.version_target == fake_build_version_type_micro) {
- link_target = parameter_file_name_micro;
- }
- else if (data_build.setting.version_target == fake_build_version_type_nano) {
- link_target = parameter_file_name_nano;
- }
+ char parameter_file_path[parameter_file_path_length + 1];
memcpy(parameter_file_path, main.path_build_libraries_shared.string, main.path_build_libraries_shared.used);
- memcpy(parameter_file_path + main.path_build_libraries_shared.used, parameter_file_name_major, parameter_file_name_major_length);
+ memcpy(parameter_file_path + main.path_build_libraries_shared.used, parameter_file_name, parameter_file_name_length);
parameter_file_path[parameter_file_path_length] = 0;
return 0;
}
- *status = f_file_link(link_target, parameter_file_path);
+ *status = f_file_link(parameter_file_name_major, parameter_file_path);
if (F_status_is_error_not(*status) && main.error.verbosity == f_console_verbosity_verbose) {
- fprintf(main.output.stream, "Linked file '%s' to '%s'.%c", parameter_file_path, link_target, f_string_eol_s[0]);
+ fprintf(main.output.stream, "Linked file '%s' to '%s'.%c", parameter_file_path, parameter_file_name_major, f_string_eol_s[0]);
}
else if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) == F_file_found) {
return 0;
}
- fll_error_file_print(main.error, F_status_set_fine(*status), "f_file_link", F_true, link_target, "link", fll_error_file_type_file);
+ fll_error_file_print(main.error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_major, "link", fll_error_file_type_file);
return 0;
}
}
- if (F_status_is_error_not(*status) && parameter_file_name_major_length) {
+ if (data_build.setting.version_file != fake_build_version_type_major && parameter_file_name_major_length) {
- f_array_length_t parameter_file_path_length = main.path_build_libraries_shared.used + parameter_file_name_length;
+ f_array_length_t parameter_file_path_length = main.path_build_libraries_shared.used + parameter_file_name_major_length;
char parameter_file_path[parameter_file_path_length + 1];
memcpy(parameter_file_path, main.path_build_libraries_shared.string, main.path_build_libraries_shared.used);
- memcpy(parameter_file_path + main.path_build_libraries_shared.used, parameter_file_name, parameter_file_name_length);
+ memcpy(parameter_file_path + main.path_build_libraries_shared.used, parameter_file_name_major, parameter_file_name_major_length);
parameter_file_path[parameter_file_path_length] = 0;
return 0;
}
- *status = f_file_link(parameter_file_name_major, parameter_file_path);
+ *status = f_file_link(parameter_file_name_minor, parameter_file_path);
if (F_status_is_error_not(*status) && main.error.verbosity == f_console_verbosity_verbose) {
- fprintf(main.output.stream, "Linked file '%s' to '%s'.%c", parameter_file_path, parameter_file_name_major, f_string_eol_s[0]);
+ fprintf(main.output.stream, "Linked file '%s' to '%s'.%c", parameter_file_path, parameter_file_name_minor, f_string_eol_s[0]);
}
else if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) == F_file_found) {
return 0;
}
- fll_error_file_print(main.error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_major, "link", fll_error_file_type_file);
+ fll_error_file_print(main.error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_minor, "link", fll_error_file_type_file);
return 0;
}
+
+ if (data_build.setting.version_file != fake_build_version_type_minor && parameter_file_name_minor_length) {
+
+ f_array_length_t parameter_file_path_length = main.path_build_libraries_shared.used + parameter_file_name_minor_length;
+
+ char parameter_file_path[parameter_file_path_length + 1];
+
+ memcpy(parameter_file_path, main.path_build_libraries_shared.string, main.path_build_libraries_shared.used);
+ memcpy(parameter_file_path + main.path_build_libraries_shared.used, parameter_file_name_minor, parameter_file_name_minor_length);
+
+ parameter_file_path[parameter_file_path_length] = 0;
+
+ if (fake_signal_received(main)) {
+ *status = F_status_set_error(F_signal);
+
+ return 0;
+ }
+
+ *status = f_file_link(parameter_file_name_micro, parameter_file_path);
+
+ if (F_status_is_error_not(*status) && main.error.verbosity == f_console_verbosity_verbose) {
+ fprintf(main.output.stream, "Linked file '%s' to '%s'.%c", parameter_file_path, parameter_file_name_micro, f_string_eol_s[0]);
+ }
+ else if (F_status_is_error(*status)) {
+ if (F_status_set_fine(*status) == F_file_found) {
+ fll_error_file_print(main.error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, "link", fll_error_file_type_file);
+
+ return 0;
+ }
+
+ fll_error_file_print(main.error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_micro, "link", fll_error_file_type_file);
+
+ return 0;
+ }
+
+ if (data_build.setting.version_file != fake_build_version_type_micro && parameter_file_name_micro_length) {
+
+ f_array_length_t parameter_file_path_length = main.path_build_libraries_shared.used + parameter_file_name_micro_length;
+
+ char parameter_file_path[parameter_file_path_length + 1];
+
+ memcpy(parameter_file_path, main.path_build_libraries_shared.string, main.path_build_libraries_shared.used);
+ memcpy(parameter_file_path + main.path_build_libraries_shared.used, parameter_file_name_micro, parameter_file_name_micro_length);
+
+ parameter_file_path[parameter_file_path_length] = 0;
+
+ if (fake_signal_received(main)) {
+ *status = F_status_set_error(F_signal);
+
+ return 0;
+ }
+
+ *status = f_file_link(parameter_file_name_nano, parameter_file_path);
+
+ if (F_status_is_error_not(*status) && main.error.verbosity == f_console_verbosity_verbose) {
+ fprintf(main.output.stream, "Linked file '%s' to '%s'.%c", parameter_file_path, parameter_file_name_nano, f_string_eol_s[0]);
+ }
+ else if (F_status_is_error(*status)) {
+ if (F_status_set_fine(*status) == F_file_found) {
+ fll_error_file_print(main.error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, "link", fll_error_file_type_file);
+
+ return 0;
+ }
+
+ fll_error_file_print(main.error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_nano, "link", fll_error_file_type_file);
+
+ return 0;
+ }
+ }
+ }
}
fake_build_touch(main, file_stage, status);
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 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;
f_string_dynamics_t version_micro = f_string_dynamics_t_initialize;
fake_build_setting_name_search_exclusive,
fake_build_setting_name_search_shared,
fake_build_setting_name_search_static,
+ fake_build_setting_name_version_file,
fake_build_setting_name_version_major,
fake_build_setting_name_version_major_prefix,
fake_build_setting_name_version_micro,
fake_build_setting_name_search_exclusive_length,
fake_build_setting_name_search_shared_length,
fake_build_setting_name_search_static_length,
+ fake_build_setting_name_version_file_length,
fake_build_setting_name_version_major_length,
fake_build_setting_name_version_major_prefix_length,
fake_build_setting_name_version_micro_length,
&search_exclusive,
&search_shared,
&search_static,
+ &version_file,
&version_major,
&version_major_prefix,
&version_micro,
F_false,
F_false,
F_false,
+ F_false,
};
f_string_t function = "fll_fss_snatch_apart";
fake_build_setting_name_search_exclusive,
fake_build_setting_name_search_shared,
fake_build_setting_name_search_static,
+ fake_build_setting_name_version_file,
fake_build_setting_name_version_major,
fake_build_setting_name_version_major_prefix,
fake_build_setting_name_version_micro,
&search_exclusive,
&search_shared,
&search_static,
+ &version_file,
&version_major,
&version_major_prefix,
&version_micro,
0,
0,
0,
+ 0,
&setting->version_major,
&setting->version_major_prefix,
&setting->version_micro,
0,
0,
0,
+ &setting->version_file,
0,
0,
0,
&setting->version_target,
};
+ const uint8_t settings_single_version_default[] = {
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ fake_build_version_type_micro,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ fake_build_version_type_major,
+ };
+
+ const char *settings_single_version_default_name[] = {
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ fake_build_version_micro,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ fake_build_version_major,
+ };
+
// 1 = "yes" or "no", 2 = path/, 3 = literal, 4 = "bash", "c", or "c++", 5 = "major", "minor", "micro", or "nano".
const uint8_t settings_single_type[] = {
3,
1,
1,
1,
+ 5,
3,
3,
3,
5,
};
- for (f_array_length_t i = 0; i < 32; ++i) {
+ for (f_array_length_t i = 0; i < 33; ++i) {
if (!settings_single_source[i]->used) continue;
*settings_single_version[i] = fake_build_version_type_nano;
}
else {
- *settings_single_version[i] = fake_build_version_type_major;
+ *settings_single_version[i] = settings_single_version_default[i];
if (main.error.verbosity == f_console_verbosity_verbose) {
fprintf(main.output.stream, "%c", f_string_eol_s[0]);
f_color_print(main.output.stream, main.context.set.warning, "', or '");
f_color_print(main.output.stream, main.context.set.notable, "%s", fake_build_version_nano);
f_color_print(main.output.stream, main.context.set.warning, "', defaulting to '");
- f_color_print(main.output.stream, main.context.set.notable, "%s", fake_build_version_major);
+ f_color_print(main.output.stream, main.context.set.notable, "%s", settings_single_version_default_name[i]);
f_color_print(main.output.stream, main.context.set.warning, "'.");
fprintf(main.output.stream, "%c", f_string_eol_s[0]);
}
}
} // for
+ if (F_status_is_error_not(*status)) {
+ if (!setting->version_file) {
+ setting->version_file = fake_build_version_type_micro;
+
+ if (main.error.verbosity == f_console_verbosity_verbose) {
+ fprintf(main.output.stream, "%c", f_string_eol_s[0]);
+ f_color_print(main.output.stream, main.context.set.warning, "%sthe setting '", fll_error_print_warning);
+ f_color_print(main.output.stream, main.context.set.notable, "%s", fake_build_setting_name_version_file);
+ f_color_print(main.output.stream, main.context.set.warning, "' in the file '");
+ f_color_print(main.output.stream, main.context.set.notable, "%s", path_file);
+ f_color_print(main.output.stream, main.context.set.warning, "' is required, defaulting to '");
+ f_color_print(main.output.stream, main.context.set.notable, "%s", fake_build_version_micro);
+ f_color_print(main.output.stream, main.context.set.warning, "'.");
+ fprintf(main.output.stream, "%c", f_string_eol_s[0]);
+ }
+ }
+
+ if (!setting->version_target) {
+ setting->version_target = fake_build_version_type_major;
+
+ if (main.error.verbosity == f_console_verbosity_verbose) {
+ fprintf(main.output.stream, "%c", f_string_eol_s[0]);
+ f_color_print(main.output.stream, main.context.set.warning, "%sthe setting '", fll_error_print_warning);
+ f_color_print(main.output.stream, main.context.set.notable, "%s", fake_build_setting_name_version_target);
+ f_color_print(main.output.stream, main.context.set.warning, "' in the file '");
+ f_color_print(main.output.stream, main.context.set.notable, "%s", path_file);
+ f_color_print(main.output.stream, main.context.set.warning, "' is required, defaulting to '");
+ f_color_print(main.output.stream, main.context.set.notable, "%s", fake_build_version_major);
+ f_color_print(main.output.stream, main.context.set.warning, "'.");
+ fprintf(main.output.stream, "%c", f_string_eol_s[0]);
+ }
+ }
+ }
+
// Provide these defaults only if the Object is not defined (this allows for empty Content to exist if the Object is defined).
// In the case of the version prefixes, if the associated version is empty, then instead clear the associated version prefix.
if (F_status_is_error_not(*status)) {
};
bool has_prefix_object[] = {
- settings_matches[43], // version_major_prefix
- settings_matches[45], // version_minor_prefix
- settings_matches[47], // version_micro_prefix
- settings_matches[49], // version_nano_prefix
+ settings_matches[44], // version_major_prefix
+ settings_matches[46], // version_minor_prefix
+ settings_matches[48], // version_micro_prefix
+ settings_matches[50], // version_nano_prefix
};
const char *name_target[] = {
fake_build_setting_name_version_nano,
};
- for (f_array_length_t i = 0; i < 4; ++i) {
+ const char *setting_name[] = {
+ fake_build_setting_name_version_file,
+ fake_build_setting_name_version_target,
+ };
+
+ const uint8_t setting_target[] = {
+ setting->version_file,
+ setting->version_target,
+ };
+
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+
+ for (; i < 4; ++i) {
if (version[i]->used) {
if (!has_prefix_object[i]) {
else {
prefix[i]->used = 0;
- if (setting->version_target && i + 1 <= setting->version_target) {
- if (main.error.verbosity != f_console_verbosity_quiet) {
- fprintf(main.error.to.stream, "%c", f_string_eol_s[0]);
- f_color_print(main.error.to.stream, main.context.set.error, "%sWhen the version target is set to '", fll_error_print_error);
- f_color_print(main.error.to.stream, main.context.set.notable, "%s", name_target[setting->version_target - 1]);
- f_color_print(main.error.to.stream, main.context.set.error, "', then the '");
- f_color_print(main.error.to.stream, main.context.set.notable, "%s", name_object[i]);
- f_color_print(main.error.to.stream, main.context.set.error, "' Object must have Content.");
- fprintf(main.error.to.stream, "%c", f_string_eol_s[0]);
+ for (j = 0; j < 2; ++j) {
+ if (setting_target[j] && i + 1 <= setting_target[j]) {
+ if (main.error.verbosity != f_console_verbosity_quiet) {
+ fprintf(main.error.to.stream, "%c", f_string_eol_s[0]);
+ f_color_print(main.error.to.stream, main.context.set.error, "%sWhen the '", fll_error_print_error);
+ f_color_print(main.error.to.stream, main.context.set.notable, "%s", setting_name[j]);
+ f_color_print(main.error.to.stream, main.context.set.error, "' is set to '");
+ f_color_print(main.error.to.stream, main.context.set.notable, "%s", name_target[setting_target[j] - 1]);
+ f_color_print(main.error.to.stream, main.context.set.error, "', then the '");
+ f_color_print(main.error.to.stream, main.context.set.notable, "%s", name_object[i]);
+ f_color_print(main.error.to.stream, main.context.set.error, "' Object must have Content.");
+ fprintf(main.error.to.stream, "%c", f_string_eol_s[0]);
+ }
+
+ *status = F_status_set_error(F_failure);
+ break;
}
+ } // for
- *status = F_status_set_error(F_failure);
- break;
- }
+ if (F_status_is_error(*status)) break;
}
} // for
}
macro_f_string_dynamics_t_delete_simple(search_exclusive);
macro_f_string_dynamics_t_delete_simple(search_shared);
macro_f_string_dynamics_t_delete_simple(search_static);
+ macro_f_string_dynamics_t_delete_simple(version_file);
macro_f_string_dynamics_t_delete_simple(version_major);
macro_f_string_dynamics_t_delete_simple(version_major_prefix);
macro_f_string_dynamics_t_delete_simple(version_micro);