diff --git a/makefile b/makefile index 139e7d8..4777fb0 100644 --- a/makefile +++ b/makefile @@ -1,40 +1,27 @@ SHELL = /bin/sh -PANDOC = pandoc -PANDOCFLAGS = \ - --data-dir=.pandoc\ - --id-prefix=$*\ - --resource-path=.:$(dir $<) -IKIWIKIFLAGS = \ - $(PANDOCFLAGS)\ - --defaults=ikiwiki -MOODLEFLAGS = \ - $(PANDOCFLAGS)\ - --defaults=moodle +FLAGS = \ + --data-dir=pandoc\ + --resource-path=.:pandoc -all: wiki/*.mdwn refresh +.PHONY: wiki +wiki: wiki/* -wiki/%.mdwn: %/index.md - $(PANDOC) $(IKIWIKIFLAGS) -o $@ $< +# wiki +wiki/%.mdwn: notes/%.md notes/default.mdwn.yaml | refresh + pandoc $(FLAGS) --id-prefix=$* -d notes/default.mdwn.yaml -o $@ $< -wiki/%.mdwn: notes/%.md - $(PANDOC) $(IKIWIKIFLAGS) -o $@ $< - -dest/%.html: moodle/%.md - $(PANDOC) $(MOODLEFLAGS) -o $@ $< - -dest/%.docx: %/index.md - $(PANDOC) $(PANDOCFLAGS) -d $(dir $<)docx.yaml -o $@ $< - -dest/%.html: %/index.md - $(PANDOC) $(PANDOCFLAGS) -d $(dir $<)html.yaml -o $@ $< - -dest/%.pdf: %/index.md - $(PANDOC) $(PANDOCFLAGS) -d $(dir $<)pdf.yaml -o $@ $< +# dest +dest/%.docx: notes/%.md notes/default.docx.yaml + pandoc $(FLAGS) -d notes/default.docx.yaml -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