aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-01-02 11:26:35 +0100
committerLoïc Hoguin <[email protected]>2019-01-02 11:26:35 +0100
commit6ebc73e614ff79bcc49ee2a5d7c1298e8c0e1bf5 (patch)
tree34a0fc263cdf3517162403a93a54b9faccf49f67 /core
parentaaa94f3d42b16096893556e826214042b93d61b0 (diff)
downloaderlang.mk-6ebc73e614ff79bcc49ee2a5d7c1298e8c0e1bf5.tar.gz
erlang.mk-6ebc73e614ff79bcc49ee2a5d7c1298e8c0e1bf5.tar.bz2
erlang.mk-6ebc73e614ff79bcc49ee2a5d7c1298e8c0e1bf5.zip
Fix rebuild on Makefile change when new deps are added
The issue was that when a new dep is added the last-makefile-change update was done in the dependency and not in the top-level Makefile, preventing the rebuild of the top-level project. A test was also added to do the same when editing dependencies and things seem to work properly in that case. Thanks to robinchew on IRC for the great help debugging this.
Diffstat (limited to 'core')
-rw-r--r--core/erlc.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/erlc.mk b/core/erlc.mk
index 9195ece..7711fd9 100644
--- a/core/erlc.mk
+++ b/core/erlc.mk
@@ -269,6 +269,7 @@ $(PROJECT).d:: $(ERL_FILES) $(call core_find,include/,*.hrl) $(MAKEFILE_LIST)
$(makedep_verbose) $(call erlang,$(call makedep.erl,$@))
endif
+ifeq ($(IS_APP)$(IS_DEP),)
ifneq ($(words $(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES)),0)
# Rebuild everything when the Makefile changes.
$(ERLANG_MK_TMP)/last-makefile-change: $(MAKEFILE_LIST) | $(ERLANG_MK_TMP)
@@ -281,6 +282,7 @@ $(ERLANG_MK_TMP)/last-makefile-change: $(MAKEFILE_LIST) | $(ERLANG_MK_TMP)
$(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES):: $(ERLANG_MK_TMP)/last-makefile-change
ebin/$(PROJECT).app:: $(ERLANG_MK_TMP)/last-makefile-change
endif
+endif
$(PROJECT).d::
$(verbose) :