diff options
Diffstat (limited to 'repo/www/Makefile')
| -rw-r--r-- | repo/www/Makefile | 10 |
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) |
