aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..3995af0
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+
+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)/%.pdf: ${BUILDDIR}/%.ps
+ ps2pdf $< $@
+
+clean:
+ rm -f ${BUILDDIR}/*.ps ${BUILDDIR}/*.pdf
+