markdown-snippets := topbar.mdwn footer.mdwn markdown := $(filter-out $(markdown-snippets),$(wildcard *.mdwn)) hypertext = $(subst index/index,index,$(markdown:%.mdwn=%/index.html)) all: $(hypertext) update: source all source: .git git pull %.html %/index.html: %.mdwn Makefile $(if $(filter-out ./,$(dir $@)),mkdir -p $(dir $@)) pandoc -f markdown -t html -o $@ $< clean: find -type f -name '*.html' -delete find -type d -empty -delete MAKEFLAGS += --jobs .NOTPARALLEL: source .PHONY: all update source clean