source: doc/theses/thierry_delisle_PhD/thesis/Makefile @ bace538

arm-ehjacob/cs343-translationnew-ast-unique-expr
Last change on this file since bace538 was bace538, checked in by Peter A. Buhr <pabuhr@…>, 9 months ago

proofread Thierry's chapter 2 and 3, update latex formatting, add bibliography entries

  • Property mode set to 100644
File size: 3.0 KB
Line 
1## Define the configuration variables.
2
3Build = build
4Figures = img
5Macros = ../../../LaTeXmacros
6TeXLIB = .:${Macros}:${Build}:../../../bibliography:
7LaTeX  = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build}
8BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex
9
10MAKEFLAGS = --no-print-directory --silent
11VPATH = ${Build} ${Figures}
12
13## Define the text source files.
14TEXTS = ${addprefix text/, ${addsuffix .tex, \
15        front \
16        intro \
17        existing \
18        runtime \
19        core \
20        practice \
21        io \
22}}
23
24FIGURES = ${addsuffix .tex, \
25}
26
27PICTURES = ${addsuffix .pstex, \
28        base \
29        empty \
30        emptybit \
31        emptytls \
32        emptytree \
33        fairness \
34        system \
35}
36
37PROGRAMS = ${addsuffix .tex, \
38}
39
40GRAPHS = ${addsuffix .tex, \
41}
42
43## Define the documents that need to be made.
44all: thesis.pdf
45thesis.pdf: ${TEXTS} ${FIGURES} ${PICTURES} glossary.tex local.bib
46
47DOCUMENT = thesis.pdf
48BASE = ${basename ${DOCUMENT}}
49
50# Directives #
51
52.PHONY : all clean                                      # not file names
53
54all : ${DOCUMENT}
55
56clean :
57        @rm -frv ${DOCUMENT} ${BASE}.ps ${Build}
58
59# File Dependencies #
60
61%.pdf : build/%.ps | ${Build}
62        ps2pdf $<
63
64build/%.ps : build/%.dvi | ${Build}
65        dvips $< -o $@
66
67build/%.dvi : %.tex Makefile | ${Build}
68        # Conditionally create an empty *.ind (index) file for inclusion until makeindex is run.
69        if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi
70        # Must have *.aux file containing citations for bibtex
71        if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} $< ; fi
72        -${BibTeX} ${basename $@}
73        # Some citations reference others so run again to resolve these citations
74        ${LaTeX} $<
75        -${BibTeX} ${basename $@}
76        # Make index from *.aux entries and input index at end of document
77        -makeglossaries -q -s ${basename $@}.ist ${basename $@}
78        # Make index from *.aux entries and input index at end of document
79        -makeindex ${basename $@}.idx
80        # Run again to finish citations
81        ${LaTeX} $<
82
83build/fairness.svg : fig/fairness.py | ${Build}
84        python3 $< $@
85
86## Define the default recipes.
87
88${Build}:
89        mkdir -p ${Build}
90
91%.tex : fig/%.fig | ${Build}
92        fig2dev -L eepic $< > ${Build}/$@
93
94%.ps : fig/%.fig | ${Build}
95        fig2dev -L ps $< > ${Build}/$@
96
97%.pstex : fig/%.fig | ${Build}
98        fig2dev -L pstex $< > ${Build}/$@
99        fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t
100
101%.pstex : build/%.svg | ${Build}
102        inkscape -z -D --file=$< --export-eps=${Build}/$@ --export-latex
103        mv ${Build}/$@_tex ${Build}/$@_t
104        echo "sed -i 's/$@/${Build}/$@/g' ${Build}/$@_t"
105        sed -i 's/$@/${Build}\/$@/g' ${Build}/$@_t
106
107## pstex with inverted colors
108%.dark.pstex : fig/%.fig Makefile | ${Build}
109        fig2dev -L pstex $< > ${Build}/$@
110        sed -i 's/\/col-1 {0 setgray} bind def/\/col-1 {1 setgray} bind def/g' ${Build}/$@
111        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}/$@
112        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}/$@
113        fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t
114
115# Local Variables: #
116# compile-command: "make" #
117# End: #
Note: See TracBrowser for help on using the repository browser.