diff options
-rw-r--r-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,12 +1,14 @@ markdown := $(wildcard *.mdwn) -hypertext = $(markdown:%.mdwn=%.html) +hypertext = $(subst index/index,index,$(markdown:%.mdwn=%/index.html)) all: $(hypertext) -%.html: %.mdwn +%.html %/index.html: %.mdwn + $(if $(filter-out ./,$(dir $@)),mkdir -p $(dir $@)) pandoc -f markdown -t html -o $@ $< clean: - rm -f *.html + find -type f -name '*.html' -delete + find -type d -empty -delete .PHONY: all clean |