* doc/tutorial/Makefile.am (regen-dist): New (phony) target.
Depend on $(srcdir)/headers.stamp.
($(srcdir)/examples/examples.mk)
($(srcdir)/figures/figures.mk)
($(srcdir)/outputs/outputs.mk)
($(srcdir)/samples/samples.mk):
New targets.
Depend on $(srcdir)/headers.stamp.
(EXTRA_DIST): Add $(srcdir)/headers.stamp.
($(srcdir)/headers.stamp): New target.
Simplify included file names.
* doc/tutorial/headers.stamp: New.
* doc/tutorial/generate_dist_files.sh (ECHO_N): New.
Set to printf. Use it instead of `echo -n'.
* doc/tutorial/examples/examples.mk,
* doc/tutorial/figures/figures.mk,
* doc/tutorial/outputs/outputs.mk,
* doc/tutorial/samples/samples.mk:
Regen.
---
milena/ChangeLog | 24 ++++++++
milena/doc/tutorial/Makefile.am | 22 ++++++--
milena/doc/tutorial/examples/examples.mk | 41 +++++++-------
milena/doc/tutorial/figures/figures.mk | 48 ++++++++--------
milena/doc/tutorial/generate_dist_files.sh | 17 +++++--
milena/doc/tutorial/outputs/outputs.mk | 78 +++++++++++++-------------
milena/doc/tutorial/samples/samples.mk | 81 ++++++++++++++--------------
7 files changed, 180 insertions(+), 131 deletions(-)
create mode 100644 milena/doc/tutorial/headers.stamp
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 9d3951f..ab47d33 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,29 @@
2009-02-03 Roland Levillain <roland(a)lrde.epita.fr>
+ Improve the portability of the generation of the tutorial.
+
+ * doc/tutorial/Makefile.am (regen-dist): New (phony) target.
+ Depend on $(srcdir)/headers.stamp.
+ ($(srcdir)/examples/examples.mk)
+ ($(srcdir)/figures/figures.mk)
+ ($(srcdir)/outputs/outputs.mk)
+ ($(srcdir)/samples/samples.mk):
+ New targets.
+ Depend on $(srcdir)/headers.stamp.
+ (EXTRA_DIST): Add $(srcdir)/headers.stamp.
+ ($(srcdir)/headers.stamp): New target.
+ Simplify included file names.
+ * doc/tutorial/headers.stamp: New.
+ * doc/tutorial/generate_dist_files.sh (ECHO_N): New.
+ Set to printf. Use it instead of `echo -n'.
+ * doc/tutorial/examples/examples.mk,
+ * doc/tutorial/figures/figures.mk,
+ * doc/tutorial/outputs/outputs.mk,
+ * doc/tutorial/samples/samples.mk:
+ Regen.
+
+2009-02-03 Roland Levillain <roland(a)lrde.epita.fr>
+
* headers.mk: Regen.
2009-02-03 Roland Levillain <roland(a)lrde.epita.fr>
diff --git a/milena/doc/tutorial/Makefile.am b/milena/doc/tutorial/Makefile.am
index 88be83d..ceb4534 100644
--- a/milena/doc/tutorial/Makefile.am
+++ b/milena/doc/tutorial/Makefile.am
@@ -40,11 +40,25 @@ EXTRA_DIST = \
tutorial.tex \
tutorial.pdf
+.PHONY: regen-dist
+regen-dist: $(srcdir)/headers.stamp
-include $(top_srcdir)/milena/doc/tutorial/examples/examples.mk
-include $(top_srcdir)/milena/doc/tutorial/figures/figures.mk
-include $(top_srcdir)/milena/doc/tutorial/outputs/outputs.mk
-include $(top_srcdir)/milena/doc/tutorial/samples/samples.mk
+$(srcdir)/examples/examples.mk: $(srcdir)/headers.stamp
+$(srcdir)/figures/figures.mk: $(srcdir)/headers.stamp
+$(srcdir)/outputs/outputs.mk: $(srcdir)/headers.stamp
+$(srcdir)/samples/samples.mk: $(srcdir)/headers.stamp
+
+EXTRA_DIST += $(srcdir)/headers.stamp
+$(srcdir)/headers.stamp: $(srcdir)/generate_dist_files.sh
+ @rm -f $@.tmp
+ @touch $@.tmp
+ cd $(srcdir) && ./generate_dist_files.sh
+ @mv -f $@.tmp $@
+
+include $(srcdir)/examples/examples.mk
+include $(srcdir)/figures/figures.mk
+include $(srcdir)/outputs/outputs.mk
+include $(srcdir)/samples/samples.mk
EXTRA_DIST += \
tools/sample_utils.hh \
diff --git a/milena/doc/tutorial/examples/examples.mk
b/milena/doc/tutorial/examples/examples.mk
index 7458ead..b6704dc 100644
--- a/milena/doc/tutorial/examples/examples.mk
+++ b/milena/doc/tutorial/examples/examples.mk
@@ -1,28 +1,29 @@
-## Generated by ../generate_dist_files, do not modify ##
+## Generated by ../generate_dist_files, do not modify.
+
EXTRA_DIST += \
+examples/accu.cc \
+examples/box.cc \
examples/cpp_issue.cc \
-examples/sub_image.cc \
-examples/sub_image_if.cc \
-examples/p_vaccess.cc \
-examples/win_multiple.cc \
-examples/image2d.cc \
-examples/image_plain.cc \
-examples/p_run.cc \
-examples/proxy.cc \
-examples/p_array.2.cc \
examples/examples.mk \
examples/for_Z.cc \
+examples/image2d.cc \
+examples/image_flat.cc \
examples/image_if.cc \
+examples/image_plain.cc \
+examples/image_safe.cc \
+examples/p_array.2.cc \
+examples/p_array.cc \
+examples/p_image.cc \
+examples/p_key.2.cc \
examples/p_key.cc \
+examples/p_line2d.cc \
examples/p_mutable_array_of.cc \
examples/p_queue.cc \
-examples/image_flat.cc \
-examples/p_image.cc \
-examples/box.cc \
-examples/p_line2d.cc \
-examples/p_array.cc \
-examples/accu.cc \
-examples/p_key.2.cc \
-examples/window.cc \
-examples/image_safe.cc \
-examples/vec.cc
+examples/p_run.cc \
+examples/p_vaccess.cc \
+examples/proxy.cc \
+examples/sub_image.cc \
+examples/sub_image_if.cc \
+examples/vec.cc \
+examples/win_multiple.cc \
+examples/window.cc
diff --git a/milena/doc/tutorial/figures/figures.mk
b/milena/doc/tutorial/figures/figures.mk
index aba2682..39793cc 100644
--- a/milena/doc/tutorial/figures/figures.mk
+++ b/milena/doc/tutorial/figures/figures.mk
@@ -1,32 +1,32 @@
-## Generated by ../generate_dist_files, do not modify ##
+## Generated by ../generate_dist_files, do not modify.
+
EXTRA_DIST += \
-figures/ima2d-rot-2.ppm \
-figures/tuto3_rw_image-1.ppm \
-figures/logical-not-2.pbm \
+figures/figures.mk \
+figures/fill-subdomain-1.pbm \
figures/fill-subdomain-2.ppm \
-figures/tuto4_genericity_and_algorithms-9.pgm \
-figures/labeling-compute-2.ppm \
-figures/tuto4_genericity_and_algorithms-7.pgm \
-figures/tuto4_genericity_and_algorithms-5.ppm \
-figures/ima2d-rot-1.ppm \
figures/fill-subdomain-3.ppm \
-figures/tuto4_genericity_and_algorithms-9.ppm \
-figures/logical-not-1.pbm \
-figures/ima_save.pbm \
-figures/figures.mk \
-figures/fill-subimage-cfun-1.ppm \
figures/fill-subdomain-4.ppm \
-figures/tuto4_genericity_and_algorithms-7.ppm \
-figures/tuto4_genericity_and_algorithms-6.ppm \
-figures/logical-not-3.pbm \
-figures/tuto4_genericity_and_algorithms-3.pbm \
-figures/tuto1_first_image-1.pbm \
-figures/tuto4_genericity_and_algorithms-1.ppm \
-figures/tuto4_genericity_and_algorithms-8.ppm \
+figures/fill-subimage-cfun-1.ppm \
+figures/ima2d-rot-1.ppm \
+figures/ima2d-rot-2.ppm \
+figures/ima_save.pbm \
figures/labeling-compute-1.pbm \
+figures/labeling-compute-2.ppm \
+figures/logical-not-1.pbm \
+figures/logical-not-2.pbm \
+figures/logical-not-3.pbm \
+figures/tuto3_rw_image-1.ppm \
+figures/tuto3_rw_image-2.ppm \
figures/tuto3_rw_image-3.ppm \
+figures/tuto4_genericity_and_algorithms-1.ppm \
+figures/tuto4_genericity_and_algorithms-2.ppm \
+figures/tuto4_genericity_and_algorithms-3.pbm \
figures/tuto4_genericity_and_algorithms-4.ppm \
+figures/tuto4_genericity_and_algorithms-5.ppm \
+figures/tuto4_genericity_and_algorithms-6.ppm \
+figures/tuto4_genericity_and_algorithms-7.pgm \
+figures/tuto4_genericity_and_algorithms-7.ppm \
figures/tuto4_genericity_and_algorithms-8.pgm \
-figures/tuto4_genericity_and_algorithms-2.ppm \
-figures/fill-subdomain-1.pbm \
-figures/tuto3_rw_image-2.ppm
+figures/tuto4_genericity_and_algorithms-8.ppm \
+figures/tuto4_genericity_and_algorithms-9.pgm \
+figures/tuto4_genericity_and_algorithms-9.ppm
diff --git a/milena/doc/tutorial/generate_dist_files.sh
b/milena/doc/tutorial/generate_dist_files.sh
index 91f75f1..2df4c22 100755
--- a/milena/doc/tutorial/generate_dist_files.sh
+++ b/milena/doc/tutorial/generate_dist_files.sh
@@ -1,12 +1,21 @@
-#!/bin/sh
+#! /bin/sh
+
+## FIXME: Don't use `echo -n', as echo's options are not portable.
+##
+##
http://www.gnu.org/software/autoconf/manual/html_node/Limitations-of-Builtiā¦
+##
+## As an ugly workaround, use `printf' instead. The right approach
+## would be to only emit lines ended with newlines.
+ECHO_N=printf
for dir in samples figures outputs examples; do
OUT="$dir/$dir.mk"
- echo "## Generated by ../generate_dist_files, do not modify ##" > $OUT
- echo -n "EXTRA_DIST += " >> $OUT
+ echo "## Generated by ../generate_dist_files, do not modify." > $OUT
+ echo >>$OUT
+ $ECHO_N "EXTRA_DIST += " >> $OUT
for file in `find $dir -mindepth 1`; do
echo " \\" >> $OUT
- echo -n $file >> $OUT
+ $ECHO_N $file >> $OUT
done
echo "" >> $OUT
done
diff --git a/milena/doc/tutorial/headers.stamp b/milena/doc/tutorial/headers.stamp
new file mode 100644
index 0000000..e69de29
diff --git a/milena/doc/tutorial/outputs/outputs.mk
b/milena/doc/tutorial/outputs/outputs.mk
index c6d318a..cc0a31d 100644
--- a/milena/doc/tutorial/outputs/outputs.mk
+++ b/milena/doc/tutorial/outputs/outputs.mk
@@ -1,54 +1,54 @@
-## Generated by ../generate_dist_files, do not modify ##
+## Generated by ../generate_dist_files, do not modify.
+
EXTRA_DIST += \
-outputs/win-create-1-display.txt \
-outputs/win-create-2.txt \
outputs/accu-right-instanciation.txt \
-outputs/ima2d-1.txt \
outputs/borderthickness.txt \
-outputs/ima-save.txt \
-outputs/fill-subimage-cfun.txt \
-outputs/labeling-compute.txt \
-outputs/parray-display-1.txt \
-outputs/fill-subdomain-shorter.txt \
+outputs/box2d-bbox.txt \
+outputs/domain-display.txt \
outputs/dpoint-1.txt \
+outputs/estim-sites.txt \
+outputs/extension-ignore.txt \
+outputs/fill-call-1.txt \
+outputs/fill-part-image.txt \
+outputs/fill-subdomain-shorter.txt \
+outputs/fill-subdomain.txt \
+outputs/fill-subimage-cfun.txt \
+outputs/fill.txt \
outputs/forall-piter.txt \
-outputs/predicate-1.txt \
-outputs/box2d-bbox.txt \
+outputs/fun-p2v-1.txt \
+outputs/graph-data.txt \
outputs/graph-iter.txt \
outputs/graph-output-1.txt \
-outputs/fill-call-1.txt \
-outputs/ima2d-rot.txt \
-outputs/paste-call-1.txt \
-outputs/fun-p2v-1.txt \
-outputs/estim-sites.txt \
-outputs/parray-append.txt \
-outputs/fill-subdomain.txt \
+outputs/ima-has.txt \
+outputs/ima-save.txt \
outputs/ima-size.txt \
-outputs/tuto2_first_image.txt \
-outputs/logical-not.txt \
-outputs/ima2d-display-output-2.txt \
-outputs/ima2d-decl-2.txt \
-outputs/paste.txt \
-outputs/outputs.mk \
+outputs/ima2d-1.txt \
+outputs/ima2d-2.txt \
+outputs/ima2d-3.txt \
+outputs/ima2d-4.txt \
+outputs/ima2d-5.txt \
outputs/ima2d-6-clone.txt \
outputs/ima2d-7.txt \
-outputs/tuto3_rw_image.txt \
-outputs/parray-bbox.txt \
-outputs/domain-display.txt \
+outputs/ima2d-decl-2.txt \
outputs/ima2d-display-1.txt \
-outputs/win-create-1.txt \
outputs/ima2d-display-2.txt \
outputs/ima2d-display-output-1.txt \
-outputs/fill-part-image.txt \
-outputs/tuto4_genericity_and_algorithms.txt \
-outputs/ima-has.txt \
-outputs/ima2d-5.txt \
-outputs/ima2d-4.txt \
+outputs/ima2d-display-output-2.txt \
+outputs/ima2d-rot.txt \
+outputs/labeling-compute.txt \
+outputs/logical-not.txt \
outputs/mln_var.txt \
-outputs/fill.txt \
+outputs/outputs.mk \
+outputs/parray-append.txt \
+outputs/parray-bbox.txt \
+outputs/parray-display-1.txt \
+outputs/paste-call-1.txt \
+outputs/paste.txt \
outputs/point-1.txt \
-outputs/extension-ignore.txt \
-outputs/graph-data.txt \
-outputs/tuto1_first_image.txt \
-outputs/ima2d-2.txt \
-outputs/ima2d-3.txt
+outputs/predicate-1.txt \
+outputs/tuto2_first_image.txt \
+outputs/tuto3_rw_image.txt \
+outputs/tuto4_genericity_and_algorithms.txt \
+outputs/win-create-1-display.txt \
+outputs/win-create-1.txt \
+outputs/win-create-2.txt
diff --git a/milena/doc/tutorial/samples/samples.mk
b/milena/doc/tutorial/samples/samples.mk
index 40b410d..ad479aa 100644
--- a/milena/doc/tutorial/samples/samples.mk
+++ b/milena/doc/tutorial/samples/samples.mk
@@ -1,53 +1,54 @@
-## Generated by ../generate_dist_files, do not modify ##
+## Generated by ../generate_dist_files, do not modify.
+
EXTRA_DIST += \
-samples/paste-call-1.cc \
+samples/accu-right-instanciation.cc \
+samples/accu-wrong-instanciation.cc.raw \
+samples/borderthickness.cc \
+samples/box2d-bbox.cc \
+samples/domain-display.cc \
samples/dpoint-1.cc \
-samples/parray-append.cc \
+samples/estim-sites.cc \
+samples/extension-ignore.cc \
+samples/fill-call-1.cc \
+samples/fill-part-image.cc \
samples/fill-proto.cc.raw \
-samples/ima2d-restricted-1.cc.raw \
-samples/graph-iter.cc \
-samples/labeling-compute.cc \
-samples/ima2d-7.cc \
-samples/ima2d-restricted-2.cc.raw \
+samples/fill-subdomain-shorter.cc \
+samples/fill-subdomain.cc \
samples/fill-subimage-cfun.cc \
-samples/ima-save.cc \
-samples/point-1.cc \
-samples/box2d-bbox.cc \
+samples/fill.cc \
samples/forall-piter.cc \
-samples/ima-size.cc \
-samples/borderthickness.cc \
-samples/Makefile.in \
-samples/ima-load.cc \
+samples/fun-p2v-1.cc \
+samples/graph-data.cc \
+samples/graph-iter.cc \
samples/ima-has.cc \
-samples/win-create-1.cc \
-samples/samples.mk \
-samples/accu-wrong-instanciation.cc.raw \
-samples/accu-right-instanciation.cc \
-samples/ima2d-5.cc \
-samples/fill-subdomain.cc \
-samples/fill-subdomain-shorter.cc \
-samples/tuto3_rw_image.cc \
+samples/ima-load.cc \
+samples/ima-save.cc \
+samples/ima-size.cc \
+samples/ima2d-1.cc \
samples/ima2d-2.cc \
-samples/extension-ignore.cc \
-samples/Makefile.am \
-samples/parray-bbox.cc \
-samples/graph-data.cc \
-samples/mln_var.cc \
-samples/ima2d-4.cc \
-samples/predicate-1.cc \
samples/ima2d-3.cc \
-samples/tuto2_first_image.cc \
-samples/ima2d-1.cc \
-samples/estim-sites.cc \
+samples/ima2d-4.cc \
+samples/ima2d-5.cc \
samples/ima2d-6-clone.cc \
+samples/ima2d-7.cc \
+samples/ima2d-restricted-1.cc.raw \
+samples/ima2d-restricted-2.cc.raw \
samples/ima2d-restricted-3.cc.raw \
-samples/logical-not.cc \
-samples/fun-p2v-1.cc \
samples/ima2d-rot.cc \
-samples/fill-part-image.cc \
-samples/domain-display.cc \
-samples/tuto4_genericity_and_algorithms.cc \
+samples/labeling-compute.cc \
+samples/logical-not.cc \
+samples/Makefile.am \
+samples/Makefile.in \
+samples/mln_var.cc \
+samples/parray-append.cc \
+samples/parray-bbox.cc \
+samples/paste-call-1.cc \
samples/paste.cc \
-samples/fill.cc \
-samples/fill-call-1.cc \
+samples/point-1.cc \
+samples/predicate-1.cc \
+samples/samples.mk \
+samples/tuto2_first_image.cc \
+samples/tuto3_rw_image.cc \
+samples/tuto4_genericity_and_algorithms.cc \
+samples/win-create-1.cc \
samples/win-create-2.cc
--
1.6.1.2