blob: 311a56a0248ab14e8aa11b24ac498fb99736d6e6 (
plain)
- markdown-snippets := topbar.mdwn footer.mdwn
- hypertext-snippets = $(markdown-snippets:%.mdwn=%.html)
- markdown := $(filter-out $(markdown-snippets),$(wildcard *.mdwn))
- hypertext = $(subst index/index,index,$(markdown:%.mdwn=%/index.html))
- all: $(hypertext) style.css
- update: source all
- source: .git
- git pull
- $(hypertext-snippets): %.html: %.mdwn Makefile
- pandoc -f markdown -t html -o $@ $<
- sed -i -e '1i <div class=\"$*\">' -e '$$ a </div>' $@
- %.html %/index.html: %.mdwn $(hypertext-snippets) Makefile
- $(if $(filter-out ./,$(dir $@)),mkdir -p $(dir $@))
- pandoc -s -c style.css -B topbar.html -A footer.html -f markdown -t html -o $@ $<
- %.css : %.scss Makefile
- scss --compass --style compressed $< $@
- clean:
- find -type f -name '*.html' -delete
- find -type d -empty -delete
- rm -rf .sass-cache
- MAKEFLAGS += --jobs
- .NOTPARALLEL: source
- .PHONY: all update source clean
- .INTERMEDIATE: $(hypertext-snippets)
|