Skip to content

Commit

Permalink
WIP templates
Browse files Browse the repository at this point in the history
  • Loading branch information
essen committed Nov 21, 2024
1 parent 9376f53 commit 5b133be
Show file tree
Hide file tree
Showing 23 changed files with 403 additions and 383 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
doc/guide.pdf
doc/html
templates.mk
test/logs/
test/packages/
test/test_hex_core_git/
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
3 changes: 3 additions & 0 deletions build.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ core/rel
core/test
core/compat

# Core templates.
templates

# Plugins.
plugins/asciidoc
plugins/bootstrap
Expand Down
Loading

0 comments on commit 5b133be

Please sign in to comment.