diff options
Diffstat (limited to '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 + |