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} |
---|
12 | |
---|
13 | ## Define the text source files. |
---|
14 | |
---|
15 | SOURCES = ${addsuffix .tex, \ |
---|
16 | comp_II \ |
---|
17 | } |
---|
18 | |
---|
19 | FIGURES = ${addsuffix .tex, \ |
---|
20 | base \ |
---|
21 | empty \ |
---|
22 | emptybit \ |
---|
23 | emptytree \ |
---|
24 | resize \ |
---|
25 | } |
---|
26 | |
---|
27 | PICTURES = ${addsuffix .pstex, \ |
---|
28 | } |
---|
29 | |
---|
30 | PROGRAMS = ${addsuffix .tex, \ |
---|
31 | } |
---|
32 | |
---|
33 | GRAPHS = ${addsuffix .tex, \ |
---|
34 | } |
---|
35 | |
---|
36 | ## Define the documents that need to be made. |
---|
37 | |
---|
38 | DOCUMENT = comp_II.pdf |
---|
39 | BASE = ${basename ${DOCUMENT}} |
---|
40 | |
---|
41 | # Directives # |
---|
42 | |
---|
43 | .PHONY : all clean # not file names |
---|
44 | |
---|
45 | all : ${DOCUMENT} |
---|
46 | |
---|
47 | clean : |
---|
48 | @rm -frv ${DOCUMENT} ${BASE}.ps ${Build} |
---|
49 | |
---|
50 | # File Dependencies # |
---|
51 | |
---|
52 | ${DOCUMENT} : ${BASE}.ps |
---|
53 | ps2pdf $< |
---|
54 | |
---|
55 | ${BASE}.ps : ${BASE}.dvi |
---|
56 | dvips ${Build}/$< -o $@ |
---|
57 | |
---|
58 | ${BASE}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} \ |
---|
59 | ${Macros}/common.tex ${Macros}/indexstyle ../../../bibliography/pl.bib \ |
---|
60 | local.bib glossary.tex | ${Build} |
---|
61 | # Must have *.aux file containing citations for bibtex |
---|
62 | if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi |
---|
63 | -${BibTeX} ${Build}/${basename $@} |
---|
64 | # Some citations reference others so run again to resolve these citations |
---|
65 | ${LaTeX} ${basename $@}.tex |
---|
66 | -${BibTeX} ${Build}/${basename $@} |
---|
67 | # Make index from *.aux entries and input index at end of document |
---|
68 | makeglossaries -q -s ${Build}/${basename $@}.ist ${Build}/${basename $@} |
---|
69 | # Run again to finish citations |
---|
70 | ${LaTeX} ${basename $@}.tex |
---|
71 | |
---|
72 | ## Define the default recipes. |
---|
73 | |
---|
74 | ${Build}: |
---|
75 | mkdir -p ${Build} |
---|
76 | |
---|
77 | %.tex : img/%.fig ${Build} |
---|
78 | fig2dev -L eepic $< > ${Build}/$@ |
---|
79 | |
---|
80 | %.ps : img/%.fig | ${Build} |
---|
81 | fig2dev -L ps $< > ${Build}/$@ |
---|
82 | |
---|
83 | %.pstex : img/%.fig | ${Build} |
---|
84 | fig2dev -L pstex $< > ${Build}/$@ |
---|
85 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t |
---|
86 | |
---|
87 | # Local Variables: # |
---|
88 | # compile-command: "make" # |
---|
89 | # End: # |
---|