From 2afc313501e43691b251dc04a41ee901de04802c Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Wed, 25 Mar 2020 23:11:37 +0100 Subject: Complete READMEs with a page index --- repo/www/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'repo/www/Makefile') 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) -- cgit v1.2.3