bavbavhaus.net/Makefile

31 lines
700 B
Makefile
Raw Normal View History

2024-04-12 22:28:47 +02:00
.SUFFIXES:
2024-05-21 00:58:38 +02:00
.PHONY: all
2024-06-08 23:02:47 +02:00
all: dependencies.mk
2024-05-17 15:35:32 +02:00
2024-06-08 23:02:47 +02:00
dependencies.mk:
pandoc lua pandoc/dependencies.lua index.md $@
2024-04-12 22:28:47 +02:00
2024-06-08 23:02:47 +02:00
include dependencies.mk
2024-05-21 00:58:38 +02:00
2024-06-08 23:02:47 +02:00
PANDOCFLAGS := --data-dir pandoc
BAVBAVHAUSFLAGS = $(PANDOCFLAGS) -M slug=$*
2024-05-04 19:25:10 +02:00
2024-06-08 23:02:47 +02:00
public_html/%.html: parts = $(filter-out $<,$^)
public_html/%.html: %.md
pandoc $(BAVBAVHAUSFLAGS) -d bavbavhaus.net.yaml $(patsubst %,-M parts=%,$(parts)) -o $@ $<
2024-04-12 22:28:47 +02:00
2024-05-02 20:10:51 +02:00
public_html/%.html.part: %.md
2024-05-21 00:58:38 +02:00
pandoc $(BAVBAVHAUSFLAGS) -d bavbavhaus.net.part.yaml --id-prefix $* -o $@ $<
2024-05-16 23:05:10 +02:00
dest/%.docx: %.md
test -d dest || mkdir dest
2024-06-08 23:02:47 +02:00
pandoc $(PANDOCFLAGS) -d docx.yaml -o $@ $<
2024-04-12 22:28:47 +02:00
2024-04-22 15:16:39 +02:00
.PHONY: clean
2024-05-02 20:10:51 +02:00
clean:
2024-06-08 23:02:47 +02:00
$(RM) dependencies.mk
2024-05-02 20:10:51 +02:00
$(RM) public_html/*.html
2024-05-21 00:58:38 +02:00
$(RM) public_html/*.html.part
2024-05-16 23:05:10 +02:00
$(RM) -r dest