| [a43dd54] | 1 | ## Define the configuration variables.
 | 
|---|
 | 2 | 
 | 
|---|
 | 3 | Build = build
 | 
|---|
| [5ff188f] | 4 | Figures = figures
 | 
|---|
| [d046db2] | 5 | Macros = ../AMA/AMA-stix/ama
 | 
|---|
| [aac7197] | 6 | TeXLIB = .:annex:../../LaTeXmacros:${Macros}:${Build}:../../bibliography:
 | 
|---|
| [5ff188f] | 7 | LaTeX  = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build}
 | 
|---|
| [a43dd54] | 8 | BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex
 | 
|---|
 | 9 | 
 | 
|---|
| [d5ccbe9] | 10 | MAKEFLAGS = --no-print-directory # --silent
 | 
|---|
| [23c27039] | 11 | VPATH = ${Build} ${Figures}
 | 
|---|
| [a43dd54] | 12 | 
 | 
|---|
 | 13 | ## Define the text source files.
 | 
|---|
 | 14 | 
 | 
|---|
 | 15 | SOURCES = ${addsuffix .tex, \
 | 
|---|
 | 16 | Paper \
 | 
|---|
 | 17 | style/style \
 | 
|---|
 | 18 | style/cfa-format \
 | 
|---|
 | 19 | }
 | 
|---|
 | 20 | 
 | 
|---|
 | 21 | FIGURES = ${addsuffix .tex, \
 | 
|---|
 | 22 | monitor \
 | 
|---|
 | 23 | ext_monitor \
 | 
|---|
 | 24 | int_monitor \
 | 
|---|
 | 25 | dependency \
 | 
|---|
 | 26 | }
 | 
|---|
 | 27 | 
 | 
|---|
 | 28 | PICTURES = ${addsuffix .pstex, \
 | 
|---|
 | 29 | system \
 | 
|---|
 | 30 | monitor_structs \
 | 
|---|
 | 31 | }
 | 
|---|
 | 32 | 
 | 
|---|
 | 33 | PROGRAMS = ${addsuffix .tex, \
 | 
|---|
 | 34 | }
 | 
|---|
 | 35 | 
 | 
|---|
 | 36 | GRAPHS = ${addsuffix .tex, \
 | 
|---|
 | 37 | }
 | 
|---|
 | 38 | 
 | 
|---|
 | 39 | ## Define the documents that need to be made.
 | 
|---|
 | 40 | 
 | 
|---|
 | 41 | DOCUMENT = Paper.pdf
 | 
|---|
| [d5ccbe9] | 42 | BASE = ${basename ${DOCUMENT}}
 | 
|---|
| [a43dd54] | 43 | 
 | 
|---|
 | 44 | # Directives #
 | 
|---|
 | 45 | 
 | 
|---|
| [5ff188f] | 46 | .PHONY : all clean                                      # not file names
 | 
|---|
| [a43dd54] | 47 | 
 | 
|---|
 | 48 | all : ${DOCUMENT}
 | 
|---|
 | 49 | 
 | 
|---|
 | 50 | clean :
 | 
|---|
| [d5ccbe9] | 51 |         @rm -frv ${DOCUMENT} ${BASE}.ps WileyNJD-AMA.bst ${BASE}.out.ps ${Build}
 | 
|---|
| [a43dd54] | 52 | 
 | 
|---|
 | 53 | # File Dependencies #
 | 
|---|
 | 54 | 
 | 
|---|
| [d5ccbe9] | 55 | ${DOCUMENT} : ${BASE}.ps
 | 
|---|
| [a43dd54] | 56 |         ps2pdf $<
 | 
|---|
 | 57 | 
 | 
|---|
| [d5ccbe9] | 58 | ${BASE}.ps : ${BASE}.dvi
 | 
|---|
| [a43dd54] | 59 |         dvips ${Build}/$< -o $@
 | 
|---|
 | 60 | 
 | 
|---|
| [d5ccbe9] | 61 | ${BASE}.dvi : Makefile ${Build} ${BASE}.out.ps WileyNJD-AMA.bst ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} \
 | 
|---|
 | 62 |                 annex/local.bib ../../bibliography/pl.bib
 | 
|---|
| [5ff188f] | 63 |         # Must have *.aux file containing citations for bibtex
 | 
|---|
 | 64 |         if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi
 | 
|---|
| [d5ccbe9] | 65 |         ${BibTeX} ${Build}/${basename $@}
 | 
|---|
| [5ff188f] | 66 |         # Some citations reference others so run again to resolve these citations
 | 
|---|
| [a43dd54] | 67 |         ${LaTeX} ${basename $@}.tex
 | 
|---|
| [d5ccbe9] | 68 |         ${BibTeX} ${Build}/${basename $@}
 | 
|---|
| [5ff188f] | 69 |         # Run again to finish citations
 | 
|---|
 | 70 |         ${LaTeX} ${basename $@}.tex
 | 
|---|
| [a43dd54] | 71 | 
 | 
|---|
 | 72 | ## Define the default recipes.
 | 
|---|
 | 73 | 
 | 
|---|
 | 74 | ${Build}:
 | 
|---|
 | 75 |         mkdir -p ${Build}
 | 
|---|
 | 76 | 
 | 
|---|
| [fb16d5c] | 77 | ${BASE}.out.ps: ${Build}
 | 
|---|
 | 78 |         ln -fs ${Build}/Paper.out.ps .
 | 
|---|
| [d5ccbe9] | 79 | 
 | 
|---|
 | 80 | WileyNJD-AMA.bst:
 | 
|---|
| [d046db2] | 81 |         ln -fs ../AMA/AMA-stix/ama/WileyNJD-AMA.bst .
 | 
|---|
| [d5ccbe9] | 82 | 
 | 
|---|
| [161cdf1] | 83 | %.tex : %.fig ${Build}
 | 
|---|
| [a43dd54] | 84 |         fig2dev -L eepic $< > ${Build}/$@
 | 
|---|
 | 85 | 
 | 
|---|
| [161cdf1] | 86 | %.ps : %.fig ${Build}
 | 
|---|
| [a43dd54] | 87 |         fig2dev -L ps $< > ${Build}/$@
 | 
|---|
 | 88 | 
 | 
|---|
| [161cdf1] | 89 | %.pstex : %.fig ${Build}
 | 
|---|
| [a43dd54] | 90 |         fig2dev -L pstex $< > ${Build}/$@
 | 
|---|
 | 91 |         fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t
 | 
|---|
 | 92 | 
 | 
|---|
 | 93 | # Local Variables: #
 | 
|---|
 | 94 | # compile-command: "make" #
 | 
|---|
 | 95 | # End: #
 | 
|---|