| 1 | ## Define the configuration variables.
|
|---|
| 2 |
|
|---|
| 3 | Build = build
|
|---|
| 4 | Figures = img
|
|---|
| 5 | Macros = ../../../LaTeXmacros
|
|---|
| 6 | TeXLIB = .:${Macros}:${Build}:../../../bibliography:
|
|---|
| 7 | LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build}
|
|---|
| 8 | BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex
|
|---|
| 9 |
|
|---|
| 10 | MAKEFLAGS = --no-print-directory # --silent
|
|---|
| 11 | VPATH = ${Build} ${Figures}
|
|---|
| 12 |
|
|---|
| 13 | ## Define the text source files.
|
|---|
| 14 | TEXTS = ${addprefix text/, ${addsuffix .tex, \
|
|---|
| 15 | front \
|
|---|
| 16 | intro \
|
|---|
| 17 | existing \
|
|---|
| 18 | runtime \
|
|---|
| 19 | core \
|
|---|
| 20 | practice \
|
|---|
| 21 | io \
|
|---|
| 22 | eval_micro \
|
|---|
| 23 | eval_macro \
|
|---|
| 24 | }}
|
|---|
| 25 |
|
|---|
| 26 | FIGURES = ${addsuffix .tex, \
|
|---|
| 27 | }
|
|---|
| 28 |
|
|---|
| 29 | PICTURES = ${addsuffix .pstex, \
|
|---|
| 30 | base \
|
|---|
| 31 | base_avg \
|
|---|
| 32 | empty \
|
|---|
| 33 | emptybit \
|
|---|
| 34 | emptytls \
|
|---|
| 35 | emptytree \
|
|---|
| 36 | fairness \
|
|---|
| 37 | io_uring \
|
|---|
| 38 | pivot_ring \
|
|---|
| 39 | system \
|
|---|
| 40 | cycle \
|
|---|
| 41 | result.cycle.jax.ops \
|
|---|
| 42 | }
|
|---|
| 43 |
|
|---|
| 44 | PROGRAMS = ${addsuffix .tex, \
|
|---|
| 45 | }
|
|---|
| 46 |
|
|---|
| 47 | GRAPHS = ${addsuffix .tex, \
|
|---|
| 48 | }
|
|---|
| 49 |
|
|---|
| 50 | ## Define the documents that need to be made.
|
|---|
| 51 | all: thesis.pdf
|
|---|
| 52 | thesis.pdf: ${TEXTS} ${FIGURES} ${PICTURES} thesis.tex glossary.tex local.bib ../../../LaTeXmacros/common.tex ../../../LaTeXmacros/common.sty
|
|---|
| 53 |
|
|---|
| 54 | DOCUMENT = thesis.pdf
|
|---|
| 55 | BASE = ${basename ${DOCUMENT}}
|
|---|
| 56 |
|
|---|
| 57 | # Directives #
|
|---|
| 58 |
|
|---|
| 59 | .NOTPARALLEL: # cannot make in parallel
|
|---|
| 60 |
|
|---|
| 61 | .PHONY : all clean # not file names
|
|---|
| 62 |
|
|---|
| 63 | all : ${DOCUMENT}
|
|---|
| 64 |
|
|---|
| 65 | clean :
|
|---|
| 66 | @rm -frv ${DOCUMENT} ${BASE}.ps ${Build}
|
|---|
| 67 |
|
|---|
| 68 | # File Dependencies #
|
|---|
| 69 |
|
|---|
| 70 | %.pdf : build/%.ps | ${Build}
|
|---|
| 71 | ps2pdf $<
|
|---|
| 72 |
|
|---|
| 73 | build/%.ps : build/%.dvi | ${Build}
|
|---|
| 74 | dvips $< -o $@
|
|---|
| 75 |
|
|---|
| 76 | build/%.dvi : %.tex Makefile | ${Build}
|
|---|
| 77 | # Conditionally create an empty *.ind (index) file for inclusion until makeindex is run.
|
|---|
| 78 | if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi
|
|---|
| 79 | # Must have *.aux file containing citations for bibtex
|
|---|
| 80 | if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} $< ; fi
|
|---|
| 81 | -${BibTeX} ${basename $@}
|
|---|
| 82 | # Some citations reference others so run again to resolve these citations
|
|---|
| 83 | ${LaTeX} $<
|
|---|
| 84 | -${BibTeX} ${basename $@}
|
|---|
| 85 | # Make index from *.aux entries and input index at end of document
|
|---|
| 86 | -makeglossaries -q -s ${basename $@}.ist ${basename $@}
|
|---|
| 87 | # Make index from *.aux entries and input index at end of document
|
|---|
| 88 | -makeindex ${basename $@}.idx
|
|---|
| 89 | # Run again to finish citations
|
|---|
| 90 | ${LaTeX} $<
|
|---|
| 91 |
|
|---|
| 92 | ## Define the default recipes.
|
|---|
| 93 |
|
|---|
| 94 | ${Build}:
|
|---|
| 95 | mkdir -p ${Build}
|
|---|
| 96 |
|
|---|
| 97 | %.tex : fig/%.fig | ${Build}
|
|---|
| 98 | fig2dev -L eepic $< > ${Build}/$@
|
|---|
| 99 |
|
|---|
| 100 | %.ps : fig/%.fig | ${Build}
|
|---|
| 101 | fig2dev -L ps $< > ${Build}/$@
|
|---|
| 102 |
|
|---|
| 103 | %.pstex : fig/%.fig | ${Build}
|
|---|
| 104 | fig2dev -L pstex $< > ${Build}/$@
|
|---|
| 105 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t
|
|---|
| 106 |
|
|---|
| 107 | %.pstex : build/%.svg | ${Build}
|
|---|
| 108 | inkscape -z -D --file=$< --export-eps=${Build}/$@ --export-latex
|
|---|
| 109 | mv ${Build}/$@_tex ${Build}/$@_t
|
|---|
| 110 | echo "sed -i 's/$@/${Build}/$@/g' ${Build}/$@_t"
|
|---|
| 111 | sed -i 's/$@/${Build}\/$@/g' ${Build}/$@_t
|
|---|
| 112 |
|
|---|
| 113 | build/fairness.svg : fig/fairness.py | ${Build}
|
|---|
| 114 | python3 $< $@
|
|---|
| 115 |
|
|---|
| 116 | build/result.%.ns.svg : data/% | ${Build}
|
|---|
| 117 | ../../../../benchmark/plot.py -f $< -o $@ -y "ns per ops"
|
|---|
| 118 |
|
|---|
| 119 | build/result.%.ops.svg : data/% | ${Build}
|
|---|
| 120 | ../../../../benchmark/plot.py -f $< -o $@ -y "Ops per second"
|
|---|
| 121 |
|
|---|
| 122 | ## pstex with inverted colors
|
|---|
| 123 | %.dark.pstex : fig/%.fig Makefile | ${Build}
|
|---|
| 124 | fig2dev -L pstex $< > ${Build}/$@
|
|---|
| 125 | sed -i 's/\/col-1 {0 setgray} bind def/\/col-1 {1 setgray} bind def/g' ${Build}/$@
|
|---|
| 126 | 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}/$@
|
|---|
| 127 | 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}/$@
|
|---|
| 128 | fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t
|
|---|
| 129 |
|
|---|
| 130 | # Local Variables: #
|
|---|
| 131 | # compile-command: "make" #
|
|---|
| 132 | # End: #
|
|---|