htmlpages = index.html demo.html pocketCSS.html pocketHelp.html htmlheader = templates/header.html htmlfooter = templates/footer.html cssfiles := css/main.css css/print.css sass_includedir = /usr/share/compass/frameworks/normalize-scss/stylesheets all: $(htmlpages) $(htmlpages): %.html : %.md $(htmlheader) $(htmlfooter) $(cssfiles) cat $(htmlheader) > $@ echo "
" >> $@ echo "
" >> $@ cmark $< >> $@ perl -p0i -e '$$i or $$i++; s!(\s*){2}(?{$$i++})!
\n\n
!g' $@ echo "
" >> $@ cat $(htmlfooter) >> $@ $(cssfiles): css/%.css : css/%.scss $(sass_includedir) sassc -I $(sass_includedir) $< $@ clean: rm -f $(cssfiles) $(htmlpages) .PHONY: clean