aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <[email protected]>2019-06-21 14:46:22 +0200
committerLoïc Hoguin <[email protected]>2019-06-24 15:38:51 +0200
commit87cba237455ca87324037c6c92495ec6a8c6a3f9 (patch)
treef50e5d6770b8f338ddae45a0fd5558157e1a8ef4 /core
parent24ff52b9d3ec99528868c8e06bde17e9a51d6ba5 (diff)
downloaderlang.mk-87cba237455ca87324037c6c92495ec6a8c6a3f9.tar.gz
erlang.mk-87cba237455ca87324037c6c92495ec6a8c6a3f9.tar.bz2
erlang.mk-87cba237455ca87324037c6c92495ec6a8c6a3f9.zip
Accept `$(force_rebuilding_dep)` to tune the behavior of `$(FULL)`
By default, Erlang.mk only builds dependencies once, the first time the top-level project is compiled. A forced rebuild of all dependencies can be forced by setting the `$(FULL)` variable to a non-empty value. For developers working on the top-level project and one or more dependencies at the same time, Erlang.mk now accepts a variable/function called `$(force_rebuilding_dep)` which is called to determine if the dependency passed as the first argument should be forcibly rebuilt. It allows a developer to filter the dependencies he works on (so they are always rebuilt) from other third-party dependencies he never touches (i.e. they are only built once at the beginning). The content of `$(force_rebuilding_dep)` is expected to be a shell one-liner where the `$(1)` Make variable is set to the path to the dependency. Here is an example from the testsuite: force_rebuilding_dep = test '$(1)' = '$(CURDIR)/deps/cowlib'
Diffstat (limited to 'core')
-rw-r--r--core/deps.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/deps.mk b/core/deps.mk
index 2984aa2..cdcf31f 100644
--- a/core/deps.mk
+++ b/core/deps.mk
@@ -130,7 +130,7 @@ ifneq ($(ALL_DEPS_DIRS),)
:; \
else \
echo $$dep >> $(ERLANG_MK_TMP)/deps.log; \
- if [ -z "$(strip $(FULL))" ] && [ ! -L $$dep ] && [ -f $$dep/ebin/dep_built ]; then \
+ if [ -z "$(strip $(FULL))" ] $(if $(force_rebuilding_dep),&& ($(call force_rebuilding_dep,$$dep)),) && [ ! -L $$dep ] && [ -f $$dep/ebin/dep_built ]; then \
:; \
elif [ -f $$dep/GNUmakefile ] || [ -f $$dep/makefile ] || [ -f $$dep/Makefile ]; then \
$(MAKE) -C $$dep IS_DEP=1; \