1 | ## Define the configuration variables. |
---|
2 | |
---|
3 | Build = build |
---|
4 | Figures = img |
---|
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 | FIGURES = ${addsuffix .tex, \ |
---|
15 | emptybit \ |
---|
16 | emptytree \ |
---|
17 | emptytls \ |
---|
18 | resize \ |
---|
19 | } |
---|
20 | |
---|
21 | PICTURES = ${addsuffix .pstex, \ |
---|
22 | base \ |
---|
23 | empty \ |
---|
24 | system \ |
---|
25 | } |
---|
26 | |
---|
27 | PROGRAMS = ${addsuffix .tex, \ |
---|
28 | } |
---|
29 | |
---|
30 | GRAPHS = ${addsuffix .tex, \ |
---|
31 | } |
---|
32 | |
---|
33 | ## Define the documents that need to be made. |
---|
34 | all: comp_II.pdf presentation.pdf |
---|
35 | comp_II.pdf: ${FIGURES} ${PICTURES} |
---|
36 | presentation.pdf: presentationstyle.sty base.dark.pstex empty.dark.pstex system.dark.pstex |
---|
37 | |
---|
38 | DOCUMENT = comp_II.pdf presentation.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 | %.pdf : build/%.ps | ${Build} |
---|
53 | ps2pdf $< |
---|
54 | |
---|
55 | build/%.ps : build/%.dvi | ${Build} |
---|
56 | dvips $< -o $@ |
---|
57 | |
---|
58 | build/%.dvi : %.tex Makefile | ${Build} |
---|
59 | # Must have *.aux file containing citations for bibtex |
---|
60 | if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} $< ; fi |
---|
61 | -${BibTeX} ${basename $@} |
---|
62 | # Some citations reference others so run again to resolve these citations |
---|
63 | ${LaTeX} $< |
---|
64 | -${BibTeX} ${basename $@} |
---|
65 | # Make index from *.aux entries and input index at end of document |
---|
66 | -makeglossaries -q -s ${basename $@}.ist ${basename $@} |
---|
67 | # Run again to finish citations |
---|
68 | ${LaTeX} $< |
---|
69 | |
---|
70 | ## Define the default recipes. |
---|
71 | |
---|
72 | ${Build}: |
---|
73 | mkdir -p ${Build} |
---|
74 | |
---|
75 | %.tex : img/%.fig | ${Build} |
---|
76 | fig2dev -L eepic $< > ${Build}/$@ |
---|
77 | |
---|
78 | %.ps : img/%.fig | ${Build} |
---|
79 | fig2dev -L ps $< > ${Build}/$@ |
---|
80 | |
---|
81 | %.pstex : img/%.fig | ${Build} |
---|
82 | fig2dev -L pstex $< > ${Build}/$@ |
---|
83 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t |
---|
84 | |
---|
85 | ## pstex with inverted colors |
---|
86 | %.dark.pstex : img/%.fig Makefile | ${Build} |
---|
87 | fig2dev -L pstex $< > ${Build}/$@ |
---|
88 | sed -i 's/\/col-1 {0 setgray} bind def/\/col-1 {1 setgray} bind def/g' ${Build}/$@ |
---|
89 | sed -i 's/\/col0 {0.000 0.000 0.000 srgb} bind def/\/col0 {1.000 1.000 1.000 srgb} bind def/g' ${Build}/$@ |
---|
90 | sed -i 's/\/col7 {1.000 1.000 1.000 srgb} bind def/\/col7 {0.000 0.000 0.000 srgb} bind def/g' ${Build}/$@ |
---|
91 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t |
---|
92 | |
---|
93 | # Local Variables: # |
---|
94 | # compile-command: "make" # |
---|
95 | # End: # |
---|