The "path_sources_object" setting designates that this can handle multiple files but the implementation fails to handle this.
Rewrite the implementation to handle multiple object files by creating each object file separately.
The specification also designates that the "build_name" is used, which makes no sense for multiple object files.
Remove this such that the object files are created based on the original source file name (without the extension).
Clarify the documentation, updating the specification.
Break out the individual settings that are related that should be updated for consistency.
These are path_sources_headers, path_sources_library, path_sources_program, and path_sources_script.
#endif // _di_fake_build_get_file_name_without_extension_
#ifndef _di_fake_build_objects_add_
- void fake_build_objects_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t *path, const f_string_statics_t *generic, const f_string_statics_t *specific) {
+ void fake_build_objects_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t *path, const f_string_statics_t * const generic, const f_string_statics_t * const specific) {
if (!data || !data->main || !data_build || !path || !generic || !specific) return;
fake_build_program_script(data, &data_build, mode, stage.file_program_script);
if (data_build.setting.build_script) {
- fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &main->cache_argument);
+ fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources_script, &main->cache_argument);
if (F_status_is_error_not(main->setting.state.status)) {
main->setting.state.status = f_string_dynamic_append_nulless(fake_path_part_script_s, &main->cache_argument);
}
else {
if (data_build.setting.build_sources_headers.used) {
- fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &main->cache_argument);
+ fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources_headers, &main->cache_argument);
if (F_status_is_error_not(main->setting.state.status)) {
fake_string_dynamic_reset(&main->cache_1);
}
if (data_build.setting.build_script) {
- fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &main->cache_argument);
+ fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources_script, &main->cache_argument);
if (F_status_is_error_not(main->setting.state.status)) {
main->setting.state.status = f_string_dynamic_append_nulless(fake_path_part_script_s, &main->cache_argument);
#endif // _di_fake_build_operate_
#ifndef _di_fake_build_path_source_string_
- void fake_build_path_source_string(fake_data_t * const data, fake_build_data_t * const data_build, f_string_static_t * const setting_path_source, f_string_dynamic_t * const source) {
+ void fake_build_path_source_string(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t * const setting_path_source, f_string_dynamic_t * const source) {
if (!data || !data->main || !data_build || !setting_path_source || !source) return;
if (F_status_is_error(data->main->setting.state.status)) return;
main->setting.state.status = f_string_dynamic_append_nulless(*setting_path_source, source);
+ // @todo add additional languages, java, etc..?
if (F_status_is_error_not(main->setting.state.status) && data_build->setting.has_path_standard) {
if (data_build->setting.build_language == fake_build_language_c_e) {
main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_c_s, source);
#endif // _di_fake_build_path_source_string_
#ifndef _di_fake_build_sources_add_
- void fake_build_sources_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_statics_t *generic, const f_string_statics_t *specific) {
+ void fake_build_sources_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t * const source_path, const f_string_statics_t * const generic, const f_string_statics_t * const specific) {
if (!data || !data->main || !data_build || !generic || !specific) return;
fake_string_dynamic_reset(&main->cache_argument);
- fake_build_path_source_string(data, data_build, &data_build->setting.path_sources, &main->cache_argument);
+ fake_build_path_source_string(data, data_build, source_path, &main->cache_argument);
if (F_status_is_error(main->setting.state.status)) return;
main->setting.state.status = f_string_dynamic_append_nulless(sources[i]->array[j], &main->cache_argument);
#endif // _di_fake_build_sources_add_
#ifndef _di_fake_build_sources_object_add_
- void fake_build_sources_object_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t *generic, const f_string_static_t *specific) {
+ void fake_build_sources_object_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t * const file) {
- if (!data || !data->main || !data_build || !generic || !specific) return;
+ if (!data || !data->main || !data_build || !file) return;
- if (!generic->used && !specific->used) {
+ if (!file->used) {
data->main->setting.state.status = F_okay;
return;
fake_build_path_source_string(data, data_build, &data_build->setting.path_sources_object, &main->cache_argument);
if (F_status_is_error(main->setting.state.status)) return;
- main->setting.state.status = f_string_dynamic_append_nulless(specific->used ? *specific : *generic, &main->cache_argument);
+ main->setting.state.status = f_string_dynamic_append_nulless(*file, &main->cache_argument);
if (F_status_is_error(main->setting.state.status)) {
fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
* @see fake_string_dynamics_reset()
*/
#ifndef _di_fake_build_path_source_string_
- extern void fake_build_path_source_string(fake_data_t * const data, fake_build_data_t * const data_build, f_string_static_t * const setting_path_source, f_string_dynamic_t * const source);
+ extern void fake_build_path_source_string(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t * const setting_path_source, f_string_dynamic_t * const source);
#endif // _di_fake_build_path_source_string_
/**
* Errors (with error bit) from: fll_execute_arguments_add()
* @param data_build
* The build data.
+ * @param source_path
+ * The source path to use, such as data_build.setting.path_sources.
* @param generic
* The generic sources to add.
* @param specific
* @see fll_execute_arguments_add()
*/
#ifndef _di_fake_build_sources_add_
- extern void fake_build_sources_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_statics_t *generic, const f_string_statics_t *specific);
+ extern void fake_build_sources_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t * const source_path, const f_string_statics_t * const generic, const f_string_statics_t * const specific);
#endif // _di_fake_build_sources_add_
/**
- * Add the sources object to the execute arguments array.
+ * Add the sources objects to the execute arguments array.
*
* @param data
* The program data.
* Errors (with error bit) from: fll_execute_arguments_add()
* @param data_build
* The build data.
- * @param generic
- * The generic sources to add.
- * @param specific
- * The specific sources to add.
+ * @param file
+ * The source object file to add.
*
* @see fll_execute_arguments_add()
*/
#ifndef _di_fake_build_sources_object_add_
- extern void fake_build_sources_object_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t *generic, const f_string_static_t *specific);
+ extern void fake_build_sources_object_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t * const file);
#endif // _di_fake_build_sources_object_add_
/**
return 0;
}
- fake_build_sources_add(data, data_build, &data_build->setting.build_sources_library, &data_build->setting.build_sources_library_shared);
+ fake_build_sources_add(data, data_build, &data_build->setting.path_sources_library, &data_build->setting.build_sources_library, &data_build->setting.build_sources_library_shared);
if (F_status_is_error(main->setting.state.status)) {
fake_print_error(&main->program.error, macro_fake_f(fake_build_sources_add));
for (j = 0; j < sources[i]->used; ++j) {
+ fake_string_dynamic_reset(&main->cache_1);
fake_string_dynamic_reset(&main->cache_2);
fake_build_get_file_name_without_extension(data, sources[i]->array[j], &main->cache_1);
f_string_dynamics_t build_name = f_string_dynamics_t_initialize;
f_string_dynamics_t build_script = f_string_dynamics_t_initialize;
f_string_dynamics_t build_shared = f_string_dynamics_t_initialize;
- f_string_dynamics_t build_sources_object = f_string_dynamics_t_initialize;
- f_string_dynamics_t build_sources_object_shared = f_string_dynamics_t_initialize;
- f_string_dynamics_t build_sources_object_static = f_string_dynamics_t_initialize;
f_string_dynamics_t build_static = f_string_dynamics_t_initialize;
f_string_dynamics_t has_path_standard = f_string_dynamics_t_initialize;
f_string_dynamics_t path_headers = f_string_dynamics_t_initialize;
f_string_dynamics_t path_program_shared = f_string_dynamics_t_initialize;
f_string_dynamics_t path_program_static = f_string_dynamics_t_initialize;
f_string_dynamics_t path_sources = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_sources_headers = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_sources_library = f_string_dynamics_t_initialize;
f_string_dynamics_t path_sources_object = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_sources_program = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_sources_script = f_string_dynamics_t_initialize;
f_string_dynamics_t preserve_path_headers = f_string_dynamics_t_initialize;
f_string_dynamics_t process_post = f_string_dynamics_t_initialize;
f_string_dynamics_t process_pre = f_string_dynamics_t_initialize;
fake_build_setting_name_path_program_shared_s,
fake_build_setting_name_path_program_static_s,
fake_build_setting_name_path_sources_s,
+ fake_build_setting_name_path_sources_headers_s,
+ fake_build_setting_name_path_sources_library_s,
fake_build_setting_name_path_sources_object_s,
+ fake_build_setting_name_path_sources_program_s,
+ fake_build_setting_name_path_sources_script_s,
fake_build_setting_name_preserve_path_headers_s,
fake_build_setting_name_process_post_s,
fake_build_setting_name_process_pre_s,
&setting->build_sources_library,
&setting->build_sources_library_shared,
&setting->build_sources_library_static,
- &build_sources_object,
- &build_sources_object_shared,
- &build_sources_object_static,
+ &setting->build_sources_object,
+ &setting->build_sources_object_shared,
+ &setting->build_sources_object_static,
&setting->build_sources_program,
&setting->build_sources_program_shared,
&setting->build_sources_program_static,
&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,
F_false, // setting->build_libraries_static
F_false, // build_name
F_false, // setting->build_objects_library
- F_false, // setting->build_objects_library_shar
- F_false, // setting->build_objects_library_stat
+ F_false, // setting->build_objects_library_shared
+ F_false, // setting->build_objects_library_static
F_false, // setting->build_objects_program
- F_false, // setting->build_objects_program_shar
- F_false, // setting->build_objects_program_stat
+ F_false, // setting->build_objects_program_shared
+ F_false, // setting->build_objects_program_static
F_false, // build_script
F_false, // build_shared
F_false, // setting->build_sources_documentation
F_false, // setting->build_sources_headers
- F_false, // setting->build_sources_headers_shar
- F_false, // setting->build_sources_headers_stat
+ F_false, // setting->build_sources_headers_shared
+ F_false, // setting->build_sources_headers_static
F_false, // setting->build_sources_library
- F_false, // setting->build_sources_library_shar
- F_false, // setting->build_sources_library_stat
- F_false, // build_sources_object
- F_false, // build_sources_object_shared
- F_false, // build_sources_object_static
+ F_false, // setting->build_sources_library_shared
+ F_false, // setting->build_sources_library_static
+ F_false, // setting->build_sources_object
+ F_false, // setting->build_sources_object_shared
+ F_false, // setting->build_sources_object_static
F_false, // setting->build_sources_program
- F_false, // setting->build_sources_program_shar
- F_false, // setting->build_sources_program_stat
+ F_false, // setting->build_sources_program_shared
+ F_false, // setting->build_sources_program_static
F_false, // setting->build_sources_script
F_false, // setting->build_sources_setting
F_false, // build_static
F_false, // path_program_shared
F_false, // path_program_static
F_false, // path_sources
+ F_false, // path_sources_headers
+ F_false, // path_sources_library
F_false, // path_sources_object
+ F_false, // path_sources_program
+ F_false, // path_sources_script
F_false, // preserve_path_headers
F_false, // process_post
F_false, // process_pre
f_string_dynamic_t settings_mode_names[fake_build_setting_total_d];
- memset(settings_mode_names, 0, sizeof(f_string_statics_t) * fake_build_setting_total_d);
+ memset(settings_mode_names, 0, sizeof(f_string_static_t) * fake_build_setting_total_d);
bool found = F_false;
fake_build_setting_name_build_name_s,
fake_build_setting_name_build_script_s,
fake_build_setting_name_build_shared_s,
- fake_build_setting_name_build_sources_object_s,
- fake_build_setting_name_build_sources_object_shared_s,
- fake_build_setting_name_build_sources_object_static_s,
fake_build_setting_name_build_static_s,
fake_build_setting_name_has_path_standard_s,
fake_build_setting_name_path_headers_s,
fake_build_setting_name_path_program_shared_s,
fake_build_setting_name_path_program_static_s,
fake_build_setting_name_path_sources_s,
+ fake_build_setting_name_path_sources_headers_s,
+ fake_build_setting_name_path_sources_library_s,
fake_build_setting_name_path_sources_object_s,
+ fake_build_setting_name_path_sources_program_s,
+ fake_build_setting_name_path_sources_script_s,
fake_build_setting_name_preserve_path_headers_s,
fake_build_setting_name_process_post_s,
fake_build_setting_name_process_pre_s,
&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_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,
0, // build_name
&setting->build_script, // build_script
&setting->build_shared, // build_shared
- 0, // build_sources_object
- 0, // build_sources_object_shared
- 0, // build_sources_object_static
&setting->build_static, // build_static
&setting->has_path_standard, // has_path_standard
0, // path_headers
0, // path_program_shared
0, // path_program_static
0, // path_sources
+ 0, // path_sources_headers
+ 0, // path_sources_library
0, // path_sources_object
+ 0, // path_sources_program
+ 0, // path_sources_script
&setting->preserve_path_headers, // preserve_path_headers
0, // process_post
0, // process_pre
&setting->build_name, // build_name
0, // build_script
0, // build_shared
- &setting->build_sources_object, // build_sources_object
- &setting->build_sources_object_shared, // build_sources_object_shared
- &setting->build_sources_object_static, // build_sources_object_static
0, // build_static
0, // has_path_standard
&setting->path_headers, // path_headers
&setting->path_program_shared, // path_program_shared
&setting->path_program_static, // path_program_static
&setting->path_sources, // path_sources
+ &setting->path_sources_headers, // path_sources_headers
+ &setting->path_sources_library, // path_sources_library
&setting->path_sources_object, // path_sources_object
+ &setting->path_sources_program, // path_sources_program
+ &setting->path_sources_script, // path_sources_script
0, // preserve_path_headers
&setting->process_post, // process_post
&setting->process_pre, // process_pre
settings_matches[7], // build_name
settings_matches[14], // build_script
settings_matches[15], // build_shared
- settings_matches[23], // build_sources_object
- settings_matches[24], // build_sources_object_shared
- settings_matches[25], // build_sources_object_static
settings_matches[31], // build_static
settings_matches[57], // has_path_standard
settings_matches[60], // path_headers
settings_matches[69], // path_program_shared
settings_matches[70], // path_program_static
settings_matches[71], // path_sources
- settings_matches[72], // path_sources_object
- settings_matches[73], // preserve_path_headers
- settings_matches[74], // process_post
- settings_matches[75], // process_pre
- settings_matches[76], // search_exclusive
- settings_matches[77], // search_shared
- settings_matches[78], // search_static
- settings_matches[79], // version_file
- settings_matches[80], // version_major
- settings_matches[81], // version_major_prefix
- settings_matches[82], // version_micro
- settings_matches[83], // version_micro_prefix
- settings_matches[84], // version_minor
- settings_matches[85], // version_minor_prefix
- settings_matches[86], // version_nano
- settings_matches[87], // version_nano_prefix
- settings_matches[88], // version_target
+ settings_matches[72], // path_sources_headers
+ settings_matches[73], // path_sources_library
+ settings_matches[74], // path_sources_object
+ settings_matches[75], // path_sources_program
+ settings_matches[76], // path_sources_script
+ settings_matches[77], // preserve_path_headers
+ settings_matches[78], // process_post
+ settings_matches[79], // process_pre
+ 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
};
const f_string_static_t settings_single_string_default[] = {
f_string_empty_s, // build_name
f_string_empty_s, // build_script
f_string_empty_s, // build_shared
- f_string_empty_s, // build_sources_object
- f_string_empty_s, // build_sources_object_shared
- f_string_empty_s, // build_sources_object_static
f_string_empty_s, // build_static
fake_build_setting_default_yes_s, // has_path_standard
f_string_empty_s, // path_headers
fake_path_part_script_s, // path_program_script
fake_path_part_shared_s, // path_program_shared
fake_path_part_static_s, // path_program_static
- main->setting.sources, // path_sources
+ main->setting.sources, // path_sources
+ f_string_empty_s, // path_sources_headers
+ f_string_empty_s, // path_sources_library
f_string_empty_s, // path_sources_object
+ f_string_empty_s, // path_sources_program
+ f_string_empty_s, // path_sources_script
f_string_empty_s, // preserve_path_headers
f_string_empty_s, // process_post
f_string_empty_s, // process_pre
0, // build_name
0, // build_script
0, // build_shared
- 0, // build_sources_object
- 0, // build_sources_object_shared
- 0, // build_sources_object_static
0, // build_static
0, // has_path_standard
0, // path_headers
0, // path_program_shared
0, // path_program_static
0, // path_sources
+ 0, // path_sources_headers
+ 0, // path_sources_library
0, // path_sources_object
+ 0, // path_sources_program
+ 0, // path_sources_script
0, // preserve_path_headers
0, // process_post
0, // process_pre
0, // build_name
0, // build_script
0, // build_shared
- 0, // build_sources_object
- 0, // build_sources_object_shared
- 0, // build_sources_object_static
0, // build_static
0, // has_path_standard
0, // path_headers
0, // path_program_shared
0, // path_program_static
0, // path_sources
+ 0, // path_sources_headers
+ 0, // path_sources_library
0, // path_sources_object
+ 0, // path_sources_program
+ 0, // path_sources_script
0, // preserve_path_headers
0, // process_post
0, // process_pre
f_string_empty_s, // build_name
fake_common_setting_bool_yes_s, // build_script
fake_common_setting_bool_yes_s, // build_shared
- f_string_empty_s, // build_sources_object
- f_string_empty_s, // build_sources_object_shared
- f_string_empty_s, // build_sources_object_static
fake_common_setting_bool_yes_s, // build_static
fake_common_setting_bool_yes_s, // has_path_standard
f_string_empty_s, // path_headers
f_string_empty_s, // path_program_shared
f_string_empty_s, // path_program_static
f_string_empty_s, // path_sources
+ f_string_empty_s, // path_sources_headers
+ f_string_empty_s, // path_sources_library
f_string_empty_s, // path_sources_object
+ f_string_empty_s, // path_sources_program
+ f_string_empty_s, // path_sources_script
fake_common_setting_bool_yes_s, // preserve_path_headers
f_string_empty_s, // process_post
f_string_empty_s, // process_pre
3, // build_name
1, // build_script
1, // build_shared
- 3, // build_sources_object
- 3, // build_sources_object_shared
- 3, // build_sources_object_static
1, // build_static
1, // has_path_standard
2, // path_headers
2, // path_program_shared
2, // path_program_static
2, // path_sources
+ 2, // path_sources_headers
+ 2, // path_sources_library
2, // path_sources_object
+ 2, // path_sources_program
+ 2, // path_sources_script
1, // preserve_path_headers
3, // process_post
3, // process_pre
5, // version_target
};
- for (f_number_unsigned_t i = 0; i < 40; ++i) {
+ for (f_number_unsigned_t i = 0; i < 41; ++i) {
// Assign the default for literal and path types.
if (!settings_single_matches[i] && settings_single_destination[i]) {
}
} // for
+ // Handle special defaults for path sources.
+ if (F_status_is_error_not(main->setting.state.status)) {
+
+ // [72] path_sources_headers.
+ if (!settings_matches[72]) {
+ setting->path_sources_headers.used = 0;
+
+ main->setting.state.status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_headers);
+ }
+
+ // [73] path_sources_library.
+ if (!settings_matches[73] && F_status_is_error_not(main->setting.state.status)) {
+ setting->path_sources_library.used = 0;
+
+ main->setting.state.status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_library);
+ }
+
+ // [74] path_sources_object.
+ if (!settings_matches[74] && F_status_is_error_not(main->setting.state.status)) {
+ setting->path_sources_object.used = 0;
+
+ main->setting.state.status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_object);
+ }
+
+ // [75] path_sources_program.
+ if (!settings_matches[75] && F_status_is_error_not(main->setting.state.status)) {
+ setting->path_sources_program.used = 0;
+
+ main->setting.state.status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_program);
+ }
+
+ // [76] path_sources_script.
+ if (!settings_matches[76] && F_status_is_error_not(main->setting.state.status)) {
+ setting->path_sources_script.used = 0;
+
+ main->setting.state.status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_script);
+ }
+
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ }
+ }
+
if (F_status_is_error_not(main->setting.state.status)) {
if (checks && !setting->version_file) {
setting->version_file = fake_build_version_micro_e;
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_name.array, &build_name.used, &build_name.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_script.array, &build_script.used, &build_script.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_shared.array, &build_shared.used, &build_shared.size, &f_string_dynamics_delete_callback);
- f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_sources_object.array, &build_sources_object.used, &build_sources_object.size, &f_string_dynamics_delete_callback);
- f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_sources_object_shared.array, &build_sources_object_shared.used, &build_sources_object_shared.size, &f_string_dynamics_delete_callback);
- f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_sources_object_static.array, &build_sources_object_static.used, &build_sources_object_static.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_static.array, &build_static.used, &build_static.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &has_path_standard.array, &has_path_standard.used, &has_path_standard.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &path_headers.array, &path_headers.used, &path_headers.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &path_program_shared.array, &path_program_shared.used, &path_program_shared.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &path_program_static.array, &path_program_static.used, &path_program_static.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &path_sources.array, &path_sources.used, &path_sources.size, &f_string_dynamics_delete_callback);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &path_sources_headers.array, &path_sources_headers.used, &path_sources_headers.size, &f_string_dynamics_delete_callback);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &path_sources_library.array, &path_sources_library.used, &path_sources_library.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &path_sources_object.array, &path_sources_object.used, &path_sources_object.size, &f_string_dynamics_delete_callback);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &path_sources_program.array, &path_sources_program.used, &path_sources_program.size, &f_string_dynamics_delete_callback);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &path_sources_script.array, &path_sources_script.used, &path_sources_script.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &preserve_path_headers.array, &preserve_path_headers.used, &preserve_path_headers.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &process_post.array, &process_post.used, &process_post.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &process_pre.array, &process_pre.used, &process_pre.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &version_nano.array, &version_nano.used, &version_nano.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &version_nano_prefix.array, &version_nano_prefix.used, &version_nano_prefix.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &version_target.array, &version_target.used, &version_target.size, &f_string_dynamics_delete_callback);
+
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = F_okay;
+ }
}
#endif // _di_fake_build_load_setting_process_
fake_main_t * const main = data->main;
+ int result = 0;
+ int result_final = 0;
+
+ f_number_unsigned_t i = 0;
+ f_number_unsigned_t j = 0;
+
+ const f_string_dynamics_t *sources[2] = {
+ &data_build->setting.build_sources_object,
+ &data_build->setting.build_sources_object_shared,
+ };
+
fake_build_print_compile_object_shared(&main->program.message);
- fake_string_dynamic_reset(&main->cache_argument);
- fake_string_dynamics_reset(&main->cache_arguments);
+ for (i = 0; i < 2; ++i) {
- fake_build_sources_object_add(data, data_build, &data_build->setting.build_sources_object, &data_build->setting.build_sources_object_shared);
+ for (j = 0; j < sources[i]->used; ++j) {
- if (F_status_is_error(main->setting.state.status)) {
- fake_print_error(&main->program.error, macro_fake_f(fake_build_sources_object_add));
+ fake_string_dynamic_reset(&main->cache_argument);
+ fake_string_dynamics_reset(&main->cache_arguments);
- return 0;
- }
+ fake_build_sources_object_add(data, data_build, &sources[i]->array[j]);
- fake_string_dynamic_reset(&main->cache_argument);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_sources_object_add));
- {
- main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects_shared, &main->cache_argument);
+ return 0;
+ }
- if (F_status_is_error_not(main->setting.state.status)) {
- main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &main->cache_argument);
- }
+ fake_string_dynamic_reset(&main->cache_argument);
+ fake_string_dynamic_reset(&main->cache_1);
+ fake_string_dynamic_reset(&main->cache_2);
- if (F_status_is_error_not(main->setting.state.status)) {
- main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &main->cache_argument);
- }
+ fake_build_get_file_name_without_extension(data, sources[i]->array[j], &main->cache_1);
- if (F_status_is_error(main->setting.state.status)) {
- fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_get_file_name_without_extension));
- return 0;
- }
+ return 0;
+ }
- const f_string_static_t values[] = {
- fake_build_parameter_object_compile_s,
- fake_build_parameter_object_output_s,
- main->cache_argument,
- };
+ main->setting.state.status = f_file_name_directory(sources[i]->array[j], &main->cache_2);
- for (uint8_t i = 0; i < 3; ++i) {
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_file_name_directory));
- if (!values[i].used) continue;
+ return 0;
+ }
- main->setting.state.status = fll_execute_arguments_add(values[i], &main->cache_arguments);
- if (F_status_is_error(main->setting.state.status)) break;
- } // for
- }
+ main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &main->cache_2);
- // The cache_argument should be safe at this point to be reset and reused by this function.
- fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_object_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_assure));
- if (F_status_is_error(main->setting.state.status)) {
- fake_print_error(&main->program.error, macro_fake_f(fake_build_arguments_standard_add));
+ return 0;
+ }
- return 0;
- }
+ main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects_shared, &main->cache_argument);
+
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(main->cache_2, &main->cache_argument);
+ }
+
+ main->setting.state.status = f_directory_exists(main->cache_argument);
+
+ if (main->setting.state.status == F_false) {
+ fake_build_print_error_exist_not_directory(&main->program.message, main->cache_argument);
+
+ main->setting.state.status = F_status_set_error(F_failure);
+
+ return 0;
+ }
+
+ if (main->setting.state.status == F_file_found_not) {
+ main->setting.state.status = f_directory_create(main->cache_argument, mode.directory);
+
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_set_fine(main->setting.state.status) == F_file_found_not) {
+ fake_build_print_error_cannot_create_due_to_parent(&main->program.message, main->cache_argument);
+ }
+ else {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_create), main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
+ }
+
+ return 0;
+ }
+
+ fake_build_print_verbose_create_directory(&main->program.message, main->cache_argument);
+ }
+
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_exists), main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
- const int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
+ return 0;
+ }
+
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(main->cache_1, &main->cache_argument);
+ }
+
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &main->cache_argument);
+ }
+
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+
+ return 0;
+ }
+
+ {
+ const f_string_static_t values[] = {
+ fake_build_parameter_object_compile_s,
+ fake_build_parameter_object_output_s,
+ main->cache_argument,
+ };
+
+ for (uint8_t i = 0; i < 3; ++i) {
+
+ if (!values[i].used) continue;
+
+ main->setting.state.status = fll_execute_arguments_add(values[i], &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) break;
+ } // for
+ }
+
+ // The cache_argument should be safe at this point to be reset and reused by this function.
+ fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_object_e);
+
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_arguments_standard_add));
+
+ return 0;
+ }
+
+ result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
+
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_execute));
+
+ return result;
+ }
+
+ if (result && !result_final) {
+ result_final = result;
+ }
+ } // for
+ } // for
if (F_status_is_error_not(main->setting.state.status) && main->setting.state.status != F_child) {
fake_build_touch(data, file_stage);
fake_main_t * const main = data->main;
+ int result = 0;
+ int result_final = 0;
+
+ f_number_unsigned_t i = 0;
+ f_number_unsigned_t j = 0;
+
+ const f_string_dynamics_t *sources[2] = {
+ &data_build->setting.build_sources_object,
+ &data_build->setting.build_sources_object_static,
+ };
+
fake_build_print_compile_object_static(&main->program.message);
- fake_string_dynamic_reset(&main->cache_argument);
- fake_string_dynamics_reset(&main->cache_arguments);
+ for (i = 0; i < 2; ++i) {
- fake_build_sources_object_add(data, data_build, &data_build->setting.build_sources_object, &data_build->setting.build_sources_object_static);
+ for (j = 0; j < sources[i]->used; ++j) {
- if (F_status_is_error(main->setting.state.status)) {
- fake_print_error(&main->program.error, macro_fake_f(fake_build_sources_object_add));
+ fake_string_dynamic_reset(&main->cache_argument);
+ fake_string_dynamics_reset(&main->cache_arguments);
- return 0;
- }
+ fake_build_sources_object_add(data, data_build, &sources[i]->array[j]);
- fake_string_dynamic_reset(&main->cache_argument);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_sources_object_add));
- {
- main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects_static, &main->cache_argument);
+ return 0;
+ }
- if (F_status_is_error_not(main->setting.state.status)) {
- main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &main->cache_argument);
- }
+ fake_string_dynamic_reset(&main->cache_argument);
+ fake_string_dynamic_reset(&main->cache_1);
+ fake_string_dynamic_reset(&main->cache_2);
- if (F_status_is_error_not(main->setting.state.status)) {
- main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &main->cache_argument);
- }
+ fake_build_get_file_name_without_extension(data, sources[i]->array[j], &main->cache_1);
- if (F_status_is_error(main->setting.state.status)) {
- fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_get_file_name_without_extension));
- return 0;
- }
+ return 0;
+ }
- const f_string_static_t values[] = {
- fake_build_parameter_object_compile_s,
- fake_build_parameter_object_output_s,
- main->cache_argument,
- };
+ main->setting.state.status = f_file_name_directory(sources[i]->array[j], &main->cache_2);
- for (uint8_t i = 0; i < 3; ++i) {
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_file_name_directory));
- if (!values[i].used) continue;
+ return 0;
+ }
- main->setting.state.status = fll_execute_arguments_add(values[i], &main->cache_arguments);
- if (F_status_is_error(main->setting.state.status)) break;
- } // for
- }
+ main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &main->cache_2);
- // The cache_argument should be safe at this point to be reset and reused by this function.
- fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_object_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_assure));
- if (F_status_is_error(main->setting.state.status)) {
- fake_print_error(&main->program.error, macro_fake_f(fake_build_arguments_standard_add));
+ return 0;
+ }
- return 0;
- }
+ main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects_static, &main->cache_argument);
+
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(main->cache_2, &main->cache_argument);
+ }
+
+ main->setting.state.status = f_directory_exists(main->cache_argument);
+
+ if (main->setting.state.status == F_false) {
+ fake_build_print_error_exist_not_directory(&main->program.message, main->cache_argument);
+
+ main->setting.state.status = F_status_set_error(F_failure);
+
+ return 0;
+ }
+
+ if (main->setting.state.status == F_file_found_not) {
+ main->setting.state.status = f_directory_create(main->cache_argument, mode.directory);
+
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_set_fine(main->setting.state.status) == F_file_found_not) {
+ fake_build_print_error_cannot_create_due_to_parent(&main->program.message, main->cache_argument);
+ }
+ else {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_create), main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
+ }
+
+ return 0;
+ }
+
+ fake_build_print_verbose_create_directory(&main->program.message, main->cache_argument);
+ }
+
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_exists), main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
+
+ return 0;
+ }
- const int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(main->cache_1, &main->cache_argument);
+ }
+
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &main->cache_argument);
+ }
+
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+
+ return 0;
+ }
+
+ {
+ const f_string_static_t values[] = {
+ fake_build_parameter_object_compile_s,
+ fake_build_parameter_object_output_s,
+ main->cache_argument,
+ };
+
+ for (uint8_t i = 0; i < 3; ++i) {
+
+ if (!values[i].used) continue;
+
+ main->setting.state.status = fll_execute_arguments_add(values[i], &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) break;
+ } // for
+ }
+
+ // The cache_argument should be safe at this point to be reset and reused by this function.
+ fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_object_e);
+
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_arguments_standard_add));
+
+ return 0;
+ }
+
+ result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
+
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_execute));
+
+ return result;
+ }
+
+ if (result && !result_final) {
+ result_final = result;
+ }
+ } // for
+ } // for
if (F_status_is_error_not(main->setting.state.status) && main->setting.state.status != F_child) {
fake_build_touch(data, file_stage);
}
- return result;
+ return result_final;
}
#endif // _di_fake_build_object_static_
fake_string_dynamic_reset(&main->cache_2);
fake_string_dynamic_reset(&main->cache_argument);
- fake_build_path_source_string(data, data_build, &data_build->setting.path_sources, &main->cache_1);
+ fake_build_path_source_string(data, data_build, &data_build->setting.path_sources_library, &main->cache_1);
if (F_status_is_error(main->setting.state.status)) break;
main->setting.state.status = f_string_dynamic_append_nulless(sources[i]->array[j], &main->cache_1);
#endif
/**
- * Build static options that are needed when building a static library.
+ * Build static objects that are needed when building a static library.
*
* This is neither the "build_sources_object" nor the "build_sources_object_static" property.
* Instead, this converts the "build_sources_library" and the "build_sources_library_static" into a static object file so that the indexer program (such as GNU ar) can combine these into a static file.
return 0;
}
- fake_build_sources_add(data, data_build, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_shared);
+ fake_build_sources_add(data, data_build, &data_build->setting.path_sources_program, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_shared);
if (F_status_is_error(main->setting.state.status)) {
fake_print_error(&main->program.error, macro_fake_f(fake_build_sources_add));
return 0;
}
- fake_build_sources_add(data, data_build, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_static);
+ fake_build_sources_add(data, data_build, &data_build->setting.path_sources_program, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_static);
if (F_status_is_error(main->setting.state.status)) {
fake_print_error(&main->program.error, macro_fake_f(fake_build_sources_add));
const f_string_static_t fake_build_setting_name_path_program_shared_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_path_program_shared_s, 0, FAKE_build_setting_name_path_program_shared_s_length);
const f_string_static_t fake_build_setting_name_path_program_static_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_path_program_static_s, 0, FAKE_build_setting_name_path_program_static_s_length);
const f_string_static_t fake_build_setting_name_path_sources_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_path_sources_s, 0, FAKE_build_setting_name_path_sources_s_length);
+ const f_string_static_t fake_build_setting_name_path_sources_headers_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_path_sources_headers_s, 0, FAKE_build_setting_name_path_sources_headers_s_length);
+ const f_string_static_t fake_build_setting_name_path_sources_library_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_path_sources_library_s, 0, FAKE_build_setting_name_path_sources_library_s_length);
const f_string_static_t fake_build_setting_name_path_sources_object_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_path_sources_object_s, 0, FAKE_build_setting_name_path_sources_object_s_length);
+ const f_string_static_t fake_build_setting_name_path_sources_program_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_path_sources_program_s, 0, FAKE_build_setting_name_path_sources_program_s_length);
+ const f_string_static_t fake_build_setting_name_path_sources_script_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_path_sources_script_s, 0, FAKE_build_setting_name_path_sources_script_s_length);
const f_string_static_t fake_build_setting_name_preserve_path_headers_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_preserve_path_headers_s, 0, FAKE_build_setting_name_preserve_path_headers_s_length);
const f_string_static_t fake_build_setting_name_process_post_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_process_post_s, 0, FAKE_build_setting_name_process_post_s_length);
const f_string_static_t fake_build_setting_name_process_pre_s = macro_f_string_static_t_initialize_1(FAKE_build_setting_name_process_pre_s, 0, FAKE_build_setting_name_process_pre_s_length);
#define FAKE_build_setting_name_path_program_shared_s "path_program_shared"
#define FAKE_build_setting_name_path_program_static_s "path_program_static"
#define FAKE_build_setting_name_path_sources_s "path_sources"
+ #define FAKE_build_setting_name_path_sources_headers_s "path_sources_headers"
+ #define FAKE_build_setting_name_path_sources_library_s "path_sources_library"
#define FAKE_build_setting_name_path_sources_object_s "path_sources_object"
+ #define FAKE_build_setting_name_path_sources_program_s "path_sources_program"
+ #define FAKE_build_setting_name_path_sources_script_s "path_sources_script"
#define FAKE_build_setting_name_preserve_path_headers_s "preserve_path_headers"
#define FAKE_build_setting_name_process_post_s "process_post"
#define FAKE_build_setting_name_process_pre_s "process_pre"
#define FAKE_build_setting_name_path_program_shared_s_length 19
#define FAKE_build_setting_name_path_program_static_s_length 19
#define FAKE_build_setting_name_path_sources_s_length 12
+ #define FAKE_build_setting_name_path_sources_headers_s_length 20
+ #define FAKE_build_setting_name_path_sources_library_s_length 20
#define FAKE_build_setting_name_path_sources_object_s_length 19
+ #define FAKE_build_setting_name_path_sources_program_s_length 20
+ #define FAKE_build_setting_name_path_sources_script_s_length 19
#define FAKE_build_setting_name_preserve_path_headers_s_length 21
#define FAKE_build_setting_name_process_post_s_length 12
#define FAKE_build_setting_name_process_pre_s_length 11
extern const f_string_static_t fake_build_setting_name_path_program_shared_s;
extern const f_string_static_t fake_build_setting_name_path_program_static_s;
extern const f_string_static_t fake_build_setting_name_path_sources_s;
+ extern const f_string_static_t fake_build_setting_name_path_sources_headers_s;
+ extern const f_string_static_t fake_build_setting_name_path_sources_library_s;
extern const f_string_static_t fake_build_setting_name_path_sources_object_s;
+ extern const f_string_static_t fake_build_setting_name_path_sources_program_s;
+ extern const f_string_static_t fake_build_setting_name_path_sources_script_s;
extern const f_string_static_t fake_build_setting_name_preserve_path_headers_s;
extern const f_string_static_t fake_build_setting_name_process_post_s;
extern const f_string_static_t fake_build_setting_name_process_pre_s;
f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->build_compiler.string, &build_setting->build_compiler.used, &build_setting->build_compiler.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->build_indexer.string, &build_setting->build_indexer.used, &build_setting->build_indexer.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->build_name.string, &build_setting->build_name.used, &build_setting->build_name.size);
- f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->build_sources_object.string, &build_setting->build_sources_object.used, &build_setting->build_sources_object.size);
- f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->build_sources_object_shared.string, &build_setting->build_sources_object_shared.used, &build_setting->build_sources_object_shared.size);
- f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->build_sources_object_static.string, &build_setting->build_sources_object_static.used, &build_setting->build_sources_object_static.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_headers.string, &build_setting->path_headers.used, &build_setting->path_headers.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_language.string, &build_setting->path_language.used, &build_setting->path_language.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_library_script.string, &build_setting->path_library_script.used, &build_setting->path_library_script.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_program_shared.string, &build_setting->path_program_shared.used, &build_setting->path_program_shared.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_program_static.string, &build_setting->path_program_static.used, &build_setting->path_program_static.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_sources.string, &build_setting->path_sources.used, &build_setting->path_sources.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_sources_headers.string, &build_setting->path_sources_headers.used, &build_setting->path_sources_headers.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_sources_library.string, &build_setting->path_sources_library.used, &build_setting->path_sources_library.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_sources_object.string, &build_setting->path_sources_object.used, &build_setting->path_sources_object.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_sources_program.string, &build_setting->path_sources_program.used, &build_setting->path_sources_program.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_sources_script.string, &build_setting->path_sources_script.used, &build_setting->path_sources_script.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->process_post.string, &build_setting->process_post.used, &build_setting->process_post.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->process_pre.string, &build_setting->process_pre.used, &build_setting->process_pre.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->version_major.string, &build_setting->version_major.used, &build_setting->version_major.size);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_sources_library.array, &build_setting->build_sources_library.used, &build_setting->build_sources_library.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_sources_library_shared.array, &build_setting->build_sources_library_shared.used, &build_setting->build_sources_library_shared.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_sources_library_static.array, &build_setting->build_sources_library_static.used, &build_setting->build_sources_library_static.size, &f_string_dynamics_delete_callback);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_sources_object.array, &build_setting->build_sources_object.used, &build_setting->build_sources_object.size, &f_string_dynamics_delete_callback);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_sources_object_shared.array, &build_setting->build_sources_object_shared.used, &build_setting->build_sources_object_shared.size, &f_string_dynamics_delete_callback);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_sources_object_static.array, &build_setting->build_sources_object_static.used, &build_setting->build_sources_object_static.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_sources_program.array, &build_setting->build_sources_program.used, &build_setting->build_sources_program.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_sources_program_shared.array, &build_setting->build_sources_program_shared.used, &build_setting->build_sources_program_shared.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &build_setting->build_sources_program_static.array, &build_setting->build_sources_program_static.used, &build_setting->build_sources_program_static.size, &f_string_dynamics_delete_callback);
*
* - path_documents: The documents path.
* - path_licenses: The licenses path.
- * - path_sources: The sources path.
*
* - path_work_includes: The includes work path.
* - path_work_libraries: The libraries work path.
* Build settings data.
*
* Properties:
- * - flag: Flags from data_build_setting_* (Not strictly part of the build settings file).
+ * - flag: Flags from data_build_setting_* (Not strictly part of the build settings file and is not included in fake_build_setting_total_d).
*
* - build_language: The build_language setting.
*
* - build_compiler: The build_compiler setting.
* - build_indexer: The build_indexer setting.
* - build_name: The build_name setting.
- * - build_sources_object: The build_sources_object setting.
- * - build_sources_object_shared: The build_sources_object_shared setting.
- * - build_sources_object_static: The build_sources_object_static setting.
* - path_headers: The path_headers setting.
* - path_language: The path_language setting.
* - path_library_script: The path_library_script setting.
* - path_program_shared: The path_program_shared setting.
* - path_program_static: The path_program_static setting.
* - path_sources: The path_sources setting.
+ * - path_sources_headers: The path_sources_headers setting.
+ * - path_sources_library: The path_sources_library setting.
* - path_sources_object: The path_sources_object setting.
+ * - path_sources_program: The path_sources_program setting.
+ * - path_sources_script: The path_sources_script setting.
* - process_post: The process_post setting.
* - process_pre: The process_pre setting.
* - version_major: The version_major setting.
* - build_sources_library: The build_sources_library setting.
* - build_sources_library_shared: The build_sources_library_shared setting.
* - build_sources_library_static: The build_sources_library_static setting.
+ * - build_sources_object: The build_sources_library setting.
+ * - build_sources_object_shared: The build_sources_library_shared setting.
+ * - build_sources_object_static: The build_sources_library_static setting.
* - build_sources_program: The build_sources_program setting.
* - build_sources_program_shared: The build_sources_program_shared setting.
* - build_sources_program_static: The build_sources_program_static setting.
f_string_dynamic_t build_compiler;
f_string_dynamic_t build_indexer;
f_string_dynamic_t build_name;
- f_string_dynamic_t build_sources_object;
- f_string_dynamic_t build_sources_object_shared;
- f_string_dynamic_t build_sources_object_static;
f_string_dynamic_t path_headers;
f_string_dynamic_t path_language;
f_string_dynamic_t path_library_script;
f_string_dynamic_t path_program_shared;
f_string_dynamic_t path_program_static;
f_string_dynamic_t path_sources;
+ f_string_dynamic_t path_sources_headers;
+ f_string_dynamic_t path_sources_library;
f_string_dynamic_t path_sources_object;
+ f_string_dynamic_t path_sources_program;
+ f_string_dynamic_t path_sources_script;
f_string_dynamic_t process_post;
f_string_dynamic_t process_pre;
f_string_dynamic_t version_major;
f_string_dynamics_t build_sources_library;
f_string_dynamics_t build_sources_library_shared;
f_string_dynamics_t build_sources_library_static;
+ f_string_dynamics_t build_sources_object;
+ f_string_dynamics_t build_sources_object_shared;
+ f_string_dynamics_t build_sources_object_static;
f_string_dynamics_t build_sources_program;
f_string_dynamics_t build_sources_program_shared;
f_string_dynamics_t build_sources_program_static;
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, \
f_string_dynamics_t_initialize, \
f_string_dynamics_t_initialize, \
f_string_dynamics_t_initialize, \
f_string_dynamics_t_initialize, \
}
- #define fake_build_setting_total_d 89
+ #define fake_build_setting_total_d 93
#endif // _di_fake_build_setting_t_
/**
fake_build_setting_name_path_library_script_s,
fake_build_setting_name_path_library_shared_s,
fake_build_setting_name_path_library_static_s,
+ fake_build_setting_name_path_object_script_s,
+ fake_build_setting_name_path_object_shared_s,
+ fake_build_setting_name_path_object_static_s,
fake_build_setting_name_path_program_script_s,
fake_build_setting_name_path_program_shared_s,
fake_build_setting_name_path_program_static_s,
data_make->setting_build.path_library_script,
data_make->setting_build.path_library_shared,
data_make->setting_build.path_library_static,
+ data_make->setting_build.path_object_script,
+ data_make->setting_build.path_object_shared,
+ data_make->setting_build.path_object_static,
data_make->setting_build.path_program_script,
data_make->setting_build.path_program_shared,
data_make->setting_build.path_program_static,
data_make->setting_build.version_minor,
};
- for (i = 0; i < 17; ++i) {
+ for (i = 0; i < 20; ++i) {
main->setting.state.status = f_compare_dynamic_partial_string(dynamic_name[i].string, main->buffer, dynamic_name[i].used, range_name);
fake_build_setting_name_build_sources_library_s,
fake_build_setting_name_build_sources_library_shared_s,
fake_build_setting_name_build_sources_library_static_s,
+ fake_build_setting_name_build_sources_object_s,
+ fake_build_setting_name_build_sources_object_shared_s,
+ fake_build_setting_name_build_sources_object_static_s,
fake_build_setting_name_build_sources_program_s,
fake_build_setting_name_build_sources_program_shared_s,
fake_build_setting_name_build_sources_program_static_s,
fake_build_setting_name_defines_library_s,
fake_build_setting_name_defines_library_shared_s,
fake_build_setting_name_defines_library_static_s,
+ fake_build_setting_name_defines_object_s,
+ fake_build_setting_name_defines_object_shared_s,
+ fake_build_setting_name_defines_object_static_s,
fake_build_setting_name_defines_program_s,
fake_build_setting_name_defines_program_shared_s,
fake_build_setting_name_defines_program_static_s,
fake_build_setting_name_flags_library_s,
fake_build_setting_name_flags_library_shared_s,
fake_build_setting_name_flags_library_static_s,
+ fake_build_setting_name_flags_object_s,
+ fake_build_setting_name_flags_object_shared_s,
+ fake_build_setting_name_flags_object_static_s,
fake_build_setting_name_flags_program_s,
fake_build_setting_name_flags_program_shared_s,
fake_build_setting_name_flags_program_static_s,
data_make->setting_build.build_sources_library,
data_make->setting_build.build_sources_library_shared,
data_make->setting_build.build_sources_library_static,
+ data_make->setting_build.build_sources_object,
+ data_make->setting_build.build_sources_object_shared,
+ data_make->setting_build.build_sources_object_static,
data_make->setting_build.build_sources_program,
data_make->setting_build.build_sources_program_shared,
data_make->setting_build.build_sources_program_static,
data_make->setting_build.defines_library,
data_make->setting_build.defines_library_shared,
data_make->setting_build.defines_library_static,
+ data_make->setting_build.defines_object,
+ data_make->setting_build.defines_object_shared,
+ data_make->setting_build.defines_object_static,
data_make->setting_build.defines_program,
data_make->setting_build.defines_program_shared,
data_make->setting_build.defines_program_static,
data_make->setting_build.flags_library,
data_make->setting_build.flags_library_shared,
data_make->setting_build.flags_library_static,
+ data_make->setting_build.flags_object,
+ data_make->setting_build.flags_object_shared,
+ data_make->setting_build.flags_object_static,
data_make->setting_build.flags_program,
data_make->setting_build.flags_program_shared,
data_make->setting_build.flags_program_static,
0, // build_sources_library
0, // build_sources_library_shared
0, // build_sources_library_static
+ 0, // build_sources_object
+ 0, // build_sources_object_shared
+ 0, // build_sources_object_static
0, // build_sources_program
0, // build_sources_program_shared
0, // build_sources_program_static
0, // defines_library
0, // defines_library_shared
0, // defines_library_static
+ 0, // defines_object
+ 0, // defines_object_shared
+ 0, // defines_object_static
0, // defines_program
0, // defines_program_shared
0, // defines_program_static
0, // flags_library
0, // flags_library_shared
0, // flags_library_static
+ 0, // flags_object
+ 0, // flags_object_shared
+ 0, // flags_object_static
0, // flags_program
0, // flags_program_shared
0, // flags_program_static
f_number_unsigned_t j = 0;
- for (i = 0; i < 36; ++i) {
+ for (i = 0; i < 45; ++i) {
main->setting.state.status = f_compare_dynamic_partial_string(dynamics_name[i].string, main->buffer, dynamics_name[i].used, range_name);
-.TH fake-settings "5" "March 2023" "FLL - Featureless Make 0.7.0" "File Formats"
+.TH fake-settings "5" "March 202" "FLL - Featureless Make 0.7.0" "File Formats"
.SH NAME
Featureless Make \- "settings" file.
.SH SYNOPSIS
A single source file used for generating an object file.
The source file is located within the path designated by \fBpath_sources_object\fR.
The built object does not get linked and therefore no linker arguments apply.
- The built object file is named using the \fBbuild_name\fR with the \fB.o\fR extension.
+ The built object file is named using the \fBbuild_name\fR with the \fB.o\fR extension added.
May include a relative sub\-path to each individual source file (such as: \fBlevel_0/a.c\fR).
\- \fBbuild_sources_object_shared\fR:
A single source file used for generating an object file.
The source file is located within the path designated by \fBpath_sources_object\fR.
The built object does not get linked and therefore no linker arguments apply.
- The built object file is named using the \fBbuild_name\fR with the \fB.o\fR extension.
+ The built object file is named using the \fBbuild_name\fR with the \fB.o\fR extension added.
May include a relative sub\-path to each individual source file (such as: \fBlevel_0/a.c\fR).
These are applied to only shared builds.
A single source file used for generating an object file.
The source file is located within the path designated by \fBpath_sources_object\fR.
The built object does not get linked and therefore no linker arguments apply.
- The built object file is named using the \fBbuild_name\fR with the \fB.o\fR extension.
+ The built object file is named using the \fBbuild_name\fR with the \fB.o\fR extension added.
May include a relative sub\-path to each individual source file (such as: \fBlevel_0/a.c\fR).
These are applied to only static builds.
+\- \fBbuild_sources_objects\fR\:
+ A collection of source files used for generating an object file with the same name as each source file.
+ The source files are located within the path designated by \fBpath_sources_objects\fR.
+ The built objects do not get linked and therefore no linker arguments apply.
+ The built object files are named using the same name as the file with the file extension changed to the \fB.o\fR extension.
+ May include a relative sub-path to each individual source file (such as: \fBlevel_0/a.c level_0/b.c\fR).
+ This is different from \fBbuild_sources_object\fR in that multiple files are supported and multiple object files are created.
+
+\- \fBbuild_sources_objects_shared\fR\:
+ A collection of source files used for generating an object file with the same name as each source file.
+ The source files are located within the path designated by \fBpath_sources_objects\f.
+ The built objects do not get linked and therefore no linker arguments apply.
+ The built object files are named using the same name as the file with the file extension changed to the \fB.o\fR extension.
+ May include a relative sub-path to each individual source file (such as: \fBlevel_0/a.c level_0/b.c\fR).
+ This is different from \fBbuild_sources_object\fR in that multiple files are supported and multiple object files are created.
+ These are applied to only shared builds.
+
+\- \fBbuild_sources_objects_static\fR\:
+ A collection of source files used for generating an object file with the same name as each source file.
+ The source files are located within the path designated by \fBpath_sources_objects\fR.
+ The built objects do not get linked and therefore no linker arguments apply.
+ The built object files are named using the same name as the file with the file extension changed to the \fB.o\fR extension.
+ May include a relative sub-path to each individual source file (such as: \fBlevel_0/a.c level_0/b.c\fR).
+ This is different from \fBbuild_sources_object\fR in that multiple files are supported and multiple object files are created.
+ These are applied to only static builds.
+
\- \fBbuild_sources_program\fR:
A collection of program related source files.
May include a relative sub\-path to each individual source file (such as: \fBlevel_0/a.c level_0/b.c level_1/c.c\fR).
This defaults to \fBsources\fR.
+\- \fBpath_sources_headers\fR:
+ A sub\-path representing where the header source files are found.
+ This is used by \fBbuild_sources_headers\fR.
+
+ This defaults to \fBsources\fR.
+
\- \fBpath_sources_object\fR:
A sub\-path representing where the object source files are found.
This is used by \fBbuild_sources_object\fR.
This defaults to \fBsources\fR.
+\- \fBpath_sources_program\fR:
+ A sub\-path representing where the program source files are found.
+ This is used by \fBbuild_sources_program\fR.
+
+ This defaults to \fBsources\fR.
+
+\- \fBpath_sources_script\fR:
+ A sub\-path representing where the script source files are found.
+ This is used by \fBbuild_sources_script\fR.
+
+ This defaults to \fBscript\fR.
+
\- \fBpreserve_path_headers\fR:
When this is \fByes\fR, then the relative directory structure in the source (as defined in \fBbuild_sources_headers\fR) is preserved.
If the \fBbuild_sources_headers\fR has the header files \fBxxx/a.h yyy/zzz/b.h\fR and this is \fByes\fR, then the directories \fBxxx/\fR and \fByyy/zzz/\fR are created and the files are stored within them.
\- \fBpath_program_shared\fR: Must be a single valid path.
\- \fBpath_program_static\fR: Must be a single valid path.
\- \fBpath_sources\fR: Must only be a valid directory path or not specified.
+ \- \fBpath_sources_headers\fR: Must only be a valid directory path or not specified.
+ \- \fBpath_sources_library\fR: Must only be a valid directory path or not specified.
\- \fBpath_sources_object\fR: Must only be a valid directory path or not specified.
+ \- \fBpath_sources_program\fR: Must only be a valid directory path or not specified.
+ \- \fBpath_sources_script\fR: Must only be a valid directory path or not specified.
\- \fBpreserve_path_headers\fR: Must only be one of \fByes\fR or \fBno\fR.
\- \fBprocess_post\fR: Only one Content, which must only be a valid filename.
\- \fBprocess_pre\fR: Only one Content, which must only be a valid filename.
These are applied to only static builds.
- code:"build_sources_object"\:
- A single source file used for generating an object file.
- The source file is located within the path designated by code:"path_sources_object".
- The built object does not get linked and therefore no linker arguments apply.
- The built object file is named using the code:"build_name" with the code:".o" extension.
- May include a relative sub-path to each individual source file (such as: code:"level_0/a.c").
+ A collection of source files used for generating an object file with the same name as each source file.
+ The source files are located within the path designated by code:"path_sources_object".
+ The built objects do not get linked and therefore no linker arguments apply.
+ The built object files are named using the same name as the file with the file extension changed to the code:".o" extension.
+ May include a relative sub-path to each individual source file (such as: code:"level_0/a.c level_0/b.c").
+ This is different from code:"build_sources_object" in that multiple files are supported and multiple object files are created.
- code:"build_sources_object_shared"\:
- A single source file used for generating an object file.
- The source file is located within the path designated by code:"path_sources_object".
- The built object does not get linked and therefore no linker arguments apply.
- The built object file is named using the code:"build_name" with the code:".o" extension.
- May include a relative sub-path to each individual source file (such as: code:"level_0/a.c").
+ A collection of source files used for generating an object file with the same name as each source file.
+ The source files are located within the path designated by code:"path_sources_object".
+ The built objects do not get linked and therefore no linker arguments apply.
+ The built object files are named using the same name as the file with the file extension changed to the code:".o" extension.
+ May include a relative sub-path to each individual source file (such as: code:"level_0/a.c level_0/b.c").
+ This is different from code:"build_sources_object" in that multiple files are supported and multiple object files are created.
These are applied to only shared builds.
- code:"build_sources_object_static"\:
- A single source file used for generating an object file.
- The source file is located within the path designated by code:"path_sources_object".
- The built object does not get linked and therefore no linker arguments apply.
- The built object file is named using the code:"build_name" with the code:".o" extension.
- May include a relative sub-path to each individual source file (such as: code:"level_0/a.c").
+ A collection of source files used for generating an object file with the same name as each source file.
+ The source files are located within the path designated by code:"path_sources_object".
+ The built objects do not get linked and therefore no linker arguments apply.
+ The built object files are named using the same name as the file with the file extension changed to the code:".o" extension.
+ May include a relative sub-path to each individual source file (such as: code:"level_0/a.c level_0/b.c").
+ This is different from code:"build_sources_object" in that multiple files are supported and multiple object files are created.
These are applied to only static builds.
- code:"build_sources_program"\:
This defaults to code:"sources".
+ - code:"path_sources_headers"\:
+ A sub-path representing where the header source files are found.
+ This is used by code:"build_sources_headers".
+
+ This defaults to code:"sources".
+
+ - code:"path_sources_library"\:
+ A sub-path representing where the library source files are found.
+ This is used by code:"build_sources_library".
+
+ This defaults to code:"sources".
+
- code:"path_sources_object"\:
A sub-path representing where the object source files are found.
This is used by code:"build_sources_object".
This defaults to code:"sources".
+ - code:"path_sources_program"\:
+ A sub-path representing where the program source files are found.
+ This is used by code:"build_sources_program".
+
+ This defaults to code:"sources".
+
+ - code:"path_sources_script"\:
+ A sub-path representing where the script source files are found.
+ This is used by code:"build_sources_script".
+
+ This defaults to code:"sources".
+
- code:"preserve_path_headers"\:
When this is code:"yes", then the relative directory structure in the source (as defined in code:"build_sources_headers") is preserved.
If the code:"build_sources_headers" has the header files code:"xxx/a.h yyy/zzz/b.h" and this is code:"yes", then the directories code:"xxx/" and code:"yyy/zzz/" are created and the files are stored within them.
- code:"path_program_shared": Must be a single valid path.
- code:"path_program_static": Must be a single valid path.
- code:"path_sources": Must only be a valid directory path or not specified.
+ - code:"path_sources_headers": Must only be a valid directory path or not specified.
+ - code:"path_sources_library": Must only be a valid directory path or not specified.
- code:"path_sources_object": Must only be a valid directory path or not specified.
+ - code:"path_sources_program": Must only be a valid directory path or not specified.
+ - code:"path_sources_script": Must only be a valid directory path or not specified.
- code:"preserve_path_headers": Must only be one of code:"yes" or code:"no".
- code:"process_post": Only one bold:"Content", which must only be a valid filename.
- code:"process_pre": Only one bold:"Content", which must only be a valid filename.