diff options
author | Camil Staps | 2016-02-09 11:14:21 +0100 |
---|---|---|
committer | Camil Staps | 2016-02-09 11:14:21 +0100 |
commit | 8f0c6ca9285e1c25be154d6a4a6072a5ece2f084 (patch) | |
tree | f18f642db1f829c9b6de3db8a11252b7bd6cf0fa | |
parent | week 1 (diff) |
makefile
-rw-r--r-- | Makefile | 19 |
1 files changed, 19 insertions, 0 deletions
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 + |