aboutsummaryrefslogtreecommitdiffstats
path: root/erlang.mk
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-08-15 18:55:06 +0200
committerLoïc Hoguin <[email protected]>2014-08-15 18:58:50 +0200
commit813ce99c82dc7b0f1d3f34571d6426e412983c5a (patch)
tree36db6e4477fadd6e5c6a3e14d49b07988664cfda /erlang.mk
parentcabccd81400c635e5629b802df3b65a3df68b846 (diff)
parent22fcb9c76a2c3e48a3a8233b99118a5bb59f2a4a (diff)
downloaderlang.mk-813ce99c82dc7b0f1d3f34571d6426e412983c5a.tar.gz
erlang.mk-813ce99c82dc7b0f1d3f34571d6426e412983c5a.tar.bz2
erlang.mk-813ce99c82dc7b0f1d3f34571d6426e412983c5a.zip
Merge branch 'recompile_erl_on_hrl_change' of git://github.com/crownedgrouse/erlang.mk
Extra changes include: * Not running the target if the ebin/ directory does not exist * Moved the target in the appropriate section in the file
Diffstat (limited to 'erlang.mk')
-rw-r--r--erlang.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/erlang.mk b/erlang.mk
index 0cea78a..310d663 100644
--- a/erlang.mk
+++ b/erlang.mk
@@ -201,7 +201,7 @@ xyrl_verbose = $(xyrl_verbose_$(V))
# Core targets.
-app:: ebin/$(PROJECT).app
+app:: erlc-include ebin/$(PROJECT).app
$(eval MODULES := $(shell find ebin -type f -name \*.beam \
| sed "s/ebin\//'/;s/\.beam/',/" | sed '$$s/.$$//'))
@if [ -z "$$(grep -E '^[^%]*{modules,' src/$(PROJECT).app.src)" ]; then \
@@ -240,6 +240,11 @@ clean:: clean-app
# Extra targets.
+erlc-include:
+ -@if [ -d ebin/ ]; then \
+ find include/ src/ -type f -name \*.hrl -newer ebin -exec touch $(shell find src/ -type f -name "*.erl") \; ; \
+ fi
+
clean-app:
$(gen_verbose) rm -rf ebin/