aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/erlydtl.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/erlydtl.mk b/plugins/erlydtl.mk
index a8d4cea..4f04e14 100644
--- a/plugins/erlydtl.mk
+++ b/plugins/erlydtl.mk
@@ -24,10 +24,18 @@ DTL_NAMES = $(addsuffix $(DTL_SUFFIX),$(DTL_FILES:$(DTL_PATH)/%.dtl=%))
DTL_MODULES = $(if $(DTL_FULL_PATH),$(subst /,_,$(DTL_NAMES)),$(notdir $(DTL_NAMES)))
BEAM_FILES += $(addsuffix .beam,$(addprefix ebin/,$(DTL_MODULES)))
+ifneq ($(words $(DTL_FILES)),0)
# Rebuild templates when the Makefile changes.
-$(DTL_FILES): $(MAKEFILE_LIST)
+$(ERLANG_MK_TMP)/last-makefile-change-erlydtl: $(MAKEFILE_LIST)
+ @mkdir -p $(ERLANG_MK_TMP)
+ @if test -f $@; then \
+ touch $(DTL_FILES); \
+ fi
@touch $@
+ebin/$(PROJECT).app:: $(ERLANG_MK_TMP)/last-makefile-change-erlydtl
+endif
+
define erlydtl_compile.erl
[begin
Module0 = case "$(strip $(DTL_FULL_PATH))" of