src = index.md tools/index.md etc/index.md tgt = $(src:.md=.html) all: $(tgt) .md.html: echo "Making $@" echo "" > $@ sed 's/^#* //;1q' < $< >> $@ echo "" >> $@ smu < $< >> $@ echo "

Last updated: " >> $@ stat -c %y $< | awk '{print $$1}' >> $@ echo "

" >> $@ chmod a+r $@ clean: rm -f $(tgt) .PHONY: all clean .SUFFIXES: .md .html .SILENT: