1 | ## Define the configuration variables. |
---|
2 | |
---|
3 | Build = build |
---|
4 | Macros = ../../LaTeXmacros |
---|
5 | TeXLIB = .:${Macros}:${Build}:../../bibliography: |
---|
6 | LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build} -interaction=nonstopmode |
---|
7 | BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex |
---|
8 | |
---|
9 | MAKEFLAGS = --no-print-directory --silent # |
---|
10 | |
---|
11 | ## Define the text source files. |
---|
12 | |
---|
13 | SOURCES = ${addsuffix .tex, \ |
---|
14 | Paper \ |
---|
15 | } |
---|
16 | |
---|
17 | FIGURES = ${addsuffix .tex, \ |
---|
18 | } |
---|
19 | |
---|
20 | PICTURES = ${addsuffix .pstex, \ |
---|
21 | } |
---|
22 | |
---|
23 | PROGRAMS = ${addsuffix .tex, \ |
---|
24 | } |
---|
25 | |
---|
26 | GRAPHS = ${addsuffix .tex, \ |
---|
27 | timing \ |
---|
28 | } |
---|
29 | |
---|
30 | ## Define the documents that need to be made. |
---|
31 | |
---|
32 | DOCUMENT = Paper.pdf |
---|
33 | |
---|
34 | # Directives # |
---|
35 | |
---|
36 | .PHONY : all clean # not file names |
---|
37 | |
---|
38 | all : ${DOCUMENT} |
---|
39 | |
---|
40 | clean : |
---|
41 | @rm -frv ${DOCUMENT} ${basename ${DOCUMENT}}.ps ${Build} |
---|
42 | |
---|
43 | # File Dependencies # |
---|
44 | |
---|
45 | ${DOCUMENT} : ${basename ${DOCUMENT}}.ps |
---|
46 | ps2pdf $< |
---|
47 | |
---|
48 | ${basename ${DOCUMENT}}.ps : ${basename ${DOCUMENT}}.dvi |
---|
49 | dvips ${Build}/$< -o $@ |
---|
50 | |
---|
51 | ${basename ${DOCUMENT}}.dvi : Makefile ${Build} ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${basename ${DOCUMENT}}.tex \ |
---|
52 | ${Macros}/common.tex ${Macros}/indexstyle ../../bibliography/cfa.bib |
---|
53 | if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi # Must have *.aux file containing citations for bibtex |
---|
54 | -${BibTeX} ${Build}/${basename $@} # Some citations reference others so run again to resolve these citations |
---|
55 | ${LaTeX} ${basename $@}.tex |
---|
56 | -${BibTeX} ${Build}/${basename $@} |
---|
57 | ${LaTeX} ${basename $@}.tex # Finish citations |
---|
58 | |
---|
59 | ## Define the default recipes. |
---|
60 | |
---|
61 | vpath %.tex ${subst .zzz,,${subst .zzz ,:,${SOURCES}}} # add prefix for source |
---|
62 | vpath %.fig ${subst .zzz,,${subst .zzz ,:,${SOURCES}}} # add prefix for source |
---|
63 | |
---|
64 | ${Build}: |
---|
65 | mkdir -p ${Build} |
---|
66 | |
---|
67 | ${GRAPHS} : evaluation/timing.gp evaluation/timing.dat |
---|
68 | gnuplot evaluation/timing.gp |
---|
69 | |
---|
70 | %.tex : figures/%.fig |
---|
71 | fig2dev -L eepic $< > ${Build}/$@ |
---|
72 | |
---|
73 | %.ps : figures/%.fig |
---|
74 | fig2dev -L ps $< > ${Build}/$@ |
---|
75 | |
---|
76 | %.pstex : figures/%.fig |
---|
77 | fig2dev -L pstex $< > ${Build}/$@ |
---|
78 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t |
---|
79 | |
---|
80 | # Local Variables: # |
---|
81 | # tab-width : 4 # |
---|
82 | # compile-command: "make" # |
---|
83 | # End: # |
---|