Index: doc/theses/thierry/Makefile
===================================================================
--- doc/theses/thierry/Makefile	(revision cf68d04b367d8d879c5a9d03ac024235346ad5b9)
+++ doc/theses/thierry/Makefile	(revision cf68d04b367d8d879c5a9d03ac024235346ad5b9)
@@ -0,0 +1,147 @@
+## Define the appropriate configuration variables.
+
+TeXLIB = .:./style:./text:./annex:./build:../../LaTeXmacros:../../LaTeXmacros/listings:../../LaTeXmacros/enumitem:~/bibliographies:/usr/local/bibliographies:
+LaTeX  = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=build -interaction=nonstopmode
+BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex -terse
+
+## Define the text source files.
+
+SOURCES = ${addsuffix .tex, \
+thesis \
+style/style \
+style/cfa-format \
+annex/glossary \
+text/frontpgs \
+text/intro \
+text/basics \
+text/cforall \
+text/concurrency \
+text/internals \
+text/parallelism \
+text/results \
+text/together \
+text/future \
+}
+
+FIGURES = ${addprefix build/, ${addsuffix .tex, \
+	monitor \
+	ext_monitor \
+	int_monitor \
+	dependency \
+}}
+
+PICTURES = ${addprefix build/, ${addsuffix .pstex, \
+	system \
+	monitor_structs \
+}}
+
+PROGRAMS = ${addsuffix .tex, \
+}
+
+GRAPHS = ${addsuffix .tex, \
+}
+
+## Define the documents that need to be made.
+
+DOCUMENT = thesis.pdf
+
+# Directives #
+
+all : ${DOCUMENT}
+
+clean :
+	@rm -fv ${DOCUMENT} \
+	build/*.acn     \
+	build/*.acr     \
+	build/*.alg     \
+	build/*.aux     \
+	build/*.bbl     \
+	build/*.blg     \
+	build/*.brf     \
+	build/*.cf      \
+	build/*.dvi     \
+	build/*.glg     \
+	build/*.glo     \
+	build/*.gls     \
+	build/*.ist     \
+	build/*.idx     \
+	build/*.ilg     \
+	build/*.ind     \
+	build/*.log     \
+	build/*.out     \
+	build/*.ps      \
+	build/*.pstex   \
+	build/*.pstex_t \
+	build/*.tex     \
+	build/*.toc     \
+	build/*.lof     \
+	build/*.lol     \
+	build/*.lot     \
+	figures/*.tex   \
+	*.png           \
+
+
+# File Dependencies #
+
+${DOCUMENT} : build/${basename ${DOCUMENT}}.ps
+	ps2pdf $<
+
+build/${basename ${DOCUMENT}}.ps : build/${basename ${DOCUMENT}}.dvi
+	dvips $< -o $@
+
+build/${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${basename ${DOCUMENT}}.tex ../../LaTeXmacros/common.tex ../../LaTeXmacros/indexstyle annex/local.bib
+
+	@ if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi 				# Conditionally create an empty *.ind (index) file for inclusion until makeindex is run.
+	@ echo "Citation lookup"											# Must have *.aux file containing citations for bibtex
+	@ if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename ${notdir $@}}.tex ; fi
+	@ echo "Citation Pass 1"
+	@ -${BibTeX} ${basename $@}											# Some citations reference others so run steps again to resolve these citations
+	@ echo "Citation Pass 2"
+	@ ${LaTeX} ${basename ${notdir $@}}.tex
+	@ -${BibTeX} ${basename $@}
+	@ echo "Glossary"
+	@ makeglossaries -q -s ${basename $@}.ist ${basename $@}						# Make index from *.aux entries and input index at end of document
+	@ echo ".dvi generation"
+	@ -build/bump_ver.sh
+	@ ${LaTeX} ${basename ${notdir $@}}.tex									# Run again to get index title into table of contents
+
+
+predefined :
+	sed -f predefined.sed ${basename ${DOCUMENT}}.tex > ${basename $@}.cf
+
+## Define the default recipes.
+
+build/%.tex : figures/%.fig
+	fig2dev -L eepic $< > $@
+
+build/%.ps : figures/%.fig
+	fig2dev -L ps $< > $@
+
+build/%.pstex : figures/%.fig
+	fig2dev -L pstex $< > $@
+	fig2dev -L pstex_t -p $@ $< > $@_t
+
+figures/%.tex: build/%.pstex
+	echo -n 	"\documentclass[preview]{standalone}\n" 	\
+			"\usepackage[T1]{fontenc}\n" 			\
+			"\usepackage[usenames]{color}\n" 		\
+			"\usepackage{graphicx}\n" 			\
+			"\usepackage{listings}\n" 			\
+			"\usepackage{xspace}\n" 			\
+			"\input{style}\n" 				\
+			"\\\\begin{document}\n"				\
+			"{\\\\resizebox{3\\\\textwidth}{!}{\input{${basename ${notdir $@}}.pstex_t}}}\n" \
+			"\end{document}" > $@
+
+%.png : build/%.pstex figures/%.tex
+	echo ${basename $@}
+	${LaTeX} figures/${basename $@}.tex
+	dvips build/${basename $@}.dvi -o build/${basename $@}.ps
+	ps2pdf build/${basename $@}.ps
+	convert -negate ${basename $@}.pdf $@
+
+
+
+# Local Variables: #
+# compile-command: "make" #
+# End: #
