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