aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/erlc.mk7
-rw-r--r--erlang.mk7
2 files changed, 12 insertions, 2 deletions
diff --git a/core/erlc.mk b/core/erlc.mk
index 8976e7e..c75c656 100644
--- a/core/erlc.mk
+++ b/core/erlc.mk
@@ -23,7 +23,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 \
@@ -62,5 +62,10 @@ 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/
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/