summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCamil Staps2016-01-14 00:02:26 +0100
committerCamil Staps2016-01-14 00:02:26 +0100
commit7444dca08c89da81255000b0b072b2c0ba1c9f75 (patch)
tree903547988563a1bbc90bba2b7cbab0918e362cec /Makefile
parentSection 1 (diff)
Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..477790f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+TARGET=$(subst .tex,.pdf,$(wildcard *.tex))
+
+all: $(TARGET)
+
+%.dep: %.tex
+ perl -lnwe 'print "$*.pdf: $$1" if /\\input{([\w-]+\.tex)}/' <$< >$@
+
+include $(TARGET:.pdf=.dep)
+
+genesis.pdf : genesis.tex
+ xelatex $<
+ xelatex $<
+
+%.pdf : %.tex
+ pdflatex $<
+ pdflatex $<
+
+clean:
+ latexmk -c
+ rm -f *.dep
+
+.PHONY: clean
+