update `Makefile`
parent
2e083e4548
commit
cda41c8fec
25
Makefile
25
Makefile
|
@ -1,33 +1,30 @@
|
|||
SHELL = /bin/sh
|
||||
.SUFFIXES:
|
||||
|
||||
.PHONY: all
|
||||
all: bavbavhaus.mk
|
||||
all: dependencies.mk
|
||||
|
||||
bavbavhaus.mk:
|
||||
pandoc lua pandoc/bavbavhaus.lua index.md $@
|
||||
dependencies.mk:
|
||||
pandoc lua pandoc/dependencies.lua index.md $@
|
||||
|
||||
include bavbavhaus.mk
|
||||
include dependencies.mk
|
||||
|
||||
BAVBAVHAUSFLAGS = --data-dir pandoc -M slug=$*
|
||||
LINKPARTFLAGS = $(patsubst %,-M parts=%,$(filter-out $<,$^))
|
||||
PANDOCFLAGS := --data-dir pandoc
|
||||
BAVBAVHAUSFLAGS = $(PANDOCFLAGS) -M slug=$*
|
||||
|
||||
public_html/%.html:
|
||||
pandoc $(BAVBAVHAUSFLAGS) -d bavbavhaus.net.yaml $(LINKPARTFLAGS) -o $@ $<
|
||||
public_html/%.html: parts = $(filter-out $<,$^)
|
||||
public_html/%.html: %.md
|
||||
pandoc $(BAVBAVHAUSFLAGS) -d bavbavhaus.net.yaml $(patsubst %,-M parts=%,$(parts)) -o $@ $<
|
||||
|
||||
public_html/%.html.part: %.md
|
||||
pandoc $(BAVBAVHAUSFLAGS) -d bavbavhaus.net.part.yaml --id-prefix $* -o $@ $<
|
||||
|
||||
public_html/sitemap.html.part:
|
||||
pandoc lua pandoc/sitemap.lua index.md $@
|
||||
|
||||
dest/%.docx: %.md
|
||||
test -d dest || mkdir dest
|
||||
pandoc $(PANDOCFLAGS) --resource-path pandoc -d docx.yaml -o $@ $<
|
||||
pandoc $(PANDOCFLAGS) -d docx.yaml -o $@ $<
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) bavbavhaus.mk
|
||||
$(RM) dependencies.mk
|
||||
$(RM) public_html/*.html
|
||||
$(RM) public_html/*.html.part
|
||||
$(RM) -r dest
|
||||
|
|
Loading…
Reference in New Issue