source: doc/theses/mike_brooks_MMath/Makefile@ 7d02d35

Last change on this file since 7d02d35 was f85de47, checked in by Michael Brooks <mlbrooks@…>, 6 months ago

String chapter work.

General copy-editing throughout the chapter.

Rewrite and elaborate "RAII limitations."

Move "Logical overlap" up to features' section and integrate flow with assignment-semantics predecessor.

Re-brand "Memory management" as "General implementation," and move to front of "Storage Management."

Elaborate performance experiment descriptions, giving harness sketches.

Convert first performance experiment graph (peq-cppemu) to draw directly from benchmark result file, now included in git. Similar work on remaining graphs, and adding missing data, is forthcoming.

To build thesis may now require pip3 install pandas.

  • Property mode set to 100644
File size: 3.6 KB
Line 
1# Configuration variables
2
3Build = build
4
5Benchmarks = benchmarks
6Pictures = pictures
7Plots = plots
8Programs = programs
9
10LaTMac = ../../LaTeXmacros
11BibRep = ../../bibliography
12
13TeXSRC = ${wildcard *.tex}
14PicSRC = ${notdir ${wildcard ${Pictures}/*.png}} ${notdir ${wildcard ${Pictures}/*.fig}}
15PicSRC := ${PicSRC:.fig=.pdf} # substitute ".fig" with ".pdf"
16GraphSRC_OLD = ${notdir ${wildcard ${Pictures}/*.dat}}
17GraphSRC_OLD := ${GraphSRC_OLD:.dat=.pdf} # substitute ".dat" with ".pdf"
18PlotINPUTS = ${wildcard ${Plots}/*.gp} ${wildcard ${Plots}/*.py}
19PlotINPUTS := ${addsuffix .INPUTS,${PlotINPUTS}}
20PlotSRC = ${notdir ${wildcard ${Plots}/*.gp}}
21PlotSRC := ${addprefix ${Build}/plot-,${PlotSRC:.gp=.pdf}} # substitute ".gp" with ".pdf"
22DemoPgmSRC = ${notdir ${wildcard ${Programs}/*-demo.cfa}}
23PgmSRC = ${notdir ${wildcard ${Programs}/*}}
24RunPgmSRC = ${notdir ${wildcard ${Programs}/*.run.*}}
25BibSRC = ${wildcard *.bib}
26
27TeXLIB = .:${LaTMac}:${Build}: # common latex macros
28BibLIB = .:${BibRep}: # common citation repository
29
30#MAKEFLAGS = --no-print-directory # --silent
31VPATH = ${Build} ${Pictures} ${Programs} # extra search path for file names used in document
32
33DOCUMENT = uw-ethesis.pdf
34BASE = ${basename ${DOCUMENT}} # remove suffix
35
36RunPgmExe = ${addprefix ${Build}/,${basename ${basename ${RunPgmSRC}}}}
37RunPgmOut = ${RunPgmExe:%=%.out}
38DemoPgmExe = ${addprefix ${Build}/,${basename ${basename ${DemoPgmSRC}}}}
39DemoPgmOut = ${DemoPgmExe:%=%.out}
40
41# Commands
42
43LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && pdflatex -halt-on-error -output-directory=${Build}
44BibTeX = BIBINPUTS=${BibLIB} && export BIBINPUTS && bibtex
45CFA = cfa -O0 -g
46CC = gcc -O0 -g
47CXX = g++-11 --std=c++20 -O0 -g
48
49# Rules and Recipes
50
51.PHONY : all clean # not file names
52.SECONDARY:
53#.PRECIOUS : ${Build}/% # don't delete intermediates
54.ONESHELL :
55
56all : ${DOCUMENT}
57
58clean :
59 @rm -frv ${DOCUMENT} ${Build}
60
61# File Dependencies
62
63${DOCUMENT}: ${TeXSRC} $(RunPgmOut) ${DemoPgmOut} ${GraphSRC_OLD} ${PlotSRC} ${PicSRC} ${BibSRC} ${BibRep}/pl.bib ${LaTMac}/common.tex Makefile | ${Build}
64 echo ${PicSRC}
65 echo ${GraphSRC_OLD}
66 ${LaTeX} ${BASE}
67 ${BibTeX} ${Build}/${BASE}
68 ${LaTeX} ${BASE}
69 # if needed, run latex again to get citations
70 if fgrep -s "LaTeX Warning: Citation" ${basename $@}.log ; then ${LaTeX} ${BASE} ; fi
71# ${Glossary} ${Build}/${BASE}
72# ${LaTeX} ${BASE}
73 cp ${Build}/$@ $@
74
75${Build}:
76 mkdir -p $@
77
78${Build}/%-demo: ${Programs}/%-demo.cfa | ${Build}
79 ${CFA} $< -o $@
80
81${Build}/%: ${Programs}/%-demo.cfa | ${Build}
82 ${CFA} $< -o $@
83
84${Build}/%: ${Programs}/%.run.cfa | ${Build} # cfa cannot handle pipe
85 sed -f ${Programs}/sedcmd $< > ${Build}/tmp.cfa; ${CFA} ${Build}/tmp.cfa -o $@
86
87${Build}/%: ${Programs}/%.run.c | ${Build}
88 sed -f ${Programs}/sedcmd $< | ${CC} -x c -I ${Programs} -o $@ -
89
90${Build}/%: ${Programs}/%.run.cpp | ${Build}
91 sed -f ${Programs}/sedcmd $< | ${CXX} -x c++ -I ${Programs} -o $@ -
92
93${Build}/%.out: ${Build}/% | ${Build}
94 $< > $@
95
96string-graph-peq-sharing.pdf: string-graph-peq-sharing.dat plot-peq-sharing.gp | ${Build}
97 gnuplot plot-peq-sharing.gp
98
99string-graph-pta-sharing.pdf: string-graph-pta-sharing.dat plot-pta-sharing.gp | ${Build}
100 gnuplot plot-pta-sharing.gp
101
102string-graph-pbv.pdf: string-graph-pbv.dat plot-pbv.gp | ${Build}
103 gnuplot plot-pbv.gp
104
105string-graph-allocn.pdf: string-graph-allocn.dat plot-allocn.gp | ${Build}
106 gnuplot plot-allocn.gp
107
108%.pdf: %.fig | ${Build}
109 fig2dev -L pdf $< > ${Build}/$@
110
111-include $(Plots)/string-peq-cppemu.d
112
113${Build}/plot-%.dat: ${Plots}/%.py ${Plots}/%.py.INPUTS | ${Build}
114 echo ${PlotINPUTS}
115 python3 $< > $@
116
117${Build}/plot-%.pdf: ${Plots}/%.gp ${Plots}/%.gp.INPUTS | ${Build}
118 gnuplot $<
119
120#-include ${Build}/*.d
Note: See TracBrowser for help on using the repository browser.