diff options
author | Loïc Hoguin <[email protected]> | 2018-12-10 13:52:59 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-12-10 13:52:59 +0100 |
commit | a11c6fb7f9ee084fe87bdcba32529358d9fab64e (patch) | |
tree | 80c309fc48978fe3293a01e49dd7a7bda958ee0f /core/erlc.mk | |
parent | 7799804277e6fd38d308ebd581d194c38cd3fbb4 (diff) | |
download | erlang.mk-a11c6fb7f9ee084fe87bdcba32529358d9fab64e.tar.gz erlang.mk-a11c6fb7f9ee084fe87bdcba32529358d9fab64e.tar.bz2 erlang.mk-a11c6fb7f9ee084fe87bdcba32529358d9fab64e.zip |
Optimization: reduce the number of shell commands on noops
Diffstat (limited to 'core/erlc.mk')
-rw-r--r-- | core/erlc.mk | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/core/erlc.mk b/core/erlc.mk index 872d3f5..9195ece 100644 --- a/core/erlc.mk +++ b/core/erlc.mk @@ -53,15 +53,9 @@ ifneq ($(wildcard src/),) # Targets. -ifeq ($(wildcard ebin/test),) -app:: deps +app:: $(if $(wildcard ebin/test),clean) deps $(verbose) $(MAKE) --no-print-directory $(PROJECT).d $(verbose) $(MAKE) --no-print-directory app-build -else -app:: clean deps - $(verbose) $(MAKE) --no-print-directory $(PROJECT).d - $(verbose) $(MAKE) --no-print-directory app-build -endif ifeq ($(wildcard src/$(PROJECT_MOD).erl),) define app_file @@ -277,8 +271,7 @@ endif 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) - $(verbose) mkdir -p $(ERLANG_MK_TMP) +$(ERLANG_MK_TMP)/last-makefile-change: $(MAKEFILE_LIST) | $(ERLANG_MK_TMP) $(verbose) if test -f $@; then \ touch $(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES); \ touch -c $(PROJECT).d; \ @@ -289,6 +282,9 @@ $(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES): ebin/$(PROJECT).app:: $(ERLANG_MK_TMP)/last-makefile-change endif +$(PROJECT).d:: + $(verbose) : + include $(wildcard $(PROJECT).d) ebin/$(PROJECT).app:: ebin/ |