Index: doc/theses/mike_brooks_MMath/Makefile
===================================================================
--- doc/theses/mike_brooks_MMath/Makefile	(revision 297b7965bfaea98605539ba4cb7729d6b868dcc9)
+++ doc/theses/mike_brooks_MMath/Makefile	(revision 489d3ba602f6e02e57ae61a5328cf048be74914a)
@@ -10,5 +10,5 @@
 TeXSRC = ${wildcard *.tex}
 PicSRC = ${notdir ${wildcard ${Pictures}/*.png}}
-DemoSRC = ${notdir ${wildcard ${Programs}/*-demo.cfa}}
+DemoPgmSRC = ${notdir ${wildcard ${Programs}/*-demo.cfa}}
 PgmSRC = ${notdir ${wildcard ${Programs}/*}}
 RunPgmSRC = ${notdir ${wildcard ${Programs}/*.run.*}}
@@ -24,7 +24,8 @@
 BASE = ${basename ${DOCUMENT}}			# remove suffix
 
-DemoTex = ${DemoSRC:%.cfa=${Build}/%.tex} 
 RunPgmExe = ${addprefix ${Build}/,${basename ${basename ${RunPgmSRC}}}}
 RunPgmOut = ${RunPgmExe:%=%.out}
+DemoPgmExe = ${addprefix ${Build}/,${basename ${basename ${DemoPgmSRC}}}}
+DemoPgmOut = ${DemoPgmExe:%=%.out}
 
 # Commands
@@ -38,11 +39,10 @@
 # Rules and Recipes
 
-.PHONY : all fragments_ran clean			# not file names
-.PRECIOUS : ${Build}/% ${Build}/%-demo      # don't delete intermediates
+.PHONY : all clean				# not file names
+.SECONDARY:
+#.PRECIOUS : ${Build}/%				# don't delete intermediates
 .ONESHELL :
 
-all : fragments_ran ${DOCUMENT}
-
-fragments_ran : $(RunPgmOut)
+all : ${DOCUMENT}
 
 clean :
@@ -51,5 +51,5 @@
 # File Dependencies
 
-%.pdf : ${TeXSRC} ${DemoTex} ${PicSRC} ${PgmSRC} ${BibSRC} ${BibRep}/pl.bib ${LaTMac}/common.tex Makefile | ${Build}
+%.pdf : ${TeXSRC} $(RunPgmOut) ${DemoPgmOut} ${PicSRC} ${BibSRC} ${BibRep}/pl.bib ${LaTMac}/common.tex Makefile | ${Build}
 	${LaTeX} ${BASE}
 	${BibTeX} ${Build}/${BASE}
@@ -64,8 +64,8 @@
 	mkdir -p $@
 
-%-demo.tex: %-demo | ${Build}
-	$< > $@
+${Build}/%-demo: ${Programs}/%-demo.cfa | ${Build}
+	${CFA} $< -o $@
 
-${Build}/%-demo: ${Programs}/%-demo.cfa | ${Build}
+${Build}/%: ${Programs}/%-demo.cfa | ${Build}
 	${CFA} $< -o $@
 
