source: doc/theses/colby_parsons_MMAth/Makefile @ e10714a

ADTast-experimental
Last change on this file since e10714a was 512d937c, checked in by caparsons <caparson@…>, 16 months ago

various edits and cleanup and added mutexstmt chapter

  • Property mode set to 100644
File size: 4.0 KB
Line 
1## Define the configuration variables.
2
3Build = build
4Figures = figures
5Macros = ../../LaTeXmacros
6TeXLIB = .:style:text:${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,     \
16        text/CFA_intro                          \
17        text/actors                                     \
18        text/frontpgs                           \
19        text/CFA_concurrency            \
20        thesis                                          \
21        text/mutex_stmt                         \
22        text/channels                           \
23}
24
25FIGURES = ${addsuffix .pgf,             \
26        figures/pykeExecutor                    \
27        figures/pykeCFAExecutor                 \
28        figures/nasusExecutor                   \
29        figures/nasusCFAExecutor                \
30        figures/pykeMatrix                              \
31        figures/pykeCFAMatrix                   \
32        figures/nasusMatrix                     \
33        figures/nasusCFAMatrix                  \
34        figures/pykeRepeat                              \
35        figures/pykeCFARepeat                   \
36        figures/nasusRepeat                     \
37        figures/nasusCFARepeat                  \
38        figures/pykeCFABalance-One              \
39        figures/nasusCFABalance-One             \
40        figures/pykeCFABalance-Multi    \
41        figures/nasusCFABalance-Multi   \
42        figures/pyke_Aggregate_Lock_2   \
43        figures/pyke_Aggregate_Lock_4   \
44        figures/pyke_Aggregate_Lock_8   \
45        figures/nasus_Aggregate_Lock_2  \
46        figures/nasus_Aggregate_Lock_4  \
47        figures/nasus_Aggregate_Lock_8  \
48}
49
50DATA =  data/pykeSendStatic             \
51                data/pykeSendDynamic    \
52                data/pykeExecutorMem    \
53                data/nasusSendStatic    \
54                data/nasusSendDynamic   \
55                data/pykeExecutorMem    \
56
57PICTURES = ${addsuffix .tikz,   \
58        diagrams/standard_actor         \
59        diagrams/inverted_actor         \
60        diagrams/gulp                           \
61        diagrams/chain_swap             \
62        diagrams/M_to_one_swap          \
63        diagrams/acyclic_swap           \
64        diagrams/cyclic_swap            \
65}
66
67PROGRAMS = ${addsuffix .tex, \
68}
69
70GRAPHS = ${addsuffix .tex, \
71}
72
73## Define the documents that need to be made.
74
75DOCUMENT = thesis.pdf
76BASE = ${basename ${DOCUMENT}}
77
78# Directives #
79
80.PHONY : all clean                                      # not file names
81
82all : ${DOCUMENT}
83
84clean :
85        @rm -frv ${DOCUMENT} ${BASE}.ps ${Build}
86
87# File Dependencies #
88
89${DOCUMENT} : ${BASE}.ps
90        ps2pdf $<
91
92${BASE}.ps : ${BASE}.dvi
93        dvips ${Build}/$< -o $@
94
95${BASE}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${DATA} \
96                ${Macros}/common.tex ${Macros}/indexstyle local.bib ../../bibliography/pl.bib | ${Build}
97        # Must have *.aux file containing citations for bibtex
98        if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi
99        -${BibTeX} ${Build}/${basename $@}
100        # Some citations reference others so run again to resolve these citations
101        ${LaTeX} ${basename $@}.tex
102        -${BibTeX} ${Build}/${basename $@}
103        # Make index from *.aux entries and input index at end of document
104        makeglossaries -q -s ${Build}/${basename $@}.ist ${Build}/${basename $@}
105        -version.sh
106        # Run again to finish citations
107        ${LaTeX} ${basename $@}.tex
108       
109
110## Define the default recipes.
111
112${Build}:
113        mkdir -p ${Build}
114
115%.tex : %.fig ${Build}
116        fig2dev -L eepic $< > ${Build}/$@
117
118%.ps : %.fig | ${Build}
119        fig2dev -L ps $< > ${Build}/$@
120
121%.pstex : %.fig | ${Build}
122        fig2dev -L pstex $< > ${Build}/$@
123        fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t
124
125#-----------------------------------------------------------------------------------
126# Tools to generate png files
127# to create a png we create a pdf and convert it to png
128%.png : build/%.pstex figures/%.tex ${Build}
129        echo ${basename $@}
130        ${LaTeX} figures/${basename $@}.tex
131        dvips build/${basename $@}.dvi -o build/${basename $@}.ps
132        ps2pdf build/${basename $@}.ps
133        convert -negate ${basename $@}.pdf $@
134
135# creating a pdf of a figure requires generating some latex that just includes the figure
136figures/%.tex: build/%.pstex ${Build}
137        echo -n         "\documentclass[preview]{standalone}\n"         \
138                        "\usepackage[T1]{fontenc}\n"                    \
139                        "\usepackage[usenames]{color}\n"                \
140                        "\usepackage{graphicx}\n"                       \
141                        "\usepackage{listings}\n"                       \
142                        "\usepackage{xspace}\n"                         \
143                        "\input{style}\n"                               \
144                        "\\\\begin{document}\n"                         \
145                        "{\\\\resizebox{3\\\\textwidth}{!}{\input{${basename ${notdir $@}}.pstex_t}}}\n" \
146                        "\end{document}" > $@
147
148data/%: ;
149%.tikz: ;
150%.pgf: ;
151
152# Local Variables: #
153# compile-command: "make" #
154# End: #
Note: See TracBrowser for help on using the repository browser.