-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
33 lines (25 loc) · 895 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
DOCS = install-guide-linux.tex install-guide-windows.tex
LATEX = latex
PDFLATEX = pdflatex
# FIXME: nonstopmodeis necessary because includegraphics wants a "bb"
# bounding box option for including png images, which is missing in our .tex
# file. But we don't want to include the size of each image in there, since
# by default it finds out the bounding box just fine.
#
# Unfortunately this means we can't know whether LaTeX threw up any other
# errors.
LATEX_OPTS = -interaction=nonstopmode
all: $(DOCS:.tex=.pdf)
%.pdf: %.tex
while ($(PDFLATEX) $(LATEX_OPTS) $< ; \
grep -q "Rerun to get cross" $(<:.tex=.log)) do true; \
done
%.d: %.tex
-$(LATEX) $(LATEX_OPTS) $<
echo -n "$(<:.tex=.pdf): " > $@
sed -ne '/^File: \./{s/.*: //;s/ .*/ \\/;p}' \
$(<:.tex=.log) >> $@
clean:
rm -f *.d *.aux *.dvi *.log *.lof *.out *.toc *.pdf *.idx
.PHONY: all clean
-include $(DOCS:.tex=.d)