summaryrefslogtreecommitdiff
path: root/Makefile
blob: 3dad6aad60ccd64a2a9c38ccb7b7e1bbfef7d0cc (plain)
  1. markdown-snippets := topbar.mdwn footer.mdwn
  2. hypertext-snippets = $(markdown-snippets:%.mdwn=%.html)
  3. markdown := $(filter-out $(markdown-snippets),$(wildcard *.mdwn */*.mdwn */*/*.mdwn))
  4. hypertext = $(subst index/index,index,$(markdown:%.mdwn=%/index.html))
  5. all: $(hypertext) style.css
  6. update: .git
  7. git pull
  8. $(MAKE) all
  9. $(hypertext-snippets): %.html: %.mdwn Makefile
  10. pandoc -f markdown -t html -o $@ $<
  11. sed -i -e '1i <div class=\"$*\">' -e '$$ a </div>' $@
  12. %.html %/index.html: %.mdwn $(hypertext-snippets) Makefile
  13. $(if $(filter-out ./,$(dir $@)),mkdir -p $(dir $@))
  14. pandoc -s -c /style.css -B topbar.html -A footer.html -f markdown -t html -o $@ $<
  15. %.css : %.scss Makefile
  16. scss --compass --style compressed $< $@
  17. clean:
  18. find -type f -name '*.html' -delete
  19. find -type d -empty -delete
  20. rm -f style.css style.css.map
  21. rm -rf .sass-cache
  22. MAKEFLAGS += --jobs
  23. .NOTPARALLEL: source
  24. .PHONY: all update clean