summaryrefslogtreecommitdiff
path: root/Makefile
blob: e545cdf28c474719df960c1d5e8335c937009a99 (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