aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 3689b4bd41d62cd0f9e6a01fbd1ba2ed532ad2d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
BUILDDIR = build

PS_TARGETS = $(patsubst designs/%.yaml,$(BUILDDIR)/%.ps,$(wildcard designs/*.yaml))
PDF_TARGETS = $(patsubst designs/%.yaml,$(BUILDDIR)/%.pdf,$(wildcard designs/*.yaml))

.PHONY: all ps pdf clean
all: pdf
ps: $(PS_TARGETS)
pdf: $(PDF_TARGETS)

$(BUILDDIR)/%.ps: designs/%.yaml
	mkdir -p ${BUILDDIR}
	./bin/render -o $@ $<

$(BUILDDIR)/%-a4.pdf: ${BUILDDIR}/%-a4.ps
	ps2pdf $< $@

$(BUILDDIR)/%-a5.pdf: ${BUILDDIR}/%-a5.ps
	ps2pdf -sPAPERSIZE=a5 $< $@

$(BUILDDIR)/%-a6.pdf: ${BUILDDIR}/%-a6.ps
	ps2pdf -sPAPERSIZE=a6 $< $@

clean:
	rm -f ${BUILDDIR}/*.ps ${BUILDDIR}/*.pdf