blob: fc7800ffbbe0ade5b275f1204eaf718a79724909 (
plain)
- htmlpages = index.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 "<div id="book">" >> $@
- echo "<div id="page1" class="page"><div class="inner">" >> $@
- cmark $< >> $@
- 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' $@
- echo "</div></div>" >> $@
- cat $(htmlfooter) >> $@
- $(cssfiles): css/%.css : css/%.scss $(sass_includedir)
- sassc -I $(sass_includedir) $< $@
- clean:
- rm -f $(cssfiles) $(htmlpages)
- .PHONY: clean
|