| [484ee53] | 1 | ## Define the configuration variables.
 | 
|---|
| [2298a7b8] | 2 | 
 | 
|---|
| [484ee53] | 3 | Build = build
 | 
|---|
 | 4 | Figures = figures
 | 
|---|
 | 5 | Macros = ../../LaTeXmacros
 | 
|---|
 | 6 | Bib = ../../bibliography
 | 
|---|
| [2298a7b8] | 7 | 
 | 
|---|
| [484ee53] | 8 | TeXLIB = .:${Macros}:${MACROS}/listings:${MACROS}/enumitem:${Bib}/:
 | 
|---|
 | 9 | LaTeX  = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build}
 | 
|---|
| [2298a7b8] | 10 | BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex
 | 
|---|
 | 11 | 
 | 
|---|
| [484ee53] | 12 | MAKEFLAGS = --no-print-directory # --silent
 | 
|---|
 | 13 | VPATH = ${Build} ${Figures}
 | 
|---|
 | 14 | 
 | 
|---|
| [2298a7b8] | 15 | ## Define the text source files.
 | 
|---|
 | 16 | 
 | 
|---|
 | 17 | SOURCES = ${addsuffix .tex, \
 | 
|---|
 | 18 | ctor \
 | 
|---|
 | 19 | }
 | 
|---|
 | 20 | 
 | 
|---|
 | 21 | FIGURES = ${addsuffix .tex, \
 | 
|---|
 | 22 | }
 | 
|---|
 | 23 | 
 | 
|---|
 | 24 | PICTURES = ${addsuffix .pstex, \
 | 
|---|
 | 25 | }
 | 
|---|
 | 26 | 
 | 
|---|
 | 27 | PROGRAMS = ${addsuffix .tex, \
 | 
|---|
 | 28 | }
 | 
|---|
 | 29 | 
 | 
|---|
 | 30 | GRAPHS = ${addsuffix .tex, \
 | 
|---|
 | 31 | }
 | 
|---|
 | 32 | 
 | 
|---|
 | 33 | ## Define the documents that need to be made.
 | 
|---|
 | 34 | 
 | 
|---|
 | 35 | DOCUMENT = ctor.pdf
 | 
|---|
| [484ee53] | 36 | BASE = ${basename ${DOCUMENT}}
 | 
|---|
| [2298a7b8] | 37 | 
 | 
|---|
 | 38 | # Directives #
 | 
|---|
 | 39 | 
 | 
|---|
| [484ee53] | 40 | .PHONY : all clean                                      # not file names
 | 
|---|
 | 41 | 
 | 
|---|
| [2298a7b8] | 42 | all : ${DOCUMENT}
 | 
|---|
 | 43 | 
 | 
|---|
 | 44 | clean :
 | 
|---|
| [484ee53] | 45 |         @rm -frv ${DOCUMENT} ${BASE}.ps ${Build}
 | 
|---|
| [2298a7b8] | 46 | 
 | 
|---|
 | 47 | # File Dependencies #
 | 
|---|
 | 48 | 
 | 
|---|
| [484ee53] | 49 | ${DOCUMENT} : ${BASE}.ps
 | 
|---|
| [2298a7b8] | 50 |         ps2pdf $<
 | 
|---|
 | 51 | 
 | 
|---|
| [484ee53] | 52 | ${BASE}.ps : ${BASE}.dvi
 | 
|---|
 | 53 |         dvips ${Build}/$< -o $@
 | 
|---|
| [2298a7b8] | 54 | 
 | 
|---|
| [484ee53] | 55 | ${BASE}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} \
 | 
|---|
 | 56 |                 ${Macros}/common.tex ${Macros}/indexstyle ${Bib}/pl.bib | ${Build}
 | 
|---|
| [2298a7b8] | 57 |         # Conditionally create an empty *.ind (index) file for inclusion until makeindex is run.
 | 
|---|
| [484ee53] | 58 |         #if [ ! -r ${basename $@}.ind ] ; then touch ${Build}/${basename $@}.ind ; fi
 | 
|---|
| [2298a7b8] | 59 |         # Must have *.aux file containing citations for bibtex
 | 
|---|
 | 60 |         if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi
 | 
|---|
| [484ee53] | 61 |         -${BibTeX} ${Build}/${basename $@}
 | 
|---|
 | 62 |         # Some citations reference others so run again to resolve these citations
 | 
|---|
| [2298a7b8] | 63 |         ${LaTeX} ${basename $@}.tex
 | 
|---|
| [484ee53] | 64 |         -${BibTeX} ${Build}/${basename $@}
 | 
|---|
| [2298a7b8] | 65 |         # Make index from *.aux entries and input index at end of document
 | 
|---|
| [484ee53] | 66 |         #makeindex -s ${Macros}/indexstyle ${Build}/${basename $@}.idx
 | 
|---|
 | 67 |         # Run again to finish citations
 | 
|---|
| [2298a7b8] | 68 |         ${LaTeX} ${basename $@}.tex
 | 
|---|
 | 69 |         # Run again to get index title into table of contents
 | 
|---|
 | 70 |         ${LaTeX} ${basename $@}.tex
 | 
|---|
 | 71 | 
 | 
|---|
 | 72 | predefined :
 | 
|---|
 | 73 |         sed -f predefined.sed ${basename ${DOCUMENT}}.tex > ${basename $@}.cf
 | 
|---|
 | 74 | 
 | 
|---|
 | 75 | ## Define the default recipes.
 | 
|---|
 | 76 | 
 | 
|---|
| [484ee53] | 77 | ${Build}:
 | 
|---|
 | 78 |         mkdir -p ${Build}
 | 
|---|
 | 79 | 
 | 
|---|
 | 80 | %.tex : %.fig | ${Build}
 | 
|---|
 | 81 |         fig2dev -L eepic $< > ${Build}/$@
 | 
|---|
| [2298a7b8] | 82 | 
 | 
|---|
| [484ee53] | 83 | %.ps : %.fig | ${Build}
 | 
|---|
 | 84 |         fig2dev -L ps $< > ${Build}/$@
 | 
|---|
| [2298a7b8] | 85 | 
 | 
|---|
| [484ee53] | 86 | %.pstex : %.fig | ${Build}
 | 
|---|
 | 87 |         fig2dev -L pstex $< > ${Build}/$@
 | 
|---|
 | 88 |         fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t
 | 
|---|
| [2298a7b8] | 89 | 
 | 
|---|
 | 90 | # Local Variables: #
 | 
|---|
 | 91 | # compile-command: "make" #
 | 
|---|
 | 92 | # End: #
 | 
|---|