| 1 | ## Define the configuration variables. | 
|---|
| 2 |  | 
|---|
| 3 | Build = build | 
|---|
| 4 | Figures = figures | 
|---|
| 5 | Macros = ../../LaTeXmacros | 
|---|
| 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 | generic_types \ | 
|---|
| 17 | } | 
|---|
| 18 |  | 
|---|
| 19 | FIGURES = ${addsuffix .tex, \ | 
|---|
| 20 | } | 
|---|
| 21 |  | 
|---|
| 22 | PICTURES = ${addsuffix .pstex, \ | 
|---|
| 23 | } | 
|---|
| 24 |  | 
|---|
| 25 | PROGRAMS = ${addsuffix .tex, \ | 
|---|
| 26 | } | 
|---|
| 27 |  | 
|---|
| 28 | GRAPHS = ${addsuffix .tex, \ | 
|---|
| 29 | timing \ | 
|---|
| 30 | } | 
|---|
| 31 |  | 
|---|
| 32 | ## Define the documents that need to be made. | 
|---|
| 33 |  | 
|---|
| 34 | DOCUMENT = generic_types.pdf | 
|---|
| 35 |  | 
|---|
| 36 | # Directives # | 
|---|
| 37 |  | 
|---|
| 38 | .PHONY : all clean                                      # not file names | 
|---|
| 39 |  | 
|---|
| 40 | all : ${DOCUMENT} | 
|---|
| 41 |  | 
|---|
| 42 | clean : | 
|---|
| 43 | @rm -frv ${DOCUMENT} ${basename ${DOCUMENT}}.ps ${Build} | 
|---|
| 44 |  | 
|---|
| 45 | # File Dependencies # | 
|---|
| 46 |  | 
|---|
| 47 | ${DOCUMENT} : ${basename ${DOCUMENT}}.ps | 
|---|
| 48 | ps2pdf $< | 
|---|
| 49 |  | 
|---|
| 50 | ${basename ${DOCUMENT}}.ps : ${basename ${DOCUMENT}}.dvi | 
|---|
| 51 | dvips ${Build}/$< -o $@ | 
|---|
| 52 |  | 
|---|
| 53 | ${basename ${DOCUMENT}}.dvi : Makefile ${Build} ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ../../bibliography/pl.bib | 
|---|
| 54 | # Must have *.aux file containing citations for bibtex | 
|---|
| 55 | if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi | 
|---|
| 56 | -${BibTeX} ${Build}/${basename $@} | 
|---|
| 57 | # Some citations reference others so run again to resolve these citations | 
|---|
| 58 | ${LaTeX} ${basename $@}.tex | 
|---|
| 59 | -${BibTeX} ${Build}/${basename $@} | 
|---|
| 60 | # Run again to finish citations | 
|---|
| 61 | ${LaTeX} ${basename $@}.tex | 
|---|
| 62 |  | 
|---|
| 63 | ## Define the default recipes. | 
|---|
| 64 |  | 
|---|
| 65 | ${Build}: | 
|---|
| 66 | mkdir -p ${Build} | 
|---|
| 67 |  | 
|---|
| 68 | ${GRAPHS} : timing.gp timing.dat | 
|---|
| 69 | gnuplot -e Build="'${Build}/'" evaluation/timing.gp | 
|---|
| 70 |  | 
|---|
| 71 | %.tex : %.fig | 
|---|
| 72 | fig2dev -L eepic $< > ${Build}/$@ | 
|---|
| 73 |  | 
|---|
| 74 | %.ps : %.fig | 
|---|
| 75 | fig2dev -L ps $< > ${Build}/$@ | 
|---|
| 76 |  | 
|---|
| 77 | %.pstex : %.fig | 
|---|
| 78 | fig2dev -L pstex $< > ${Build}/$@ | 
|---|
| 79 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t | 
|---|
| 80 |  | 
|---|
| 81 | # Local Variables: # | 
|---|
| 82 | # compile-command: "make" # | 
|---|
| 83 | # End: # | 
|---|