[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 \
|
---|
| 14 | text/intro \
|
---|
| 15 | text/basics \
|
---|
[64b272a] | 16 | text/cforall \
|
---|
[27dde72] | 17 | text/concurrency \
|
---|
[dcfc4b35] | 18 | text/internals \
|
---|
[27dde72] | 19 | text/parallelism \
|
---|
[64b272a] | 20 | text/results \
|
---|
[d67cdb7] | 21 | text/together \
|
---|
| 22 | text/future \
|
---|
[694ee7d] | 23 | }
|
---|
| 24 |
|
---|
[27dde72] | 25 | FIGURES = ${addprefix build/, ${addsuffix .tex, \
|
---|
[b512454] | 26 | monitor \
|
---|
| 27 | ext_monitor \
|
---|
[21a1efb] | 28 | int_monitor \
|
---|
[3364962] | 29 | dependency \
|
---|
[27dde72] | 30 | }}
|
---|
[694ee7d] | 31 |
|
---|
[64b272a] | 32 | PICTURES = ${addprefix build/, ${addsuffix .pstex, \
|
---|
| 33 | system \
|
---|
[20ffcf3] | 34 | monitor_structs \
|
---|
[64b272a] | 35 | }}
|
---|
[694ee7d] | 36 |
|
---|
| 37 | PROGRAMS = ${addsuffix .tex, \
|
---|
| 38 | }
|
---|
| 39 |
|
---|
| 40 | GRAPHS = ${addsuffix .tex, \
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | ## Define the documents that need to be made.
|
---|
| 44 |
|
---|
[db0fa7c] | 45 | DOCUMENT = thesis.pdf
|
---|
[694ee7d] | 46 |
|
---|
| 47 | # Directives #
|
---|
| 48 |
|
---|
| 49 | all : ${DOCUMENT}
|
---|
| 50 |
|
---|
| 51 | clean :
|
---|
[27dde72] | 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 \
|
---|
[64b272a] | 72 | build/*.pstex \
|
---|
[27dde72] | 73 | build/*.pstex_t \
|
---|
| 74 | build/*.tex \
|
---|
| 75 | build/*.toc \
|
---|
[ff98952] | 76 |
|
---|
[694ee7d] | 77 |
|
---|
| 78 | # File Dependencies #
|
---|
| 79 |
|
---|
[db0fa7c] | 80 | ${DOCUMENT} : build/${basename ${DOCUMENT}}.ps
|
---|
[694ee7d] | 81 | ps2pdf $<
|
---|
| 82 |
|
---|
[27dde72] | 83 | build/${basename ${DOCUMENT}}.ps : build/${basename ${DOCUMENT}}.dvi
|
---|
[694ee7d] | 84 | dvips $< -o $@
|
---|
| 85 |
|
---|
[b3ffb61] | 86 | build/${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${basename ${DOCUMENT}}.tex ../../LaTeXmacros/common.tex ../../LaTeXmacros/indexstyle annex/local.bib
|
---|
[27dde72] | 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
|
---|
[ff98952] | 93 | @ echo "Citation Pass 2"
|
---|
[27dde72] | 94 | @ ${LaTeX} ${basename ${notdir $@}}.tex
|
---|
| 95 | @ -${BibTeX} ${basename $@}
|
---|
[ff98952] | 96 | @ echo "Glossary"
|
---|
[b3ffb61] | 97 | @ makeglossaries -q -s ${basename $@}.ist ${basename $@} # Make index from *.aux entries and input index at end of document
|
---|
[ff98952] | 98 | @ echo ".dvi generation"
|
---|
[27dde72] | 99 | @ -build/bump_ver.sh
|
---|
| 100 | @ ${LaTeX} ${basename ${notdir $@}}.tex # Run again to get index title into table of contents
|
---|
[c69adb7] | 101 |
|
---|
[694ee7d] | 102 |
|
---|
| 103 | predefined :
|
---|
| 104 | sed -f predefined.sed ${basename ${DOCUMENT}}.tex > ${basename $@}.cf
|
---|
| 105 |
|
---|
| 106 | ## Define the default recipes.
|
---|
| 107 |
|
---|
[27dde72] | 108 | build/%.tex : figures/%.fig
|
---|
[694ee7d] | 109 | fig2dev -L eepic $< > $@
|
---|
| 110 |
|
---|
[27dde72] | 111 | build/%.ps : figures/%.fig
|
---|
[694ee7d] | 112 | fig2dev -L ps $< > $@
|
---|
| 113 |
|
---|
[27dde72] | 114 | build/%.pstex : figures/%.fig
|
---|
[694ee7d] | 115 | fig2dev -L pstex $< > $@
|
---|
| 116 | fig2dev -L pstex_t -p $@ $< > $@_t
|
---|
| 117 |
|
---|
[9b4343e] | 118 |
|
---|
[694ee7d] | 119 | # Local Variables: #
|
---|
| 120 | # compile-command: "make" #
|
---|
| 121 | # End: #
|
---|