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