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