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