bavbavhaus.net/makefile

41 lines
800 B
Makefile

SHELL = /bin/sh
PANDOC = pandoc
PANDOCFLAGS = \
--data-dir=.pandoc\
--id-prefix=$*\
--resource-path=.:$(dir $<)
IKIWIKIFLAGS = \
$(PANDOCFLAGS)\
--defaults=ikiwiki
MOODLEFLAGS = \
$(PANDOCFLAGS)\
--defaults=moodle
all: wiki/*.mdwn refresh
wiki/%.mdwn: %/index.md
$(PANDOC) $(IKIWIKIFLAGS) -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 $@ $<
.PHONY: refresh
refresh:
ikiwiki --setup laptop.setup --refresh
.PHONY: clean
clean:
ikiwiki --setup laptop.setup --clean