summaryrefslogtreecommitdiff
path: root/Makefile
blob: d31ba3d415b8ee449d1444ca6198f64ce519d6b0 (plain)
  1. htmlpages = demo.html pocketCSS.html pocketHelp.html
  2. htmlheader = templates/header.html
  3. htmlfooter = templates/footer.html
  4. cssfiles := css/main.css css/print.css
  5. sass_includedir = /usr/share/compass/frameworks/normalize-scss/stylesheets
  6. all: $(htmlpages)
  7. $(htmlpages): %.html : %.md $(htmlheader) $(htmlfooter) $(cssfiles)
  8. cat $(htmlheader) > $@
  9. echo "<div id="book">" >> $@
  10. echo "<div id="page1" class="page"><div class="inner">" >> $@
  11. cmark $< >> $@
  12. perl -p0i -e '$$i or $$i++; s!(<hr\s*/?>\s*){2}(?{$$i++})!</div></div>\n\n<div id="page$$i" class="page"><div class="inner">!g' $@
  13. echo "</div></div>" >> $@
  14. cat $(htmlfooter) >> $@
  15. $(cssfiles): css/%.css : css/%.scss $(sass_includedir)
  16. sassc -I $(sass_includedir) $< $@
  17. clean:
  18. rm -f $(cssfiles) $(htmlpages)
  19. .PHONY: clean