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