articles = $(filter-out public/index,$(patsubst %.md,%,$(wildcard public/*.md))) .DELETE_ON_ERROR: .SECONDARY: all: public/index.html $(addsuffix .html,$(articles)) public/%.html: public/%.md pagerender.rb template.erb Makefile ./pagerender.rb $< > $@ public/index.md: $(addsuffix .md,$(articles)) index.rb Makefile ./index.rb $(filter-out Makefile index.rb public/index.md,$^) > $@ clean: rm -f -- public/*.html public/index.md