summaryrefslogtreecommitdiff
path: root/repo/www/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'repo/www/Makefile')
-rw-r--r--repo/www/Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/repo/www/Makefile b/repo/www/Makefile
index f88672c..aa48971 100644
--- a/repo/www/Makefile
+++ b/repo/www/Makefile
@@ -23,6 +23,8 @@ cache = .cache
title = $(cache)/title
# Maps folders to their contents (files and subfolders).
site_tree = $(cache)/site-tree.json
+# Lua module to let filters know about the configuration.
+lua_config = $(cache)/config.lua
# Defines $(pages) and $(indices).
dependencies = $(cache)/deps.mk
@@ -32,6 +34,9 @@ $(title): $(top_readme) | $(cache)
$(site_tree): $(page_folders) | $(cache)
./generate-tree.py -o $@ $(EXTENSIONS)
+$(lua_config): | $(cache)
+ ./generate-lua-config.py EXTENSIONS="$(EXTENSIONS)" > $@
+
$(dependencies): $(site_tree) | $(cache)
./generate-deps.py $< $@ $(OUT_DIR)
@@ -49,10 +54,10 @@ $(html_folders) $(cache):
$(pages) $(subindices): $(title)
-$(pages) $(indices): $(html_template)
+$(pages) $(indices): $(html_template) $(lua_filters) $(lua_config)
$(pages): $(OUT_DIR)/%.html:
- $(call v,PAGE,$*) EXTENSIONS="$(EXTENSIONS)" \
+ $(call v,PAGE,$*) \
./generate-page.py --site-title="$$(cat $(title))" --title="$*" \
$(foreach f,$(lua_filters),--lua-filter $(f)) \
--template=$(html_template) $< $@
@@ -66,7 +71,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:
- $(call v,INDEX,$*) EXTENSIONS="$(EXTENSIONS)" \
+ $(call v,INDEX,$*) \
./generate-index.py $(index_options) --template=$(html_template) \
$(foreach f,$(lua_filters),--lua-filter $(f)) \
$(site_tree) "$(patsubst %/,%,$*)" $@