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