aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 21 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b6b245c..ec2f746 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
@@ -50,6 +59,10 @@ MAKEOVERRIDES := $(filter-out p=$p,$(MAKEOVERRIDES))
check:
$(MAKE) -C test pkg-$p KEEP_BUILDS=1
else
+ifdef hp
+check:
+ $(MAKE) -C test hexpm-pkg-$(hp) KEEP_BUILDS=1 HEXPM=1
+else
ifdef c
check:
$(MAKE) -C test $c c=
@@ -58,10 +71,14 @@ check:
$(MAKE) -C test
endif
endif
+endif
packages:
$(MAKE) -C test packages
+hexpm-packages:
+ $(MAKE) -C test hexpm-packages HEXPM=1
+
summary:
@mkdir -p test/logs/
@touch test/logs/latest.log test/packages/errors.log
@@ -69,6 +86,9 @@ summary:
@sort test/packages/errors.log > test/logs/latest.log
@cp test/logs/latest.log "test/logs/$(shell date '+%F_%T%z')"
+check-templates:
+ $(MAKE) -C test templates
+
search:
@$(MAKE) --no-print-directory \
-f core/core.mk $(addprefix -f,$(wildcard index/*.mk)) -f core/index.mk \