1 | ## Define the configuration variables. |
---|
2 | |
---|
3 | Build = build |
---|
4 | Figures = figures |
---|
5 | Macros = ../../LaTeXmacros |
---|
6 | TeXLIB = .:style:annex:${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 | style/style \ |
---|
18 | style/cfa-format \ |
---|
19 | } |
---|
20 | |
---|
21 | FIGURES = ${addsuffix .tex, \ |
---|
22 | monitor \ |
---|
23 | ext_monitor \ |
---|
24 | int_monitor \ |
---|
25 | dependency \ |
---|
26 | } |
---|
27 | |
---|
28 | PICTURES = ${addsuffix .pstex, \ |
---|
29 | system \ |
---|
30 | monitor_structs \ |
---|
31 | } |
---|
32 | |
---|
33 | PROGRAMS = ${addsuffix .tex, \ |
---|
34 | } |
---|
35 | |
---|
36 | GRAPHS = ${addsuffix .tex, \ |
---|
37 | } |
---|
38 | |
---|
39 | ## Define the documents that need to be made. |
---|
40 | |
---|
41 | DOCUMENT = Paper.pdf |
---|
42 | |
---|
43 | # Directives # |
---|
44 | |
---|
45 | .PHONY : all clean # not file names |
---|
46 | |
---|
47 | all : ${DOCUMENT} |
---|
48 | |
---|
49 | clean : |
---|
50 | @rm -frv ${DOCUMENT} ${basename ${DOCUMENT}}.ps ${Build} |
---|
51 | |
---|
52 | # File Dependencies # |
---|
53 | |
---|
54 | ${DOCUMENT} : ${basename ${DOCUMENT}}.ps |
---|
55 | ps2pdf $< |
---|
56 | |
---|
57 | ${basename ${DOCUMENT}}.ps : ${basename ${DOCUMENT}}.dvi |
---|
58 | dvips ${Build}/$< -o $@ |
---|
59 | |
---|
60 | ${basename ${DOCUMENT}}.dvi : Makefile ${Build} ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} \ |
---|
61 | ${Macros}/common.tex ${Macros}/indexstyle annex/local.bib ../../bibliography/pl.bib |
---|
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 | %.tex : %.fig |
---|
77 | fig2dev -L eepic $< > ${Build}/$@ |
---|
78 | |
---|
79 | %.ps : %.fig |
---|
80 | fig2dev -L ps $< > ${Build}/$@ |
---|
81 | |
---|
82 | %.pstex : %.fig |
---|
83 | fig2dev -L pstex $< > ${Build}/$@ |
---|
84 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t |
---|
85 | |
---|
86 | # Local Variables: # |
---|
87 | # compile-command: "make" # |
---|
88 | # End: # |
---|