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