diff options
author | Loïc Hoguin <[email protected]> | 2015-10-19 17:29:04 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-10-19 17:29:04 +0200 |
commit | 7f1ace7622a5a9e046b8ae10accc8169ab59b047 (patch) | |
tree | 78d91b77cd9a07f77faca2742e4cdf1ed4612c9e /core/erlc.mk | |
parent | 77afa66836f92a1f1f2052e1a7d9ace9fd4cee57 (diff) | |
download | erlang.mk-7f1ace7622a5a9e046b8ae10accc8169ab59b047.tar.gz erlang.mk-7f1ace7622a5a9e046b8ae10accc8169ab59b047.tar.bz2 erlang.mk-7f1ace7622a5a9e046b8ae10accc8169ab59b047.zip |
Force rebuilds on Makefile/.app.src changes
Everything will be rebuilt when the Makefile or any included
Makefile (like Erlang.mk or plugins) change.
Only the .app will be rebuilt when the .app.src file changes.
Diffstat (limited to 'core/erlc.mk')
-rw-r--r-- | core/erlc.mk | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/erlc.mk b/core/erlc.mk index a8ab8fe..02524b4 100644 --- a/core/erlc.mk +++ b/core/erlc.mk @@ -183,6 +183,10 @@ $(PROJECT).d:: $(ERL_FILES) $(call core_find,include/,*.hrl) $(makedep_verbose) $(call erlang,$(call makedep.erl,$@)) endif +# Rebuild everything when the Makefile changes. +$(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES):: $(MAKEFILE_LIST) + @touch $@ + -include $(PROJECT).d ebin/$(PROJECT).app:: ebin/ @@ -195,8 +199,9 @@ define compile_erl -pa ebin/ -I include/ $(filter-out $(ERLC_EXCLUDE_PATHS),$(COMPILE_FIRST_PATHS) $(1)) endef -ebin/$(PROJECT).app:: $(ERL_FILES) $(CORE_FILES) - $(if $(strip $?),$(call compile_erl,$?)) +ebin/$(PROJECT).app:: $(ERL_FILES) $(CORE_FILES) $(wildcard src/$(PROJECT).app.src) + $(eval FILES_TO_COMPILE := $(filter-out src/$(PROJECT).app.src,$?)) + $(if $(strip $(FILES_TO_COMPILE)),$(call compile_erl,$(FILES_TO_COMPILE))) $(eval GITDESCRIBE := $(shell git describe --dirty --abbrev=7 --tags --always --first-parent 2>/dev/null || true)) $(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \ $(filter-out $(ERLC_EXCLUDE_PATHS),$(ERL_FILES) $(CORE_FILES) $(BEAM_FILES))))))) |