diff options
Diffstat (limited to 'repo/www')
| -rw-r--r-- | repo/www/Makefile | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/repo/www/Makefile b/repo/www/Makefile index db656f2..d74a77c 100644 --- a/repo/www/Makefile +++ b/repo/www/Makefile @@ -1,6 +1,11 @@ TOP_DIR = ../.. OUT_DIR = $(TOP_DIR)/public TEXT_FILES = md org +V = 0 + +v = $(call v_$(V),$(1),$(2)) +v_0 = @echo $(1) $(2); +v_1 = dirname = $(patsubst %/,%,$(dir $(1))) dirnames = $(sort $(call dirname,$(1))) @@ -43,9 +48,9 @@ $(html_folders) $(cache): $(pages) $(subindices): $(title) $(pages): $(OUT_DIR)/%.html: - TEXT_FILES="$(TEXT_FILES)" \ - pandoc -s $< -o $@ \ - -T "$$(cat $(title))" -M title="$*" \ + $(call v,PAGE,$*) TEXT_FILES="$(TEXT_FILES)" \ + pandoc -s $< -o $@ \ + -T "$$(cat $(title))" -M title="$*" \ --lua-filter convert-internal-links.lua top_index = $(OUT_DIR)/index.html @@ -57,7 +62,7 @@ $(subindices): index_options = --site-title="$$(cat $(title))" # ⚠ When tweaking this rule, check whether it still works for the # top-level index.html. $(indices): $(OUT_DIR)/%index.html: - TEXT_FILES="$(TEXT_FILES)" \ + $(call v,INDEX,$*) TEXT_FILES="$(TEXT_FILES)" \ ./generate-index.py $(index_options) $(site_tree) "$(patsubst %/,%,$*)" $@ clean: |
