bavbavhaus.net/makefile

70 lines
1.5 KiB
Makefile
Raw Normal View History

2024-01-12 15:08:12 +01:00
SHELL = /bin/sh
2024-03-03 23:51:01 +01:00
IKIWIKISETUPFILE = bavbavhaus.net.local.setup
2024-01-12 15:08:12 +01:00
2024-03-03 23:51:01 +01:00
# ikiwiki
2024-02-05 17:45:48 +01:00
.PHONY: all
2024-03-03 23:51:01 +01:00
all: wiki\
$(patsubst notes/%.md,wiki/%.mdwn,$(wildcard notes/*.md))\
refresh
wiki:
test -d "wiki" || mkdir "wiki"
2024-01-12 15:08:12 +01:00
2024-02-05 17:45:48 +01:00
wiki/%.mdwn: notes/%.md\
2024-03-03 23:51:01 +01:00
pandoc/defaults/ikiwiki.yaml\
2024-02-05 17:45:48 +01:00
pandoc/templates/ikiwiki.markdown\
pandoc/csl/chicago-fullnote-sl.csl\
2024-03-03 23:51:01 +01:00
pandoc/filters/pandoc-quotes.lua
pandoc --data-dir=pandoc --id-prefix=$* -dikiwiki -o $@ $<
2024-01-12 15:08:12 +01:00
2024-03-03 23:51:01 +01:00
.PHONY: refresh
refresh:
ikiwiki --setup $(IKIWIKISETUPFILE) --refresh
.PHONY: rebuild
rebuild:
ikiwiki --setup $(IKIWIKISETUPFILE) --rebuild
.PHONY: clean
clean:
rm wiki/*
ikiwiki --setup $(IKIWIKISETUPFILE) --clean
2024-02-05 17:45:48 +01:00
2024-01-15 07:07:32 +01:00
# dest
2024-03-03 23:51:01 +01:00
dest:
test -d "dest" || mkdir "dest"
# docx
2024-02-05 17:45:48 +01:00
dest/%.docx: notes/%.md\
2024-03-03 23:51:01 +01:00
pandoc/defaults/docx.yaml\
2024-02-05 17:45:48 +01:00
pandoc/reference-sl.docx\
pandoc/csl/chicago-fullnote-sl.csl\
pandoc/filters/pandoc-quotes.lua\
pandoc/filters/delink.lua\
| dest
2024-03-03 23:51:01 +01:00
pandoc --data-dir=pandoc -ddocx -o $@ $<
2024-01-12 15:08:12 +01:00
2024-03-03 23:51:01 +01:00
# pdf
2024-02-05 17:45:48 +01:00
dest/%.pdf: notes/%.md\
2024-03-03 23:51:01 +01:00
pandoc/defaults/pdf.yaml\
2024-02-05 17:45:48 +01:00
pandoc/csl/chicago-fullnote-sl.csl\
| dest
2024-03-03 23:51:01 +01:00
pandoc --data-dir=pandoc -dpdf -o $@ $<
2024-02-05 17:45:48 +01:00
2024-03-03 23:51:01 +01:00
# 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 $@ $<
2024-02-05 17:45:48 +01:00
2024-01-12 15:08:12 +01:00
2024-03-03 23:51:01 +01:00
.PHONY: distclean
distclean:
rm -rf "wiki"
rm -rf "dest