* doc/gen-examples-outputs-mk: Take sources as input instead of
programs.
* doc/examples-outputs.mk: Regen.
* doc/Makefile.am ($(DOC_SRCDIR)/examples-outputs.mk):
Adjust caller.
Use `find' to get inputs instead of relying on
$(PROGRAMS_examples).
Rename target as...
($(srcdir)/examples-outputs.mk): ...this.
Depend only on $(srcdir)/gen-examples-outputs-mk, and no longer on
$(srcdir)/Makefile.am.
(regen-examples-outputs-mk): Adjust as well.
* doc/programs-examples.mk: Adjust comments.
---
milena/ChangeLog | 18 ++++
milena/doc/Makefile.am | 25 ++++--
milena/doc/examples-outputs.mk | 161 +++++++++++++++++++++++++-----------
milena/doc/gen-examples-outputs-mk | 14 ++-
milena/doc/programs-examples.mk | 4 +-
5 files changed, 158 insertions(+), 64 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 7d50a30..2f4606f 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,23 @@
2010-03-17 Roland Levillain <roland(a)lrde.epita.fr>
+ Generate doc/examples-outputs.mk using sources in lieu of programs.
+
+ * doc/gen-examples-outputs-mk: Take sources as input instead of
+ programs.
+ * doc/examples-outputs.mk: Regen.
+ * doc/Makefile.am ($(DOC_SRCDIR)/examples-outputs.mk):
+ Adjust caller.
+ Use `find' to get inputs instead of relying on
+ $(PROGRAMS_examples).
+ Rename target as...
+ ($(srcdir)/examples-outputs.mk): ...this.
+ Depend only on $(srcdir)/gen-examples-outputs-mk, and no longer on
+ $(srcdir)/Makefile.am.
+ (regen-examples-outputs-mk): Adjust as well.
+ * doc/programs-examples.mk: Adjust comments.
+
+2010-03-17 Roland Levillain <roland(a)lrde.epita.fr>
+
Move bits about programs out of doc/Makefile.am to improve readability.
* doc/Makefile.am (PROGRAMS_examples)
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index 303b97f..6e2822f 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -909,19 +909,28 @@ MORE_OUTPUTS = \
$(srcdir)/outputs/parray-display-1.txt \
$(srcdir)/outputs/win-create-1-display.txt
-$(DOC_SRCDIR)/examples-outputs.mk: $(DOC_SRCDIR)/gen-examples-outputs-mk
$(srcdir)/Makefile.am
- $(DOC_SRCDIR)/gen-examples-outputs-mk $(PROGRAMS_examples) >$@.tmp
+$(srcdir)/examples-outputs.mk: $(srcdir)/gen-examples-outputs-mk
+ rm -f $@.tmp
+# Ignore sources in examples/trash/.
+ cd $(srcdir) && \
+ ./gen-examples-outputs-mk \
+ `find examples -name \*.cc -a \! -path examples/trash/\* \
+ | env LC_ALL=C sort` \
+ >examples-outputs.mk.tmp
mv -f $@.tmp $@
chmod -w $@
-include $(DOC_SRCDIR)/examples-outputs.mk
+include $(srcdir)/examples-outputs.mk
.PHONY: regen-examples-outputs-mk
regen-examples-outputs-mk:
- $(DOC_SRCDIR)/gen-examples-outputs-mk $(PROGRAMS_examples) \
- >$(DOC_SRCDIR)/examples-outputs.mk.tmp
- mv -f $(DOC_SRCDIR)/examples-outputs.mk.tmp \
- $(DOC_SRCDIR)/examples-outputs.mk
- chmod -w $(DOC_SRCDIR)/examples-outputs.mk
+ rm -f $(srcdir)/examples-outputs.mk.tmp
+ cd $(srcdir) && \
+ ./gen-examples-outputs-mk \
+ `find examples -name \*.cc -a \! -path examples/trash/\* \
+ | env LC_ALL=C sort` \
+ >examples-outputs.mk.tmp
+ mv -f $(srcdir)/examples-outputs.mk.tmp $(srcdir)/examples-outputs.mk
+ chmod -w $(srcdir)/examples-outputs.mk
MAINTAINERCLEANFILES += $(OUTPUTS)
diff --git a/milena/doc/examples-outputs.mk b/milena/doc/examples-outputs.mk
index 6fdb543..f70feca 100644
--- a/milena/doc/examples-outputs.mk
+++ b/milena/doc/examples-outputs.mk
@@ -1,295 +1,358 @@
## Generated by gen-examples-outputs-mk. Do not edit by hand.
-$(srcdir)/outputs/accu-right-instanciation.txt: accu-right-instanciation$(EXEEXT)
+$(srcdir)/outputs/accu-right-instanciation.txt: examples/accu-right-instanciation.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) accu-right-instanciation$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/borderthickness.txt: borderthickness$(EXEEXT)
+$(srcdir)/outputs/borderthickness.txt: examples/borderthickness.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) borderthickness$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/box2d-bbox.txt: box2d-bbox$(EXEEXT)
+$(srcdir)/outputs/box2d-bbox.txt: examples/box2d-bbox.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) box2d-bbox$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/domain-display.txt: domain-display$(EXEEXT)
+$(srcdir)/outputs/domain-display.txt: examples/domain-display.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) domain-display$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/dpoint-1.txt: dpoint-1$(EXEEXT)
+$(srcdir)/outputs/dpoint-1.txt: examples/dpoint-1.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) dpoint-1$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/estim-sites.txt: estim-sites$(EXEEXT)
+$(srcdir)/outputs/estim-sites.txt: examples/estim-sites.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) estim-sites$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/extend.txt: extend$(EXEEXT)
+$(srcdir)/outputs/extend.txt: examples/extend.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) extend$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/extension-ignore.txt: extension-ignore$(EXEEXT)
+$(srcdir)/outputs/extension-ignore.txt: examples/extension-ignore.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) extension-ignore$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/fill.txt: fill$(EXEEXT)
+$(srcdir)/outputs/fill-call-1.txt: examples/fill-call-1.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) fill-call-1$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/fill-call-1.txt: fill-call-1$(EXEEXT)
+$(srcdir)/outputs/fill-imageif-cfun.txt: examples/fill-imageif-cfun.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) fill-imageif-cfun$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/fill-imageif-cfun.txt: fill-imageif-cfun$(EXEEXT)
+$(srcdir)/outputs/fill-part-image.txt: examples/fill-part-image.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) fill-part-image$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/fill-part-image.txt: fill-part-image$(EXEEXT)
+$(srcdir)/outputs/fill-subdomain-shorter.txt: examples/fill-subdomain-shorter.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) fill-subdomain-shorter$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/fill-subdomain.txt: fill-subdomain$(EXEEXT)
+$(srcdir)/outputs/fill-subdomain.txt: examples/fill-subdomain.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) fill-subdomain$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/fill-subdomain-shorter.txt: fill-subdomain-shorter$(EXEEXT)
+$(srcdir)/outputs/fill.txt: examples/fill.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) fill$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/first_routine.txt: first_routine$(EXEEXT)
+$(srcdir)/outputs/forall-piter.txt: examples/forall-piter.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) forall-piter$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/forall-piter.txt: forall-piter$(EXEEXT)
+$(srcdir)/outputs/fun-p2v-1.txt: examples/fun-p2v-1.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) fun-p2v-1$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/fun-p2v-1.txt: fun-p2v-1$(EXEEXT)
+$(srcdir)/outputs/graph-data.txt: examples/graph-data.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) graph-data$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/graph-data.txt: graph-data$(EXEEXT)
+$(srcdir)/outputs/graph-iter.txt: examples/graph-iter.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) graph-iter$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/graph-iter.txt: graph-iter$(EXEEXT)
+$(srcdir)/outputs/ima-has.txt: examples/ima-has.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) ima-has$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/ima-has.txt: ima-has$(EXEEXT)
+$(srcdir)/outputs/ima-load.txt: examples/ima-load.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) ima-load$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/ima-save.txt: ima-save$(EXEEXT)
+$(srcdir)/outputs/ima-save.txt: examples/ima-save.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) ima-save$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/ima-size.txt: ima-size$(EXEEXT)
+$(srcdir)/outputs/ima-size.txt: examples/ima-size.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) ima-size$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/ima2d-1.txt: ima2d-1$(EXEEXT)
+$(srcdir)/outputs/ima2d-1.txt: examples/ima2d-1.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) ima2d-1$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/ima2d-2.txt: ima2d-2$(EXEEXT)
+$(srcdir)/outputs/ima2d-2.txt: examples/ima2d-2.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) ima2d-2$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/ima2d-3.txt: ima2d-3$(EXEEXT)
+$(srcdir)/outputs/ima2d-3.txt: examples/ima2d-3.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) ima2d-3$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/ima2d-4.txt: ima2d-4$(EXEEXT)
+$(srcdir)/outputs/ima2d-4.txt: examples/ima2d-4.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) ima2d-4$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/ima2d-5.txt: ima2d-5$(EXEEXT)
+$(srcdir)/outputs/ima2d-5.txt: examples/ima2d-5.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) ima2d-5$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/ima2d-6-clone.txt: ima2d-6-clone$(EXEEXT)
+$(srcdir)/outputs/ima2d-6-clone.txt: examples/ima2d-6-clone.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) ima2d-6-clone$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/ima2d-7.txt: ima2d-7$(EXEEXT)
+$(srcdir)/outputs/ima2d-7.txt: examples/ima2d-7.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) ima2d-7$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/ima2d-rot.txt: ima2d-rot$(EXEEXT)
+$(srcdir)/outputs/ima2d-rot.txt: examples/ima2d-rot.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) ima2d-rot$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/labeling-compute.txt: labeling-compute$(EXEEXT)
+$(srcdir)/outputs/labeling-compute.txt: examples/labeling-compute.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) labeling-compute$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/logical-not.txt: logical-not$(EXEEXT)
+$(srcdir)/outputs/logical-not.txt: examples/logical-not.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) logical-not$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/mln_var.txt: mln_var$(EXEEXT)
+$(srcdir)/outputs/mln_var.txt: examples/mln_var.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) mln_var$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/parray-append.txt: parray-append$(EXEEXT)
+$(srcdir)/outputs/parray-append.txt: examples/parray-append.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) parray-append$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/parray-bbox.txt: parray-bbox$(EXEEXT)
+$(srcdir)/outputs/parray-bbox.txt: examples/parray-bbox.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) parray-bbox$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/paste.txt: paste$(EXEEXT)
+$(srcdir)/outputs/paste-call-1.txt: examples/paste-call-1.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) paste-call-1$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/paste-call-1.txt: paste-call-1$(EXEEXT)
+$(srcdir)/outputs/paste.txt: examples/paste.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) paste$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/point-1.txt: point-1$(EXEEXT)
+$(srcdir)/outputs/point-1.txt: examples/point-1.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) point-1$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/predicate-1.txt: predicate-1$(EXEEXT)
+$(srcdir)/outputs/predicate-1.txt: examples/predicate-1.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) predicate-1$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/win-create-1.txt: win-create-1$(EXEEXT)
+$(srcdir)/outputs/tuto2_first_image.txt: examples/tuto2_first_image.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) tuto2_first_image$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/win-create-2.txt: win-create-2$(EXEEXT)
+$(srcdir)/outputs/colorize.txt: examples/tuto3/colorize.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) colorize$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/tuto2_first_image.txt: tuto2_first_image$(EXEEXT)
+$(srcdir)/outputs/first_routine.txt: examples/tuto3/first_routine.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) first_routine$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/tuto3_rw_image.txt: tuto3_rw_image$(EXEEXT)
+$(srcdir)/outputs/println.txt: examples/tuto3/println.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) println$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/tuto4_genericity_and_algorithms.txt:
tuto4_genericity_and_algorithms$(EXEEXT)
+$(srcdir)/outputs/trace.txt: examples/tuto3/trace.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) trace$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/tuto3_colorize.txt: tuto3_colorize$(EXEEXT)
+$(srcdir)/outputs/tuto3_rw_image.txt: examples/tuto3_rw_image.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) tuto3_rw_image$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/tuto3_println.txt: tuto3_println$(EXEEXT)
+$(srcdir)/outputs/image.txt: examples/tuto4/image.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) image$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/tuto3_trace.txt: tuto3_trace$(EXEEXT)
+$(srcdir)/outputs/point2d.txt: examples/tuto4/point2d.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) point2d$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/tuto4_point2d.txt: tuto4_point2d$(EXEEXT)
+$(srcdir)/outputs/site_set_create.txt: examples/tuto4/site_set_create.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) site_set_create$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
-$(srcdir)/outputs/tuto4_site_set_create.txt: tuto4_site_set_create$(EXEEXT)
+$(srcdir)/outputs/tuto4_genericity_and_algorithms.txt:
examples/tuto4_genericity_and_algorithms.cc
rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) tuto4_genericity_and_algorithms$(EXEEXT)
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/win-create-1.txt: examples/win-create-1.cc
+ rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) win-create-1$(EXEEXT)
+ ./$< >$@.tmp
+ cp -f $@.tmp $@
+ rm -f $@.tmp
+
+$(srcdir)/outputs/win-create-2.txt: examples/win-create-2.cc
+ rm -f $@.tmp
+ $(MAKE) $(AM_MAKEFLAGS) win-create-2$(EXEEXT)
./$< >$@.tmp
cp -f $@.tmp $@
rm -f $@.tmp
diff --git a/milena/doc/gen-examples-outputs-mk b/milena/doc/gen-examples-outputs-mk
index 10692a1..2580072 100755
--- a/milena/doc/gen-examples-outputs-mk
+++ b/milena/doc/gen-examples-outputs-mk
@@ -20,17 +20,23 @@
me=`basename $0`
-test $# -ne 0 || { echo "usage: $me PROGRAMS..."; exit 1; }
+test $# -ne 0 || { echo "usage: $me SOURCES..."; exit 1; }
cat<<EOF
## Generated by $me. Do not edit by hand.
EOF
-for program; do
-cat<<EOF
-\$(srcdir)/outputs/$program.txt: $program\$(EXEEXT)
+for source; do
+ program=`basename "$source" .cc`
+ # Have outputs depend on sources rather than programs, and recompile
+ # the latter to regen the former only when needed. This way, we can
+ # ship generated outputs without forcing the user of the
+ # distribution to recompile the programs.
+ cat<<EOF
+\$(srcdir)/outputs/$program.txt: $source
rm -f \$@.tmp
+ \$(MAKE) \$(AM_MAKEFLAGS) $program\$(EXEEXT)
./\$< >\$@.tmp
cp -f \$@.tmp \$@
rm -f \$@.tmp
diff --git a/milena/doc/programs-examples.mk b/milena/doc/programs-examples.mk
index b75152b..4a38dd3 100644
--- a/milena/doc/programs-examples.mk
+++ b/milena/doc/programs-examples.mk
@@ -20,9 +20,7 @@
## generation of examples-outputs.mk depends only on this file, instead
## of Makefile.am.
-## FIXME: Generate this file? Probably a good idea. If so, we
-## probably won't need to have examples-outputs.mk depend on it (which
-## will simplify the regen calling sequence in bootstrap as well).
+## FIXME: Generate this file? Probably a good idea.
##
## If generated, merge examples-outputs.mk and outputs.mk?
--
1.5.6.5
Show replies by date