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