3include ${DOCNAME}-deps.mk
5define get-target-source
6$(shell echo $1 | sed -e "s/.*__//")
9define get-target-method
10$(shell echo $1 | sed -e "s/__.*//")
13# Make a list of all result files for given statement file
15$(foreach method,${ALL_METHODS},${method}__$1-results)
18ifneq (${MAKELEVEL}, 0)
20.PRECIOUS: %-plot.mps %-results %-all-plots.mps
24.PHONY: doc clean ${SOURCEDIR}
26%-full-listing.tex: ${SOURCEDIR}/% \
27 source-full-listing.sh source-full-listing.tpl.tex
28 $(SHELL) source-full-listing.sh $< > $@
30%-tag-listing.tex: ${SOURCEDIR}/$$(call get-target-source,$$*) \
31 tag-listing.sh tag-listing.tpl.tex grok-lisp.el
32 $(SHELL) tag-listing.sh $(shell echo $* | sed -e "s/__.*//") $< > $@
34%-initial-data.tex: ${SOURCEDIR}/% initial-data.sh initial-data.tpl.tex
35 $(SHELL) initial-data.sh $< > $@
37%-results: ${SOURCEDIR}/$$(call get-target-source,$$*) \
38 ${SOURCEDIR}/$$(call get-target-method,$$*)-solution.scm \
39 ${SHARED_SOURCES} results.sh
40 $(SHELL) results.sh $< $(call get-target-method,$*) dispatcher.scm ${SOURCEDIR} > $@
42%-all-plots.mps: $(call all-results,%) \
43 plot-results.sh plot.tpl.mp
44 $(SHELL) plot-results.sh $(call all-results,$*)
46%-plot.mps: %-results plot-results.sh plot.tpl.mp
47 $(SHELL) plot-results.sh $<
49%-results.tex: %-results %-plot.mps texify-results.sh results.tpl.tex
50 $(SHELL) texify-results.sh $< > $@
52${DOCNAME}.aux: ${INCLUDES} ${FIGS} ${DOCNAME}.tex ${DOCNAME}.bib
56${DOCNAME}.pdf: report.aux
60${DOCNAME}-deps.mk: ${DOCNAME}.tex
61 texdepend -o $@ -print=if $<
66 @rm -frv `hg status --unknown --no-status`