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