summaryrefslogtreecommitdiff
path: root/Makefile
blob: 879e180a22cbeba64d55bec9e6e4b2cef9a3d777 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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