summaryrefslogtreecommitdiff
path: root/repo/www/Makefile
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2020-03-25 23:11:37 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2020-03-25 23:11:37 +0100
commit2afc313501e43691b251dc04a41ee901de04802c (patch)
treeadcac7a98d9daf308cf8cf4d7a75a4b96a5bc671 /repo/www/Makefile
parent4734f72eab5632757adee715359944fccd5dc5f2 (diff)
downloadmemory-leaks-2afc313501e43691b251dc04a41ee901de04802c.tar.xz
Complete READMEs with a page index
Diffstat (limited to 'repo/www/Makefile')
-rw-r--r--repo/www/Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/repo/www/Makefile b/repo/www/Makefile
index 7ba566c..913aa65 100644
--- a/repo/www/Makefile
+++ b/repo/www/Makefile
@@ -1,3 +1,5 @@
+# TODO: set dependencies to scripts correctly
+
TOP_DIR = ../..
OUT_DIR = $(TOP_DIR)/public
TEXT_FILES = md org
@@ -23,15 +25,17 @@ site: $(pages) $(indices) $(autoindices)
$(page_folders):
mkdir -p $@
-$(pages) $(indices):
+$(pages):
pandoc -s $< -o $@
+$(indices):
+ python3 generate-index.py "$(TEXT_FILES)" $(dir $<) | pandoc -s > $@
+
# ⚠ When tweaking this rule, check whether it still works for the
# top-level index.html, i.e. when there is no top-level README.
$(autoindices): \
$(OUT_DIR)%/index.html: $(TOP_DIR)% generate-index.py | $(OUT_DIR)%
- python3 generate-index.py "$(TEXT_FILES)" "$(*:/%=%)" | \
- pandoc -s > $@
+ python3 generate-index.py "$(TEXT_FILES)" $< | pandoc -s > $@
clean:
-rm $(dependencies)