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