1 | ## Define the configuration variables. |
---|
2 | |
---|
3 | Build = build |
---|
4 | Figures = figures |
---|
5 | Macros = ../../LaTeXmacros |
---|
6 | TeXLIB = .:${Macros}:${Build}: |
---|
7 | LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build} |
---|
8 | BibTeX = BIBINPUTS=../../bibliography: && 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 | Report \ |
---|
17 | } |
---|
18 | |
---|
19 | FIGURES = ${addsuffix .tex, \ |
---|
20 | DeepNodeSharing \ |
---|
21 | } |
---|
22 | |
---|
23 | PICTURES = ${addsuffix .pstex, \ |
---|
24 | } |
---|
25 | |
---|
26 | PROGRAMS = ${addsuffix .tex, \ |
---|
27 | } |
---|
28 | |
---|
29 | GRAPHS = ${addsuffix .tex, \ |
---|
30 | } |
---|
31 | |
---|
32 | ## Define the documents that need to be made. |
---|
33 | |
---|
34 | DOCUMENT = Report.pdf |
---|
35 | BASE = ${basename ${DOCUMENT}} |
---|
36 | |
---|
37 | # Directives # |
---|
38 | |
---|
39 | .PHONY : all clean # not file names |
---|
40 | |
---|
41 | all : ${DOCUMENT} |
---|
42 | |
---|
43 | clean : |
---|
44 | @rm -frv ${DOCUMENT} ${BASE}.ps ${Build} |
---|
45 | |
---|
46 | # File Dependencies # |
---|
47 | |
---|
48 | ${DOCUMENT} : ${BASE}.ps |
---|
49 | ps2pdf $< |
---|
50 | |
---|
51 | ${BASE}.ps : ${BASE}.dvi |
---|
52 | dvips ${Build}/$< -o $@ |
---|
53 | |
---|
54 | ${BASE}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} \ |
---|
55 | ${Macros}/common.tex ${Macros}/lstlang.sty ${Macros}/indexstyle ../../bibliography/pl.bib | ${Build} |
---|
56 | # Conditionally create an empty *.ind (index) file for inclusion until makeindex is run. |
---|
57 | if [ ! -r ${basename $@}.ind ] ; then touch ${Build}/${basename $@}.ind ; fi |
---|
58 | # Must have *.aux file containing citations for bibtex |
---|
59 | if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi |
---|
60 | -${BibTeX} ${Build}/${basename $@} |
---|
61 | # Some citations reference others so run again to resolve these citations |
---|
62 | ${LaTeX} ${basename $@}.tex |
---|
63 | -${BibTeX} ${Build}/${basename $@} |
---|
64 | # Make index from *.aux entries and input index at end of document |
---|
65 | makeindex -s ${Macros}/indexstyle ${Build}/${basename $@}.idx |
---|
66 | # Run again to finish citations |
---|
67 | ${LaTeX} ${basename $@}.tex |
---|
68 | # Run again to get index title into table of contents |
---|
69 | ${LaTeX} ${basename $@}.tex |
---|
70 | |
---|
71 | ## Define the default recipes. |
---|
72 | |
---|
73 | ${Build} : |
---|
74 | mkdir -p ${Build} |
---|
75 | |
---|
76 | %.tex : %.fig | ${Build} |
---|
77 | fig2dev -L eepic $< > ${Build}/$@ |
---|
78 | |
---|
79 | %.ps : %.fig | ${Build} |
---|
80 | fig2dev -L ps $< > ${Build}/$@ |
---|
81 | |
---|
82 | %.pstex : %.fig | ${Build} |
---|
83 | fig2dev -L pstex $< > ${Build}/$@ |
---|
84 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t |
---|
85 | |
---|
86 | # Local Variables: # |
---|
87 | # compile-command: "make" # |
---|
88 | # End: # |
---|