1 | ## Define the appropriate configuration variables.
|
---|
2 |
|
---|
3 | TeXLIB = .:./style:./text:./annex:./build:../../LaTeXmacros:../../LaTeXmacros/listings:../../LaTeXmacros/enumitem:~/bibliographies:
|
---|
4 | LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=build -interaction=nonstopmode
|
---|
5 | BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex -terse
|
---|
6 |
|
---|
7 | ## Define the text source files.
|
---|
8 |
|
---|
9 | SOURCES = ${addsuffix .tex, \
|
---|
10 | thesis \
|
---|
11 | style/style \
|
---|
12 | style/cfa-format \
|
---|
13 | annex/glossary \
|
---|
14 | text/intro \
|
---|
15 | text/cforall \
|
---|
16 | text/basics \
|
---|
17 | text/concurrency \
|
---|
18 | text/parallelism \
|
---|
19 | text/together \
|
---|
20 | text/future \
|
---|
21 | }
|
---|
22 |
|
---|
23 | FIGURES = ${addprefix build/, ${addsuffix .tex, \
|
---|
24 | monitor \
|
---|
25 | ext_monitor \
|
---|
26 | int_monitor \
|
---|
27 | }}
|
---|
28 |
|
---|
29 | PICTURES = ${addsuffix .pstex, \
|
---|
30 | }
|
---|
31 |
|
---|
32 | PROGRAMS = ${addsuffix .tex, \
|
---|
33 | }
|
---|
34 |
|
---|
35 | GRAPHS = ${addsuffix .tex, \
|
---|
36 | }
|
---|
37 |
|
---|
38 | ## Define the documents that need to be made.
|
---|
39 |
|
---|
40 | DOCUMENT = thesis.pdf
|
---|
41 |
|
---|
42 | # Directives #
|
---|
43 |
|
---|
44 | all : ${DOCUMENT}
|
---|
45 |
|
---|
46 | clean :
|
---|
47 | @rm -fv ${DOCUMENT} \
|
---|
48 | build/*.acn \
|
---|
49 | build/*.acr \
|
---|
50 | build/*.alg \
|
---|
51 | build/*.aux \
|
---|
52 | build/*.bbl \
|
---|
53 | build/*.blg \
|
---|
54 | build/*.brf \
|
---|
55 | build/*.cf \
|
---|
56 | build/*.dvi \
|
---|
57 | build/*.glg \
|
---|
58 | build/*.glo \
|
---|
59 | build/*.gls \
|
---|
60 | build/*.ist \
|
---|
61 | build/*.idx \
|
---|
62 | build/*.ilg \
|
---|
63 | build/*.ind \
|
---|
64 | build/*.log \
|
---|
65 | build/*.out \
|
---|
66 | build/*.ps \
|
---|
67 | build/*.pstex_t \
|
---|
68 | build/*.tex \
|
---|
69 | build/*.toc \
|
---|
70 |
|
---|
71 |
|
---|
72 | # File Dependencies #
|
---|
73 |
|
---|
74 | ${DOCUMENT} : build/${basename ${DOCUMENT}}.ps
|
---|
75 | ps2pdf $<
|
---|
76 |
|
---|
77 | build/${basename ${DOCUMENT}}.ps : build/${basename ${DOCUMENT}}.dvi
|
---|
78 | dvips $< -o $@
|
---|
79 |
|
---|
80 | build/${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${basename ${DOCUMENT}}.tex ../../LaTeXmacros/common.tex ../../LaTeXmacros/indexstyle
|
---|
81 |
|
---|
82 | @ if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi # Conditionally create an empty *.ind (index) file for inclusion until makeindex is run.
|
---|
83 | @ echo "Citation lookup" # Must have *.aux file containing citations for bibtex
|
---|
84 | @ if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename ${notdir $@}}.tex ; fi
|
---|
85 | @ echo "Citation Pass 1"
|
---|
86 | @ -${BibTeX} ${basename $@} # Some citations reference others so run steps again to resolve these citations
|
---|
87 | @ echo "Citation Pass 2"
|
---|
88 | @ ${LaTeX} ${basename ${notdir $@}}.tex
|
---|
89 | @ -${BibTeX} ${basename $@}
|
---|
90 | @ echo "Glossary"
|
---|
91 | makeglossaries -q -s ${basename $@}.ist ${basename $@} # Make index from *.aux entries and input index at end of document
|
---|
92 | @ echo ".dvi generation"
|
---|
93 | @ -build/bump_ver.sh
|
---|
94 | @ ${LaTeX} ${basename ${notdir $@}}.tex # Run again to get index title into table of contents
|
---|
95 |
|
---|
96 |
|
---|
97 | predefined :
|
---|
98 | sed -f predefined.sed ${basename ${DOCUMENT}}.tex > ${basename $@}.cf
|
---|
99 |
|
---|
100 | ## Define the default recipes.
|
---|
101 |
|
---|
102 | build/%.tex : figures/%.fig
|
---|
103 | fig2dev -L eepic $< > $@
|
---|
104 |
|
---|
105 | build/%.ps : figures/%.fig
|
---|
106 | fig2dev -L ps $< > $@
|
---|
107 |
|
---|
108 | build/%.pstex : figures/%.fig
|
---|
109 | fig2dev -L pstex $< > $@
|
---|
110 | fig2dev -L pstex_t -p $@ $< > $@_t
|
---|
111 |
|
---|
112 |
|
---|
113 | # Local Variables: #
|
---|
114 | # compile-command: "make" #
|
---|
115 | # End: #
|
---|