Makefile: build only necessary files for test target

This commit is contained in:
Émilie Feral
2019-07-19 15:28:45 +02:00
parent ae750cce28
commit 869ab35c54
8 changed files with 68 additions and 40 deletions

View File

@@ -158,7 +158,7 @@ $(BUILD_DIR)/epsilon.on-boarding.$(EXE): $(call object_for,$(all_epsilon_common_
$(BUILD_DIR)/epsilon.on-boarding.update.$(EXE): $(call object_for,$(all_epsilon_common_src) $(apps_launch_on_boarding_src) $(apps_prompt_update_src))
$(BUILD_DIR)/epsilon.on-boarding.beta.$(EXE): $(call object_for,$(all_epsilon_common_src) $(apps_launch_on_boarding_src) $(apps_prompt_beta_src))
$(BUILD_DIR)/test.$(EXE): $(BUILD_DIR)/quiz/src/tests_symbols.o $(call object_for,$(ion_src) $(liba_src) $(kandinsky_src) $(escher_src) $(libaxx_src) $(poincare_src) $(python_src) $(ion_device_dfu_relocated_src) $(tests_src) $(runner_src) $(app_calculation_src) $(app_probability_src) $(app_regression_src) $(app_sequence_src) $(app_shared_src) $(app_statistics_src) $(app_solver_src))
$(BUILD_DIR)/test.$(EXE): $(BUILD_DIR)/quiz/src/tests_symbols.o $(call object_for,$(ion_src) $(liba_src) $(kandinsky_src) $(escher_src) $(libaxx_src) $(poincare_src) $(python_src) $(ion_device_dfu_relocated_src) $(tests_src) $(runner_src) $(app_calculation_test_src) $(app_probability_test_src) $(app_regression_test_src) $(app_sequence_test_src) $(app_shared_test_src) $(app_statistics_test_src) $(app_solver_test_src))
# Load platform-specific targets
# We include them before the standard ones to give them precedence.

View File

@@ -1,10 +1,13 @@
apps += Calculation::App
app_headers += apps/calculation/app.h
app_calculation_src = $(addprefix apps/calculation/,\
app.cpp \
app_calculation_test_src += $(addprefix apps/calculation/,\
calculation.cpp \
calculation_store.cpp \
)
app_calculation_src = $(addprefix apps/calculation/,\
app.cpp \
edit_expression_controller.cpp \
expression_field.cpp \
history_view_cell.cpp \
@@ -13,6 +16,7 @@ app_calculation_src = $(addprefix apps/calculation/,\
selectable_table_view.cpp \
)
app_calculation_src += $(app_calculation_test_src)
app_src += $(app_calculation_src)
i18n_files += $(addprefix apps/calculation/,\

View File

@@ -1,6 +1,11 @@
apps += Probability::App
app_headers += apps/probability/app.h
app_probability_test_src = $(addprefix apps/probability/,\
law/erf_inv.cpp \
law/law.cpp \
)
app_probability_src = $(addprefix apps/probability/,\
app.cpp \
calculation/calculation.cpp \
@@ -14,9 +19,7 @@ app_probability_src = $(addprefix apps/probability/,\
cell.cpp \
image_cell.cpp \
law/binomial_law.cpp \
law/erf_inv.cpp \
law/exponential_law.cpp \
law/law.cpp \
law/normal_law.cpp \
law/poisson_law.cpp \
law/two_parameter_law.cpp \
@@ -27,6 +30,7 @@ app_probability_src = $(addprefix apps/probability/,\
responder_image_cell.cpp \
)
app_probability_src += $(app_probability_test_src)
app_src += $(app_probability_src)
i18n_files += $(addprefix apps/probability/,\

View File

@@ -1,27 +1,13 @@
apps += Regression::App
app_headers += apps/regression/app.h
app_regression_src = $(addprefix apps/regression/,\
app.cpp \
banner_view.cpp \
calculation_controller.cpp \
column_title_cell.cpp \
even_odd_buffer_text_cell_with_margin.cpp \
even_odd_double_buffer_text_cell_with_separator.cpp \
go_to_parameter_controller.cpp \
graph_controller.cpp \
graph_options_controller.cpp \
graph_view.cpp \
initialisation_parameter_controller.cpp \
app_regression_test_src += $(addprefix apps/regression/,\
linear_model_helper.cpp \
regression_context.cpp \
regression_controller.cpp \
store.cpp \
store_controller.cpp \
store_parameter_controller.cpp \
)
app_regression_src += $(addprefix apps/regression/model/,\
app_regression_test_src += $(addprefix apps/regression/model/,\
cubic_model.cpp \
exponential_model.cpp \
linear_model.cpp \
@@ -34,6 +20,24 @@ app_regression_src += $(addprefix apps/regression/model/,\
trigonometric_model.cpp \
)
app_regression_src = $(addprefix apps/regression/,\
app.cpp \
banner_view.cpp \
calculation_controller.cpp \
column_title_cell.cpp \
even_odd_buffer_text_cell_with_margin.cpp \
even_odd_double_buffer_text_cell_with_separator.cpp \
graph_controller.cpp \
graph_options_controller.cpp \
graph_view.cpp \
go_to_parameter_controller.cpp \
initialisation_parameter_controller.cpp \
regression_controller.cpp \
store_controller.cpp \
store_parameter_controller.cpp \
)
app_regression_src += $(app_regression_test_src)
app_src += $(app_regression_src)
i18n_files += $(addprefix apps/regression/,\

View File

@@ -1,6 +1,13 @@
apps += Sequence::App
app_headers += apps/sequence/app.h
app_sequence_test_src = $(addprefix apps/sequence/,\
cache_context.cpp \
sequence.cpp \
sequence_context.cpp \
sequence_store.cpp \
)
app_sequence_src = $(addprefix apps/sequence/,\
app.cpp \
graph/curve_parameter_controller.cpp \
@@ -15,13 +22,10 @@ app_sequence_src = $(addprefix apps/sequence/,\
list/type_parameter_controller.cpp \
values/interval_parameter_controller.cpp \
values/values_controller.cpp \
cache_context.cpp \
sequence.cpp \
sequence_context.cpp \
sequence_store.cpp \
sequence_title_cell.cpp \
)
app_sequence_src += $(app_sequence_test_src)
app_src += $(app_sequence_src)
i18n_files += $(addprefix apps/sequence/,\

View File

@@ -1,22 +1,30 @@
app_shared_test_src = $(addprefix apps/shared/,\
cartesian_function.cpp\
curve_view_range.cpp \
double_pair_store.cpp \
expression_model.cpp \
expression_model_handle.cpp \
expression_model_store.cpp \
function.cpp \
global_context.cpp \
interactive_curve_view_range_delegate.cpp \
interactive_curve_view_range.cpp \
memoized_curve_view_range.cpp \
store_context.cpp \
)
app_shared_src = $(addprefix apps/shared/,\
banner_view.cpp \
buffer_function_title_cell.cpp \
buffer_text_view_with_text_field.cpp \
button_with_separator.cpp \
cartesian_function.cpp\
cursor_view.cpp \
curve_view.cpp \
curve_view_cursor.cpp \
curve_view_range.cpp \
double_pair_store.cpp \
editable_cell_table_view_controller.cpp \
expression_field_delegate_app.cpp \
expression_model.cpp \
expression_model_handle.cpp \
expression_model_list_controller.cpp \
expression_model_store.cpp \
float_parameter_controller.cpp \
function.cpp \
function_app.cpp \
function_banner_delegate.cpp \
function_curve_parameter_controller.cpp \
@@ -27,22 +35,18 @@ app_shared_src = $(addprefix apps/shared/,\
function_list_controller.cpp \
function_store.cpp \
function_title_cell.cpp \
global_context.cpp \
go_to_parameter_controller.cpp \
hideable_even_odd_cell.cpp \
hideable_even_odd_editable_text_cell.cpp \
initialisation_parameter_controller.cpp \
input_event_handler_delegate_app.cpp \
interactive_curve_view_controller.cpp \
interactive_curve_view_range.cpp \
interactive_curve_view_range_delegate.cpp \
interval.cpp \
interval_parameter_controller.cpp \
language_controller.cpp \
layout_field_delegate.cpp \
list_parameter_controller.cpp \
margin_even_odd_message_text_cell.cpp \
memoized_curve_view_range.cpp \
message_view.cpp \
ok_view.cpp \
parameter_text_field_delegate.cpp \
@@ -55,7 +59,6 @@ app_shared_src = $(addprefix apps/shared/,\
separator_even_odd_buffer_text_cell.cpp \
simple_interactive_curve_view_controller.cpp \
store_cell.cpp \
store_context.cpp \
store_controller.cpp \
store_parameter_controller.cpp \
store_selectable_table_view.cpp \
@@ -75,4 +78,5 @@ app_shared_src = $(addprefix apps/shared/,\
zoom_parameter_controller.cpp \
)
app_shared_src += $(app_shared_test_src)
app_src += $(app_shared_src)

View File

@@ -1,17 +1,21 @@
apps += Solver::App
app_headers += apps/solver/app.h
app_solver_test_src = $(addprefix apps/solver/,\
equation.cpp \
equation_store.cpp \
)
app_solver_src = $(addprefix apps/solver/,\
app.cpp \
equation_models_parameter_controller.cpp \
equation.cpp \
equation_list_view.cpp \
equation_store.cpp \
interval_controller.cpp \
list_controller.cpp \
solutions_controller.cpp \
)
app_solver_src += $(app_solver_test_src)
app_src += $(app_solver_src)
i18n_files += $(addprefix apps/solver/,\

View File

@@ -1,6 +1,10 @@
apps += Statistics::App
app_headers += apps/statistics/app.h
app_statistics_test_src = $(addprefix apps/statistics/,\
store.cpp \
)
app_statistics_src = $(addprefix apps/statistics/,\
app.cpp \
box_axis_view.cpp \
@@ -19,10 +23,10 @@ app_statistics_src = $(addprefix apps/statistics/,\
multiple_data_view_controller.cpp \
multiple_histograms_view.cpp \
statistics_context.cpp \
store.cpp \
store_controller.cpp \
)
app_statistics_src += $(app_statistics_test_src)
app_src += $(app_statistics_src)
i18n_files += $(addprefix apps/statistics/,\