* Makefile.am: Include build-aux/regen-recursive.mk.
(REGEN_SUBDIRS): Add doc and tests.
(regen): Remove phony status (now handled by regen-recursive.mk).
Rename target as...
(regen-am): ...this.
* doc/Makefile.am (regen): Remove phony status (now handled by
regen-recursive.mk).
(regen): Rename target as...
(regen-am): ...this.
Actually handle the generation and remove the dependency to permit
forced regenerations.
* tests/Makefile.am: Include build-aux/regen-recursive.mk.
(REGEN_SUBDIRS): Add unit_test.
* tests/unit_test/Makefile.am: Include build-aux/regen-recursive.mk.
(regen): Remove phony status (now handled by regen-recursive.mk).
Rename target as...
(regen-am): ...this.
Do not make unit-tests.mk read-only, since bootstrap expects it
to be writable.
($(srcdir)/unit-tests.mk): Likewise.
---
milena/ChangeLog | 25 +++++++++++++++++++++++++
milena/Makefile.am | 14 +++++++++-----
milena/doc/Makefile.am | 11 +++++++++--
milena/tests/Makefile.am | 3 +++
milena/tests/unit_test/Makefile.am | 11 +++++++----
5 files changed, 53 insertions(+), 11 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 8f0da1c..87f1a4e 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,30 @@
2009-06-08 Roland Levillain <roland(a)lrde.epita.fr>
+ Install recursive regeneration rules in Milena.
+
+ * Makefile.am: Include build-aux/regen-recursive.mk.
+ (REGEN_SUBDIRS): Add doc and tests.
+ (regen): Remove phony status (now handled by regen-recursive.mk).
+ Rename target as...
+ (regen-am): ...this.
+ * doc/Makefile.am (regen): Remove phony status (now handled by
+ regen-recursive.mk).
+ (regen): Rename target as...
+ (regen-am): ...this.
+ Actually handle the generation and remove the dependency to permit
+ forced regenerations.
+ * tests/Makefile.am: Include build-aux/regen-recursive.mk.
+ (REGEN_SUBDIRS): Add unit_test.
+ * tests/unit_test/Makefile.am: Include build-aux/regen-recursive.mk.
+ (regen): Remove phony status (now handled by regen-recursive.mk).
+ Rename target as...
+ (regen-am): ...this.
+ Do not make unit-tests.mk read-only, since bootstrap expects it
+ to be writable.
+ ($(srcdir)/unit-tests.mk): Likewise.
+
+2009-06-08 Roland Levillain <roland(a)lrde.epita.fr>
+
Factor tests/tests-recursive.mk.
* tests/tests-recursive.mk: Include
diff --git a/milena/Makefile.am b/milena/Makefile.am
index 666888c..b029dd3 100644
--- a/milena/Makefile.am
+++ b/milena/Makefile.am
@@ -24,11 +24,12 @@ tutorial:
tools:
$(MAKE) -C tools all
+# Regen files recursively.
+include $(top_srcdir)/build-aux/regen-recursive.mk
+REGEN_SUBDIRS += doc tests
+
# Force the regeneration of `headers.mk'.
-.PHONY: regen
-regen:
- cd $(srcdir) && ./generate_dist_headers.sh
-EXTRA_DIST = generate_dist_headers.sh
+#
# We do not delegate the action of regenerating `headers.mk' to
# `regen' like this:
#
@@ -46,8 +47,11 @@ EXTRA_DIST = generate_dist_headers.sh
# statement); and
# - `headers.mk' depends on `generate_dist_headers.sh'.
#
-# Hence the redundant action. There may be a better solution.
+# Hence the redundant action. There may be a better solution
+regen-am:
+ cd $(srcdir) && ./generate_dist_headers.sh
+EXTRA_DIST = generate_dist_headers.sh
# FIXME: Change generate_dist_headers.sh so that the action looks like this:
#
# $< $@.tmp && mv -f $@.tmp $@ && chmod -w $@
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index 7ca4373..f391286 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -14,7 +14,8 @@ DOXYGEN = doxygen
.PHONY: doc-all doc doc-html doc-dev doc-dev-html ref-doc-dev ref-doc-dev-html\
ref-doc ref-doc-html tutorial tutorial-html white-paper \
white-paper-html ref-guide ref-guide-html examples fix-refdata \
- fig-convert regen
+ fig-convert
+
# Doxygen documentation output directory.
@@ -119,7 +120,13 @@ edit_user = sed -e 's,OUTPUT_DIRECTORY =
./complete/,OUTPUT_DIRECTORY
-e 's,EXCLUDE_SYMBOLS =,EXCLUDE_SYMBOLS = *::internal* *_
mln::trait::*,g'
-regen: $(srcdir)/headers.stamp
+# Regen files.
+include $(top_srcdir)/build-aux/regen-recursive.mk
+regen-am:
+ @rm -f $(srcdir)/headers.stamp.tmp
+ @touch $(srcdir)/headers.stamp.tmp
+ cd $(srcdir) && ./generate_dist_files.sh
+ @mv -f $(srcdir)/headers.stamp.tmp $(srcdir)/headers.stamp
$(srcdir)/examples/examples.mk: $(srcdir)/headers.stamp
$(srcdir)/figures/figures.mk: $(srcdir)/headers.stamp
diff --git a/milena/tests/Makefile.am b/milena/tests/Makefile.am
index 19a9e31..f974e02 100644
--- a/milena/tests/Makefile.am
+++ b/milena/tests/Makefile.am
@@ -66,6 +66,9 @@ TESTS = $(check_PROGRAMS)
pretty-check:
$(top_srcdir)/milena/tests/tools/pretty_check.sh
+# Regen files recursively.
+include $(top_srcdir)/build-aux/regen-recursive.mk
+REGEN_SUBDIRS += unit_test
EXTRA_DIST = \
img/lena_ascii.pbm \
diff --git a/milena/tests/unit_test/Makefile.am b/milena/tests/unit_test/Makefile.am
index efdd5b3..27c2a26 100644
--- a/milena/tests/unit_test/Makefile.am
+++ b/milena/tests/unit_test/Makefile.am
@@ -2,8 +2,12 @@
include $(top_srcdir)/milena/tests/tests.mk
-.PHONY: regen-tests
-regen-tests: $(srcdir)/unit-tests.mk
+# Regen files.
+include $(top_srcdir)/build-aux/regen-recursive.mk
+regen-am:
+ cd $(srcdir) \
+ && ./build_unit_test.sh $(abs_top_srcdir)/milena/mln
+
# FIXME: Change build_unit_test.sh so that the action looks like this:
#
# $< $@.tmp && mv -f $@.tmp $@ && chmod -w $@
@@ -12,8 +16,7 @@ regen-tests: $(srcdir)/unit-tests.mk
# at the beginning og the action.
$(srcdir)/unit-tests.mk: $(srcdir)/build_unit_test.sh
cd $(srcdir) \
- && ./build_unit_test.sh $(abs_top_srcdir)/milena/mln \
- && chmod a-w unit-tests.mk
+ && ./build_unit_test.sh $(abs_top_srcdir)/milena/mln
include $(srcdir)/unit-tests.mk
--
1.6.1.2
Show replies by date