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

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

" >> $@ ln -sf $@ $* # not POSIX %.gz: % echo "Compressing $<" gzip < $< > $@ clean: rm -f $(tgt) $(lnk) $(gz) .PHONY: all clean .SUFFIXES: .md .html .gz .SILENT: