#define fake_short_process "p"
#define fake_short_settings "s"
+ #define fake_short_defines_length 1
+ #define fake_short_mode_length 1
+ #define fake_short_process_length 1
+ #define fake_short_settings_length 1
+
#define fake_short_path_build "b"
#define fake_short_path_work "w"
+ #define fake_short_path_build_length 1
+ #define fake_short_path_work_length 1
+
#define fake_short_path_source_build "B"
#define fake_short_path_source_common "O"
#define fake_short_path_source_data "D"
#define fake_short_path_source_licenses "L"
#define fake_short_path_source_settings "S"
+ #define fake_short_path_source_build_length 1
+ #define fake_short_path_source_common_length 1
+ #define fake_short_path_source_data_length 1
+ #define fake_short_path_source_documents_length 1
+ #define fake_short_path_source_codes_length 1
+ #define fake_short_path_source_licenses_length 1
+ #define fake_short_path_source_settings_length 1
+
#define fake_long_defines "defines"
#define fake_long_mode "mode"
#define fake_long_process "process"
#define fake_long_settings "settings"
+ #define fake_long_defines_length 7
+ #define fake_long_mode_length 4
+ #define fake_long_process_length 7
+ #define fake_long_settings_length 8
+
#define fake_long_path_build "build"
#define fake_long_path_work "work"
+ #define fake_long_path_build_length 5
+ #define fake_long_path_work_length 4
+
#define fake_long_path_source_build "source_build"
#define fake_long_path_source_common "source_common"
#define fake_long_path_source_data "source_data"
#define fake_long_path_source_licenses "source_licenses"
#define fake_long_path_source_settings "source_settings"
+ #define fake_long_path_source_build_length 12
+ #define fake_long_path_source_common_length 13
+ #define fake_long_path_source_data_length 11
+ #define fake_long_path_source_documents_length 16
+ #define fake_long_path_source_codes_length 12
+ #define fake_long_path_source_licenses_length 15
+ #define fake_long_path_source_settings_length 15
+
// these special parameters are provided in such a way that they mimic the traditional ./configure script.
#define fake_long_documents_disabled "disable-doc"
#define fake_long_documents_enabled "enable-doc"
#define fake_long_static_disabled "disable-static"
#define fake_long_static_enabled "enable-static"
+ #define fake_long_documents_disabled_length 11
+ #define fake_long_documents_enabled_length 10
+ #define fake_long_shared_disabled_length 14
+ #define fake_long_shared_enabled_length 13
+ #define fake_long_static_disabled_length 14
+ #define fake_long_static_enabled_length 13
+
#define fake_other_operation_build "build"
#define fake_other_operation_clean "clean"
#define fake_other_operation_make "make"
if (process_script.used == 0) return f_none;
f_status status = f_none;
+
+ const f_string parameter_prefixs[] = {
+ f_console_symbol_short_enable,
+ f_console_symbol_short_enable,
+ f_console_symbol_short_enable,
+ f_console_symbol_short_enable,
+ f_console_symbol_short_enable,
+ f_console_symbol_short_enable,
+ f_console_symbol_short_enable,
+ f_console_symbol_short_enable,
+ f_console_symbol_short_enable,
+ f_console_symbol_short_enable,
+ f_console_symbol_short_enable,
+ f_console_symbol_short_enable,
+ };
+
+ const f_string_length parameter_prefixs_length[] = {
+ f_console_symbol_short_enable_length,
+ f_console_symbol_short_enable_length,
+ f_console_symbol_short_enable_length,
+ f_console_symbol_short_enable_length,
+ f_console_symbol_short_enable_length,
+ f_console_symbol_short_enable_length,
+ f_console_symbol_short_enable_length,
+ f_console_symbol_short_enable_length,
+ f_console_symbol_short_enable_length,
+ f_console_symbol_short_enable_length,
+ f_console_symbol_short_enable_length,
+ f_console_symbol_short_enable_length,
+ };
+
+ const f_string parameter_names[] = {
+ fake_short_defines,
+ fake_short_process,
+ fake_short_settings,
+ fake_short_path_build,
+ fake_short_path_work,
+ fake_short_path_source_build,
+ fake_short_path_source_common,
+ fake_short_path_source_data,
+ fake_short_path_source_documents,
+ fake_short_path_source_codes,
+ fake_short_path_source_licenses,
+ fake_short_path_source_settings,
+ };
+
+ const f_string_length parameter_names_length[] = {
+ fake_short_defines_length,
+ fake_short_process_length,
+ fake_short_settings_length,
+ fake_short_path_build_length,
+ fake_short_path_work_length,
+ fake_short_path_source_build_length,
+ fake_short_path_source_common_length,
+ fake_short_path_source_data_length,
+ fake_short_path_source_documents_length,
+ fake_short_path_source_codes_length,
+ fake_short_path_source_licenses_length,
+ fake_short_path_source_settings_length,
+ };
+
+ const f_string parameter_values[] = {
+ data.defines.string,
+ data.process.string,
+ data.settings.string,
+ data.path_build.string,
+ data.path_work.string,
+ data.path_source_build.string,
+ data.path_source_common.string,
+ data.path_source_data.string,
+ data.path_source_documents.string,
+ data.path_source_codes.string,
+ data.path_source_licenses.string,
+ data.path_source_settings.string,
+ };
+
+ const f_string_length parameter_values_length[] = {
+ data.defines.used,
+ data.process.used,
+ data.settings.used,
+ data.path_build.used,
+ data.path_work.used,
+ data.path_source_build.used,
+ data.path_source_common.used,
+ data.path_source_data.used,
+ data.path_source_documents.used,
+ data.path_source_codes.used,
+ data.path_source_licenses.used,
+ data.path_source_settings.used,
+ };
+
+ const uint8_t parameters_total = 12;
+
+ f_string_dynamics arguments = f_string_dynamics_initialize;
+
+ status = fll_execute_arguments_add(fake_other_operation_build, fake_other_operation_build_length, &arguments);
+
+ if (f_status_is_error(status)) {
+ fake_print_error(data.context, f_status_set_fine(status), "fll_execute_arguments_add", f_true);
+
+ f_macro_string_dynamics_delete_simple(arguments);
+ return status;
+ }
+
+ status = fll_execute_arguments_add_parameter_set(parameter_prefixs, parameter_prefixs_length, parameter_names, parameter_names_length, parameter_values, parameter_values_length, parameters_total, &arguments);
+
+ if (f_status_is_error(status)) {
+ fake_print_error(data.context, f_status_set_fine(status), "fll_execute_arguments_add_parameter_set", f_true);
+
+ f_macro_string_dynamics_delete_simple(arguments);
+ return status;
+ }
+
f_string_dynamic path = f_string_dynamic_initialize;
if (process_script.string[0] != '/') {
return status;
}
- // @todo: add all arguments and possibly fss settings.
- f_string_dynamics arguments = f_string_dynamics_initialize;
- f_string_dynamic argument[1] = f_string_dynamic_initialize;
int results = 0;
- argument[0].string = (f_string) fake_other_operation_build;
- argument[0].size = fake_other_operation_build_length;
- argument[0].used = fake_other_operation_build_length;
-
- arguments.array = argument;
- arguments.size = 1;
- arguments.used = 1;
-
status = fll_execute_path(path.string, arguments, &results);
if (f_status_is_error(status)) {
fl_color_print_line(f_standard_error, data.context.error, data.context.reset, ".");
}
else {
- fake_print_error(data.context, status, "fll_execute_program", f_true);
+ fake_print_error(data.context, f_status_set_fine(status), "fll_execute_path", f_true);
}
}
f_macro_string_dynamic_delete_simple(path);
+ f_macro_string_dynamics_delete_simple(arguments);
return status;
}