[694ee7d] | 1 | ## Define the appropriate configuration variables. |
---|
| 2 | |
---|
[c69adb7] | 3 | TeXLIB = .:../../LaTeXmacros:../../LaTeXmacros/listings:../../LaTeXmacros/enumitem:~/bibliographies: |
---|
[694ee7d] | 4 | LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error |
---|
| 5 | BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex |
---|
| 6 | |
---|
| 7 | ## Define the text source files. |
---|
| 8 | |
---|
| 9 | SOURCES = ${addsuffix .tex, \ |
---|
[db0fa7c] | 10 | thesis \ |
---|
[687165a] | 11 | style \ |
---|
[0f9bef3] | 12 | cfa-format \ |
---|
[687165a] | 13 | glossary \ |
---|
[694ee7d] | 14 | } |
---|
| 15 | |
---|
| 16 | FIGURES = ${addsuffix .tex, \ |
---|
[b512454] | 17 | monitor \ |
---|
| 18 | ext_monitor \ |
---|
[694ee7d] | 19 | } |
---|
| 20 | |
---|
| 21 | PICTURES = ${addsuffix .pstex, \ |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | PROGRAMS = ${addsuffix .tex, \ |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | GRAPHS = ${addsuffix .tex, \ |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | ## Define the documents that need to be made. |
---|
| 31 | |
---|
[db0fa7c] | 32 | DOCUMENT = thesis.pdf |
---|
[694ee7d] | 33 | |
---|
| 34 | # Directives # |
---|
| 35 | |
---|
| 36 | all : ${DOCUMENT} |
---|
| 37 | |
---|
| 38 | clean : |
---|
[b512454] | 39 | rm -f *.bbl *.aux *.dvi *.idx *.ilg *.ind *.brf *.out *.log *.toc *.blg *.pstex_t *.cf *.glg *.glo *.gls *.ist *.acn *.acr *.alg \ |
---|
[694ee7d] | 40 | ${FIGURES} ${PICTURES} ${PROGRAMS} ${GRAPHS} ${basename ${DOCUMENT}}.ps ${DOCUMENT} |
---|
| 41 | |
---|
| 42 | # File Dependencies # |
---|
| 43 | |
---|
[db0fa7c] | 44 | ${DOCUMENT} : build/${basename ${DOCUMENT}}.ps |
---|
[694ee7d] | 45 | ps2pdf $< |
---|
| 46 | |
---|
[db0fa7c] | 47 | build/${basename ${DOCUMENT}}.ps : ${basename ${DOCUMENT}}.dvi |
---|
[694ee7d] | 48 | dvips $< -o $@ |
---|
| 49 | |
---|
[db0fa7c] | 50 | build/${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${basename ${DOCUMENT}}.tex \ |
---|
[694ee7d] | 51 | ../../LaTeXmacros/common.tex ../../LaTeXmacros/indexstyle |
---|
[db0fa7c] | 52 | # Conditionally create the build folder |
---|
| 53 | if [ ! -r build ] ; then mkdir build ; fi |
---|
| 54 | # # Conditionally create an empty *.ind (index) file for inclusion until makeindex is run. |
---|
| 55 | # if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi |
---|
| 56 | # # Must have *.aux file containing citations for bibtex |
---|
| 57 | # if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi |
---|
| 58 | # -${BibTeX} ${basename $@} |
---|
| 59 | # # Some citations reference others so run steps again to resolve these citations |
---|
| 60 | # ${LaTeX} ${basename $@}.tex |
---|
| 61 | # -${BibTeX} ${basename $@} |
---|
| 62 | # # Make index from *.aux entries and input index at end of document |
---|
| 63 | # makeglossaries ${basename $@} |
---|
| 64 | # #${LaTeX} ${basename $@}.tex |
---|
| 65 | # # Run again to get index title into table of contents |
---|
| 66 | # ${LaTeX} ${basename $@}.tex |
---|
| 67 | # -./bump_ver.sh |
---|
| 68 | # ${LaTeX} ${basename $@}.tex |
---|
[c69adb7] | 69 | |
---|
[694ee7d] | 70 | |
---|
| 71 | predefined : |
---|
| 72 | sed -f predefined.sed ${basename ${DOCUMENT}}.tex > ${basename $@}.cf |
---|
| 73 | |
---|
| 74 | ## Define the default recipes. |
---|
| 75 | |
---|
[db0fa7c] | 76 | build/%.tex : %.fig |
---|
[694ee7d] | 77 | fig2dev -L eepic $< > $@ |
---|
| 78 | |
---|
[db0fa7c] | 79 | build/%.ps : %.fig |
---|
[694ee7d] | 80 | fig2dev -L ps $< > $@ |
---|
| 81 | |
---|
[db0fa7c] | 82 | build/%.pstex : %.fig |
---|
[694ee7d] | 83 | fig2dev -L pstex $< > $@ |
---|
| 84 | fig2dev -L pstex_t -p $@ $< > $@_t |
---|
| 85 | |
---|
[9b4343e] | 86 | |
---|
[694ee7d] | 87 | # Local Variables: # |
---|
| 88 | # compile-command: "make" # |
---|
| 89 | # End: # |
---|