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