update `Makefile`

master
urosm 2024-03-03 23:51:01 +01:00
parent fe9b5cee12
commit 47c91cb071
1 changed files with 49 additions and 33 deletions

View File

@ -1,53 +1,69 @@
SHELL = /bin/sh
FLAGS = --data-dir=pandoc\
--resource-path=.:pandoc
IKIWIKISETUPFILE = bavbavhaus.net.local.setup
# ikiwiki
.PHONY: all
all: dest/* wiki/* refresh
# wiki
wiki/%.mdwn: notes/%.md\
notes/default.mdwn.yaml\
pandoc/templates/ikiwiki.markdown\
pandoc/csl/chicago-fullnote-sl.csl\
pandoc/filters/pandoc-quotes.lua\
IkiWiki/Plugin/*\
css/*\
tmpl/*\
| wiki
pandoc $(FLAGS) --id-prefix=$* -d notes/default.mdwn.yaml -o $@ $<
all: wiki\
$(patsubst notes/%.md,wiki/%.mdwn,$(wildcard notes/*.md))\
refresh
wiki:
mkdir 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\
notes/default.docx.yaml\
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 $(FLAGS) -d notes/default.docx.yaml -o $@ $<
pandoc --data-dir=pandoc -ddocx -o $@ $<
# pdf
dest/%.pdf: notes/%.md\
notes/default.pdf.yaml\
pandoc/defaults/pdf.yaml\
pandoc/csl/chicago-fullnote-sl.csl\
| dest
pandoc $(FLAGS) -d notes/default.pdf.yaml -o $@ $<
pandoc --data-dir=pandoc -dpdf -o $@ $<
dest:
mkdir dest
# 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: refresh
refresh:
ikiwiki --setup laptop.setup --refresh
.PHONY: rebuild
rebuild:
ikiwiki --setup laptop.setup --rebuild
.PHONY: clean
clean:
ikiwiki --setup laptop.setup --clean
.PHONY: distclean
distclean:
rm -rf "wiki"
rm -rf "dest