Index: doc/theses/mike_brooks_MMath/Makefile
===================================================================
--- doc/theses/mike_brooks_MMath/Makefile	(revision b1c220a2399317045242cbfc0393a483f0424241)
+++ doc/theses/mike_brooks_MMath/Makefile	(revision ae0c1c3bd041ed739c4bdaa8dd6b3cd33d35f692)
@@ -2,5 +2,8 @@
 
 Build = build
+
+Benchmarks = benchmarks
 Pictures = pictures
+Plots = plots
 Programs = programs
 
@@ -11,6 +14,10 @@
 PicSRC = ${notdir ${wildcard ${Pictures}/*.png}} ${notdir ${wildcard ${Pictures}/*.fig}}
 PicSRC := ${PicSRC:.fig=.pdf}		# substitute ".fig" with ".pdf"
-GraphSRC = ${notdir ${wildcard ${Pictures}/*.dat}}
-GraphSRC := ${GraphSRC:.dat=.pdf}		# substitute ".dat" with ".pdf"
+GraphSRC_OLD = ${notdir ${wildcard ${Pictures}/*.dat}}
+GraphSRC_OLD := ${GraphSRC_OLD:.dat=.pdf}		# substitute ".dat" with ".pdf"
+PlotINPUTS = ${wildcard ${Plots}/*.gp} ${wildcard ${Plots}/*.py}
+PlotINPUTS := ${addsuffix .INPUTS,${PlotINPUTS}}
+PlotSRC = ${notdir ${wildcard ${Plots}/*.gp}}
+PlotSRC := ${addprefix ${Build}/plot-,${PlotSRC:.gp=.pdf}}		# substitute ".gp" with ".pdf"
 DemoPgmSRC = ${notdir ${wildcard ${Programs}/*-demo.cfa}}
 PgmSRC = ${notdir ${wildcard ${Programs}/*}}
@@ -42,5 +49,5 @@
 # Rules and Recipes
 
-.PHONY : all clean				# not file names
+.PHONY : all clean			# not file names
 .SECONDARY:
 #.PRECIOUS : ${Build}/%				# don't delete intermediates
@@ -54,7 +61,7 @@
 # File Dependencies
 
-${DOCUMENT}: ${TeXSRC} $(RunPgmOut) ${DemoPgmOut} ${GraphSRC} ${PicSRC} ${BibSRC} ${BibRep}/pl.bib ${LaTMac}/common.tex Makefile | ${Build}
+${DOCUMENT}: ${TeXSRC} $(RunPgmOut) ${DemoPgmOut} ${GraphSRC_OLD} ${PlotSRC} ${PicSRC} ${BibSRC} ${BibRep}/pl.bib ${LaTMac}/common.tex Makefile | ${Build}
 	echo ${PicSRC}
-	echo ${GraphSRC}
+	echo ${GraphSRC_OLD}
 	${LaTeX} ${BASE}
 	${BibTeX} ${Build}/${BASE}
@@ -87,7 +94,4 @@
 	$< > $@
 
-string-graph-peq-cppemu.pdf: string-graph-peq-cppemu.dat plot-peq-cppemu.gp | ${Build}
-	gnuplot plot-peq-cppemu.gp
-
 string-graph-peq-sharing.pdf: string-graph-peq-sharing.dat plot-peq-sharing.gp | ${Build}
 	gnuplot plot-peq-sharing.gp
@@ -105,3 +109,12 @@
 	fig2dev -L pdf $< > ${Build}/$@
 
+-include $(Plots)/string-peq-cppemu.d
+
+${Build}/plot-%.dat: ${Plots}/%.py ${Plots}/%.py.INPUTS | ${Build}
+	echo ${PlotINPUTS}	
+	python3 $< > $@
+
+${Build}/plot-%.pdf: ${Plots}/%.gp ${Plots}/%.gp.INPUTS | ${Build}
+	gnuplot $<
+
 #-include ${Build}/*.d
