summaryrefslogtreecommitdiff
path: root/slidy/Makefile
blob: 5372f6bab2698b1ba51a0c2f2ef37bc0bd967694 (plain)
  1. pandoc_sources := $(wildcard *.mkd)
  2. presentations = $(pandoc_sources:%.mkd=%/index.html)
  3. all: $(presentations)
  4. # TODO: use --offline when working with Debian packaging of Pandoc
  5. # FIXME: only add local stylesheet if it already exist in target dir
  6. $(presentations): %/index.html : %.mkd %/local.css
  7. mkdir -p $(dir $@)
  8. pandoc --from Markdown --to Slidy -o $@ -s -c local.css $<
  9. perl -i -pe 's{https?://www.w3.org/Talks/Tools/Slidy2/(?:styles|scripts)/(slidy.(?:css|js))(?:\.gz)?}{../../../slidy/$$1}g' $@
  10. %/local.css: $(firstword $(wildcard local.scss local.css) ../../slidy/local.css)
  11. #%/local.css: local.scss
  12. #%/local.css: $(wildcard local.scss)
  13. $(if $(filter %.scss,$<),\
  14. rm --force $@ && \
  15. sassc --load-path /usr/share/sass/stylesheets --style compressed $< $@,\
  16. ln --force --symbolic --target-directory=$* ../$<)