aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f6d4287..b69bfb8 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ ERLANG_MK_VERSION = $(shell git describe --dirty --tags --always)
.PHONY: all check
-all:
+all: templates.mk
# Temporarily force the printing of the CHANGELOG.
# The required variable hadn't been introduced yet.
#ifdef UPGRADE
@@ -40,6 +40,15 @@ all:
| sed 's/^ERLANG_MK_VERSION =.*/ERLANG_MK_VERSION = $(ERLANG_MK_VERSION)/' \
| sed 's:^ERLANG_MK_WITHOUT =.*:ERLANG_MK_WITHOUT = $(WITHOUT):' > $(ERLANG_MK)
+# Templates that end with .erl have the suffix removed. It is implied.
+templates.mk: Makefile templates/*
+ for f in templates/*; do \
+ echo define tpl_`basename $$f .erl`; \
+ cat $$f; \
+ echo endef; \
+ echo; \
+ done > $@
+
lint: all
$(MAKE) -f erlang.mk --warn-undefined-variables