diff options
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))))))) |