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