bavbavhaus.net/makefile

70 lines
1.5 KiB
Makefile

SHELL = /bin/sh
IKIWIKISETUPFILE = bavbavhaus.net.local.setup
# ikiwiki
.PHONY: all
all: wiki\
$(patsubst notes/%.md,wiki/%.mdwn,$(wildcard notes/*.md))\
refresh
wiki:
test -d "wiki" || mkdir "wiki"
wiki/%.mdwn: notes/%.md\
pandoc/defaults/ikiwiki.yaml\
pandoc/templates/ikiwiki.markdown\
pandoc/csl/chicago-fullnote-sl.csl\
pandoc/filters/pandoc-quotes.lua
pandoc --data-dir=pandoc --id-prefix=$* -dikiwiki -o $@ $<
.PHONY: refresh
refresh:
ikiwiki --setup $(IKIWIKISETUPFILE) --refresh
.PHONY: rebuild
rebuild:
ikiwiki --setup $(IKIWIKISETUPFILE) --rebuild
.PHONY: clean
clean:
rm wiki/*
ikiwiki --setup $(IKIWIKISETUPFILE) --clean
# dest
dest:
test -d "dest" || mkdir "dest"
# docx
dest/%.docx: notes/%.md\
pandoc/defaults/docx.yaml\
pandoc/reference-sl.docx\
pandoc/csl/chicago-fullnote-sl.csl\
pandoc/filters/pandoc-quotes.lua\
pandoc/filters/delink.lua\
| dest
pandoc --data-dir=pandoc -ddocx -o $@ $<
# pdf
dest/%.pdf: notes/%.md\
pandoc/defaults/pdf.yaml\
pandoc/csl/chicago-fullnote-sl.csl\
| dest
pandoc --data-dir=pandoc -dpdf -o $@ $<
# presentation
dest/%.s5.html: notes/%.md\
pandoc/defaults/s5.yaml\
pandoc/templates/default.s5\
pandoc/s5/default/pretty.css\
pandoc/s5/default/framing.css\
pandoc/csl/chicago-fullnote-sl.csl\
pandoc/filters/pandoc-quotes.lua\
| dest
pandoc --data-dir=pandoc -ds5 -o $@ $<
.PHONY: distclean
distclean:
rm -rf "wiki"
rm -rf "dest