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