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