source: doc/theses/thierry_delisle_MMath/Makefile @ 5d2db68

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 5d2db68 was 67982887, checked in by Peter A. Buhr <pabuhr@…>, 6 years ago

specialize thesis directory-names

  • Property mode set to 100644
File size: 3.2 KB
Line 
1## Define the configuration variables.
2
3Build = build
4Figures = figures
5Macros = ../../LaTeXmacros
6TeXLIB = .:style:text:annex:${Macros}:${Build}:../../bibliography:
7LaTeX  = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build}
8BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex -terse
9
10MAKEFLAGS = --no-print-directory --silent #
11VPATH = ${Build} ${Figures}
12
13## Define the text source files.
14
15SOURCES = ${addsuffix .tex, \
16thesis \
17style/style \
18style/cfa-format \
19annex/glossary \
20text/frontpgs \
21text/intro \
22text/basics \
23text/cforall \
24text/concurrency \
25text/internals \
26text/parallelism \
27text/results \
28text/together \
29text/future \
30}
31
32FIGURES = ${addsuffix .tex, \
33monitor \
34ext_monitor \
35int_monitor \
36dependency \
37}
38
39PICTURES = ${addsuffix .pstex, \
40system \
41monitor_structs \
42}
43
44PROGRAMS = ${addsuffix .tex, \
45}
46
47GRAPHS = ${addsuffix .tex, \
48}
49
50## Define the documents that need to be made.
51
52DOCUMENT = thesis.pdf
53BASE = ${basename ${DOCUMENT}}
54
55# Directives #
56
57.PHONY : all clean                                      # not file names
58
59all : ${DOCUMENT}
60
61clean :
62        @rm -frv ${DOCUMENT} ${BASE}.ps ${Build}
63
64# File Dependencies #
65
66${DOCUMENT} : ${BASE}.ps
67        ps2pdf $<
68
69${BASE}.ps : ${BASE}.dvi
70        dvips ${Build}/$< -o $@
71
72${BASE}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} \
73                ${Macros}/common.tex ${Macros}/indexstyle annex/local.bib ../../bibliography/pl.bib | ${Build}
74        # Must have *.aux file containing citations for bibtex
75        if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi
76        -${BibTeX} ${Build}/${basename $@}
77        # Some citations reference others so run again to resolve these citations
78        ${LaTeX} ${basename $@}.tex
79        -${BibTeX} ${Build}/${basename $@}
80        # Make index from *.aux entries and input index at end of document
81        makeglossaries -q -s ${Build}/${basename $@}.ist ${Build}/${basename $@}
82        -version.sh
83        # Run again to finish citations
84        ${LaTeX} ${basename $@}.tex
85
86## Define the default recipes.
87
88${Build}:
89        mkdir -p ${Build}
90
91%.tex : %.fig ${Build}
92        fig2dev -L eepic $< > ${Build}/$@
93
94%.ps : %.fig | ${Build}
95        fig2dev -L ps $< > ${Build}/$@
96
97%.pstex : %.fig | ${Build}
98        fig2dev -L pstex $< > ${Build}/$@
99        fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t
100
101#-----------------------------------------------------------------------------------
102# Tools to generate png files
103# to create a png we create a pdf and convert it to png
104%.png : build/%.pstex figures/%.tex ${Build}
105        echo ${basename $@}
106        ${LaTeX} figures/${basename $@}.tex
107        dvips build/${basename $@}.dvi -o build/${basename $@}.ps
108        ps2pdf build/${basename $@}.ps
109        convert -negate ${basename $@}.pdf $@
110
111# creating a pdf of a figure requires generating some latex that just includes the figure
112figures/%.tex: build/%.pstex ${Build}
113        echo -n         "\documentclass[preview]{standalone}\n"         \
114                        "\usepackage[T1]{fontenc}\n"                    \
115                        "\usepackage[usenames]{color}\n"                \
116                        "\usepackage{graphicx}\n"                       \
117                        "\usepackage{listings}\n"                       \
118                        "\usepackage{xspace}\n"                         \
119                        "\input{style}\n"                               \
120                        "\\\\begin{document}\n"                         \
121                        "{\\\\resizebox{3\\\\textwidth}{!}{\input{${basename ${notdir $@}}.pstex_t}}}\n" \
122                        "\end{document}" > $@
123
124# Local Variables: #
125# compile-command: "make" #
126# End: #
Note: See TracBrowser for help on using the repository browser.