From 8f0c6ca9285e1c25be154d6a4a6072a5ece2f084 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 9 Feb 2016 11:14:21 +0100 Subject: makefile --- Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..879e180 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +TARGET=$(subst .tex,.pdf,$(wildcard *.tex)) + +all: $(TARGET) + +%.dep: %.tex + perl -lnwe 'print "$*.pdf: $$1" if /\\input{([\w-]+\.tex)}/' <$< >$@ + +include $(TARGET:.pdf=.dep) + +%.pdf : %.tex + pdflatex $< + pdflatex $< + +clean: + latexmk -c + rm -f *.dep + +.PHONY: clean + -- cgit v1.2.3