diff options
Diffstat (limited to 'repo/www/Makefile')
| -rw-r--r-- | repo/www/Makefile | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/repo/www/Makefile b/repo/www/Makefile index 913aa65..bc9933a 100644 --- a/repo/www/Makefile +++ b/repo/www/Makefile @@ -9,8 +9,8 @@ dirname = $(patsubst %/,%,$(dir $(1))) text_patterns = $(foreach ext,$(TEXT_FILES),'$(TOP_DIR)/**.$(ext)') text_folders = $(sort $(call dirname,$(shell git ls-files $(text_patterns)))) - page_folders = $(patsubst $(TOP_DIR)%,$(OUT_DIR)%,$(text_folders)) +indices = $(addsuffix /index.html,$(page_folders)) all: site @@ -20,7 +20,7 @@ include $(dependencies) $(dependencies): generate-deps.py $(text_folders) python3 $< "$(TEXT_FILES)" $(OUT_DIR) -site: $(pages) $(indices) $(autoindices) +site: $(pages) $(indices) $(page_folders): mkdir -p $@ @@ -28,14 +28,10 @@ $(page_folders): $(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 > $@ +# top-level index.html. +$(indices): $(OUT_DIR)%/index.html: $(TOP_DIR)% generate-index.py | $(OUT_DIR)% + python3 generate-index.py "$(TEXT_FILES)" "$<" $@ clean: -rm $(dependencies) |
