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