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: public/ $(addsuffix .md,$(articles)) index.rb Makefile ./index.rb $(filter-out public/ index.rb Makefile $@,$^) > $@ touch public/ touch $@ clean: rm -f -- public/*.html public/index.md