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