aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-12-05 20:29:47 +0100
committerLoïc Hoguin <[email protected]>2018-12-05 20:29:47 +0100
commit59d7c7dd647c045fd616c58e5816b706534bca2d (patch)
tree3dd300ee80a69cac124d9db998c0de95411c4841
parent9d5b14f3398ae7f113ef90ab261469f7af1038be (diff)
downloaderlang.mk-59d7c7dd647c045fd616c58e5816b706534bca2d.tar.gz
erlang.mk-59d7c7dd647c045fd616c58e5816b706534bca2d.tar.bz2
erlang.mk-59d7c7dd647c045fd616c58e5816b706534bca2d.zip
Implement the dep_built optimization for test/shell deps
-rw-r--r--core/test.mk9
-rw-r--r--plugins/shell.mk9
2 files changed, 16 insertions, 2 deletions
diff --git a/core/test.mk b/core/test.mk
index a9481fd..3cc9d0a 100644
--- a/core/test.mk
+++ b/core/test.mk
@@ -20,7 +20,14 @@ ifneq ($(SKIP_DEPS),)
test-deps:
else
test-deps: $(ALL_TEST_DEPS_DIRS)
- $(verbose) set -e; for dep in $(ALL_TEST_DEPS_DIRS) ; do $(MAKE) -C $$dep IS_DEP=1; done
+ $(verbose) set -e; for dep in $(ALL_TEST_DEPS_DIRS) ; do \
+ if [ -z "$(strip $(FULL))" ] && [ ! -L $$dep ] && [ -f $$dep/ebin/dep_built ]; then \
+ :; \
+ else \
+ $(MAKE) -C $$dep IS_DEP=1; \
+ if [ ! -L $$dep ] && [ -d $$dep/ebin ]; then touch $$dep/ebin/dep_built; fi; \
+ fi \
+ done
endif
ifneq ($(wildcard $(TEST_DIR)),)
diff --git a/plugins/shell.mk b/plugins/shell.mk
index d241b9f..715523c 100644
--- a/plugins/shell.mk
+++ b/plugins/shell.mk
@@ -24,7 +24,14 @@ help::
$(foreach dep,$(SHELL_DEPS),$(eval $(call dep_target,$(dep))))
build-shell-deps: $(ALL_SHELL_DEPS_DIRS)
- $(verbose) set -e; for dep in $(ALL_SHELL_DEPS_DIRS) ; do $(MAKE) -C $$dep ; done
+ $(verbose) set -e; for dep in $(ALL_SHELL_DEPS_DIRS) ; do \
+ if [ -z "$(strip $(FULL))" ] && [ ! -L $$dep ] && [ -f $$dep/ebin/dep_built ]; then \
+ :; \
+ else \
+ $(MAKE) -C $$dep IS_DEP=1; \
+ if [ ! -L $$dep ] && [ -d $$dep/ebin ]; then touch $$dep/ebin/dep_built; fi; \
+ fi \
+ done
shell:: build-shell-deps
$(gen_verbose) $(SHELL_ERL) -pa $(SHELL_PATHS) $(SHELL_OPTS)