This repository has been archived by the owner on Apr 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
57 lines (45 loc) · 1.56 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
LATEX = latex -src
DVIPS = dvips -Ppdf -G0
PS2PDF = ps2pdf14 -sPAPERSIZE=a4
PDFLATEX = pdflatex -ta4
RERUN = "(There were undefined references|Rerun to get (cross-references|the bars) right)"
RERUNBIB = "No file.*\.bbl|Citation.*undefined"
TEXVARS= \
TEXINPUTS=".:$(realpath ./RR-Inria-5.1):" \
TEXPICTS=".:$(realpath ./RR-Inria-5.1):"
.SUFFIXES: #blanks suffixes
.SUFFIXES: .tex .dvi .ps .pdf
%.dvi: %.tex $(wildcard *.tex)
TEXINPUTS=".:$(realpath ./RR-Inria-5.1):" $(LATEX) $*
egrep -c $(RERUNBIB) $*.log && (bibtex $*;latex $<); true
egrep $(RERUN) $*.log && $(TEXVARS) $(LATEX) $* ; true
egrep $(RERUN) $*.log && $(TEXVARS) $(LATEX) $* ; true
.dvi.ps:
$(TEXVARS) $(DVIPS) $* -o $*.ps
.dvi.pdf:
$(TEXVARS) dvipdf $*.dvi
.ps.pdf:
$(PS2PDF) $*.ps $*.pdf
pdffast: pdflatex
fast:
$(TEXVARS) $(LATEX) main
$(TEXVARS) $(DVIPS) -o main.ps main
# This target produces a PDF that is likely to be printable in the MSR-Inria
# lab. The chain DVI -> PS -> PDF generates an unprintable doc here in Orsay.
# Bonus: you also get working hyperlinks
pdflatex:
$(TEXVARS) $(PDFLATEX) main
pdf: main.pdf
all: main.pdf main.ps main.dvi
np: # does without bibtex (!) & paper format
$(TEXVARS) $(LATEX) main
egrep $(RERUN) main.log && $(TEXVARS) $(LATEX) main ; true
egrep $(RERUN) main.log && $(TEXVARS) $(LATEX) main ; true
$(DVIPS) main -o main.ps
$(PS2PDF) main.ps main.pdf
files-in-the-dist:
grep 'item *{ *\\tt' usage.tex | \
sed 's/\\item *{ *\\tt *\([a-z\\_]*\).*/theories\/\1.v/' | \
sed 's/\\_/_/' | sort
clean:
rm -f *log *aux main.ps main.dvi main.pdf