1 | ## Define the configuration variables. |
---|
2 | |
---|
3 | Build = build |
---|
4 | Figures = img |
---|
5 | |
---|
6 | LaTMac = ../../../LaTeXmacros |
---|
7 | BibRep = ../../../bibliography |
---|
8 | |
---|
9 | Macros = ${LaTMac} |
---|
10 | TeXLIB = .:${Macros}:${Build}:${BibRep}: |
---|
11 | LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build} |
---|
12 | BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex |
---|
13 | |
---|
14 | MAKEFLAGS = --no-print-directory # --silent |
---|
15 | VPATH = ${Build} ${Figures} |
---|
16 | |
---|
17 | ## Define the text source files. |
---|
18 | TEXTS = ${addprefix text/, ${addsuffix .tex, \ |
---|
19 | front \ |
---|
20 | intro \ |
---|
21 | existing \ |
---|
22 | runtime \ |
---|
23 | core \ |
---|
24 | practice \ |
---|
25 | io \ |
---|
26 | eval_micro \ |
---|
27 | eval_macro \ |
---|
28 | }} |
---|
29 | |
---|
30 | FIGURES = ${addsuffix .tex, \ |
---|
31 | } |
---|
32 | |
---|
33 | PICTURES = ${addsuffix .pstex, \ |
---|
34 | base \ |
---|
35 | base_avg \ |
---|
36 | cache-share \ |
---|
37 | cache-noshare \ |
---|
38 | empty \ |
---|
39 | emptybit \ |
---|
40 | emptytls \ |
---|
41 | emptytree \ |
---|
42 | executionStates \ |
---|
43 | fairness \ |
---|
44 | idle \ |
---|
45 | idle1 \ |
---|
46 | idle2 \ |
---|
47 | idle_state \ |
---|
48 | io_uring \ |
---|
49 | pivot_ring \ |
---|
50 | MQMS \ |
---|
51 | MQMSG \ |
---|
52 | system \ |
---|
53 | cycle \ |
---|
54 | result.cycle.jax.ops \ |
---|
55 | result.yield.jax.ops \ |
---|
56 | result.churn.jax.ops \ |
---|
57 | result.cycle.jax.ns \ |
---|
58 | result.yield.jax.ns \ |
---|
59 | result.churn.jax.ns \ |
---|
60 | result.cycle.low.jax.ops \ |
---|
61 | result.yield.low.jax.ops \ |
---|
62 | result.churn.low.jax.ops \ |
---|
63 | result.cycle.low.jax.ns \ |
---|
64 | result.yield.low.jax.ns \ |
---|
65 | result.churn.low.jax.ns \ |
---|
66 | result.memcd.updt.qps \ |
---|
67 | result.memcd.updt.lat \ |
---|
68 | result.memcd.rate.qps \ |
---|
69 | result.memcd.rate.99th \ |
---|
70 | SQMS \ |
---|
71 | } |
---|
72 | |
---|
73 | PROGRAMS = ${addsuffix .tex, \ |
---|
74 | } |
---|
75 | |
---|
76 | GRAPHS = ${addsuffix .tex, \ |
---|
77 | } |
---|
78 | |
---|
79 | ## Define the documents that need to be made. |
---|
80 | all: thesis.pdf |
---|
81 | thesis.pdf: ${TEXTS} ${FIGURES} ${PICTURES} thesis.tex glossary.tex local.bib ${LaTMac}/common.tex ${LaTMac}/common.sty ${BibRep}/pl.bib |
---|
82 | |
---|
83 | DOCUMENT = thesis.pdf |
---|
84 | BASE = ${basename ${DOCUMENT}} |
---|
85 | |
---|
86 | # Directives # |
---|
87 | |
---|
88 | .NOTPARALLEL: # cannot make in parallel |
---|
89 | |
---|
90 | .PHONY : all clean # not file names |
---|
91 | |
---|
92 | all : ${DOCUMENT} |
---|
93 | |
---|
94 | clean : |
---|
95 | @rm -frv ${DOCUMENT} ${BASE}.ps ${Build} |
---|
96 | |
---|
97 | # File Dependencies # |
---|
98 | |
---|
99 | %.pdf : build/%.ps | ${Build} |
---|
100 | ps2pdf $< |
---|
101 | |
---|
102 | build/%.ps : build/%.dvi | ${Build} |
---|
103 | dvips $< -o $@ |
---|
104 | |
---|
105 | build/%.dvi : %.tex Makefile | ${Build} |
---|
106 | # Conditionally create an empty *.ind (index) file for inclusion until makeindex is run. |
---|
107 | if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi |
---|
108 | # Must have *.aux file containing citations for bibtex |
---|
109 | if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} $< ; fi |
---|
110 | -${BibTeX} ${basename $@} |
---|
111 | # Some citations reference others so run again to resolve these citations |
---|
112 | ${LaTeX} $< |
---|
113 | -${BibTeX} ${basename $@} |
---|
114 | # Make index from *.aux entries and input index at end of document |
---|
115 | -makeglossaries -q -s ${basename $@}.ist ${basename $@} |
---|
116 | # Make index from *.aux entries and input index at end of document |
---|
117 | -makeindex ${basename $@}.idx |
---|
118 | # Run again to finish citations |
---|
119 | ${LaTeX} $< |
---|
120 | |
---|
121 | ## Define the default recipes. |
---|
122 | |
---|
123 | ${Build}: |
---|
124 | mkdir -p ${Build} |
---|
125 | |
---|
126 | %.tex : fig/%.fig | ${Build} |
---|
127 | fig2dev -L eepic $< > ${Build}/$@ |
---|
128 | |
---|
129 | %.ps : fig/%.fig | ${Build} |
---|
130 | fig2dev -L ps $< > ${Build}/$@ |
---|
131 | |
---|
132 | %.pstex : fig/%.fig | ${Build} |
---|
133 | fig2dev -L pstex $< > ${Build}/$@ |
---|
134 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t |
---|
135 | |
---|
136 | %.pstex : build/%.svg | ${Build} |
---|
137 | inkscape -z -D --file=$< --export-eps=${Build}/$@ --export-latex |
---|
138 | mv ${Build}/$@_tex ${Build}/$@_t |
---|
139 | echo "sed -i 's/$@/${Build}/$@/g' ${Build}/$@_t" |
---|
140 | sed -i 's/$@/${Build}\/$@/g' ${Build}/$@_t |
---|
141 | |
---|
142 | build/fairness.svg : fig/fairness.py | ${Build} |
---|
143 | python3 $< $@ |
---|
144 | |
---|
145 | cycle_jax_ops_FLAGS = --MaxY=120000000 |
---|
146 | cycle_low_jax_ops_FLAGS = --MaxY=120000000 |
---|
147 | cycle_jax_ns_FLAGS = --MaxY=2000 |
---|
148 | cycle_low_jax_ns_FLAGS = --MaxY=2000 |
---|
149 | |
---|
150 | yield_jax_ops_FLAGS = --MaxY=150000000 |
---|
151 | yield_low_jax_ops_FLAGS = --MaxY=150000000 |
---|
152 | yield_jax_ns_FLAGS = --MaxY=1500 |
---|
153 | yield_low_jax_ns_FLAGS = --MaxY=1500 |
---|
154 | |
---|
155 | build/result.%.ns.svg : data/% Makefile | ${Build} |
---|
156 | ../../../../benchmark/plot.py -f $< -o $@ -y "ns per ops/procs" $($(subst .,_,$*)_ns_FLAGS) |
---|
157 | |
---|
158 | build/result.%.ops.svg : data/% Makefile | ${Build} |
---|
159 | ../../../../benchmark/plot.py -f $< -o $@ -y "Ops per second" $($(subst .,_,$*)_ops_FLAGS) |
---|
160 | |
---|
161 | build/result.memcd.updt.qps.svg : data/memcd.updt Makefile | ${Build} |
---|
162 | ../../../../benchmark/plot.py -f $< -o $@ -y "Actual QPS" -x "Update Ratio" |
---|
163 | |
---|
164 | build/result.memcd.updt.lat.svg : data/memcd.updt Makefile | ${Build} |
---|
165 | ../../../../benchmark/plot.py -f $< -o $@ -y "Average Read Latency" -x "Update Ratio" |
---|
166 | |
---|
167 | build/result.memcd.rate.qps.svg : data/memcd.rate Makefile | ${Build} |
---|
168 | ../../../../benchmark/plot.py -f $< -o $@ -y "Actual QPS" -x "Target QPS" |
---|
169 | |
---|
170 | build/result.memcd.rate.99th.svg : data/memcd.rate Makefile | ${Build} |
---|
171 | ../../../../benchmark/plot.py -f $< -o $@ -y "Tail Read Latency" -x "Target QPS" |
---|
172 | |
---|
173 | ## pstex with inverted colors |
---|
174 | %.dark.pstex : fig/%.fig Makefile | ${Build} |
---|
175 | fig2dev -L pstex $< > ${Build}/$@ |
---|
176 | sed -i 's/\/col-1 {0 setgray} bind def/\/col-1 {1 setgray} bind def/g' ${Build}/$@ |
---|
177 | 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}/$@ |
---|
178 | 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}/$@ |
---|
179 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t |
---|
180 | |
---|
181 | # Local Variables: # |
---|
182 | # compile-command: "make" # |
---|
183 | # End: # |
---|