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