diff options
author | Jean-Sébastien Pédron <[email protected]> | 2020-04-03 11:40:21 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2020-04-12 11:36:00 +0200 |
commit | 52df18c402f8259be944f2d1b7858a854dc42210 (patch) | |
tree | 32a4152d8de02e90c278aec51c9248c6fd10797f | |
parent | 8860f1f9e732f58671c6181d223b53f8d96fb6ba (diff) | |
download | erlang.mk-52df18c402f8259be944f2d1b7858a854dc42210.tar.gz erlang.mk-52df18c402f8259be944f2d1b7858a854dc42210.tar.bz2 erlang.mk-52df18c402f8259be944f2d1b7858a854dc42210.zip |
core/test.mk: Build application before its tests
This fixes compiler warnings if modules under `tests` implement
behaviors defined in `src`. This way, we make sure behaviors are
compiled before the test modules.
-rw-r--r-- | core/test.mk | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/test.mk b/core/test.mk index bbacbbe..43c1390 100644 --- a/core/test.mk +++ b/core/test.mk @@ -41,14 +41,14 @@ test-build:: ERLC_OPTS=$(TEST_ERLC_OPTS) test-build:: $(if $(wildcard src),$(if $(wildcard ebin/test),,clean)) $(if $(IS_APP),,deps test-deps) # We already compiled everything when IS_APP=1. ifndef IS_APP -ifneq ($(wildcard $(TEST_DIR)),) - $(verbose) $(MAKE) --no-print-directory test-dir ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))" -endif ifneq ($(wildcard src),) $(verbose) $(MAKE) --no-print-directory $(PROJECT).d ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))" $(verbose) $(MAKE) --no-print-directory app-build ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))" $(gen_verbose) touch ebin/test endif +ifneq ($(wildcard $(TEST_DIR)),) + $(verbose) $(MAKE) --no-print-directory test-dir ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))" +endif endif # Roughly the same as test-build, but when IS_APP=1. @@ -56,14 +56,14 @@ endif ifdef IS_APP test-build-app:: ERLC_OPTS=$(TEST_ERLC_OPTS) test-build-app:: deps test-deps -ifneq ($(wildcard $(TEST_DIR)),) - $(verbose) $(MAKE) --no-print-directory test-dir ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))" -endif ifneq ($(wildcard src),) $(verbose) $(MAKE) --no-print-directory $(PROJECT).d ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))" $(verbose) $(MAKE) --no-print-directory app-build ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))" $(gen_verbose) touch ebin/test endif +ifneq ($(wildcard $(TEST_DIR)),) + $(verbose) $(MAKE) --no-print-directory test-dir ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))" +endif endif clean:: clean-test-dir |