automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-381-


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-381-g145c2d0
Date: Sun, 03 Oct 2010 09:51:29 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=145c2d0d024e2213a5c833427b4281fb55001709

The branch, master has been updated
       via  145c2d0d024e2213a5c833427b4281fb55001709 (commit)
       via  f6b05bd1bce89168db265d8464464562c54fa72e (commit)
       via  b8c1325a9f839efbd7cbab203eca8d2a26e2ff66 (commit)
      from  f19b07647af068030866b7bc94710e930a6fccb9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 145c2d0d024e2213a5c833427b4281fb55001709
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Oct 3 11:45:31 2010 +0200

    maintainer-check coverage for variables before rules.
    
    * Makefile.am (sc_ensure_testsuite_has_run): Suggest keeping
    around the test directories.
    (sc_tests_makefile_variable_order): New rule with a heuristic to
    catch ordering violations.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit f6b05bd1bce89168db265d8464464562c54fa72e
Merge: f19b076 b8c1325
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Oct 3 11:44:13 2010 +0200

    Merge branch 'maint'

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                      |   15 ++++++++++
 Makefile.am                    |   22 ++++++++++++++-
 Makefile.in                    |   18 +++++++++++-
 doc/automake.texi              |    3 +-
 lib/Automake/tests/Makefile.in |   59 +++++++++++++++++++--------------------
 lib/am/check.am                |   14 +++++-----
 tests/Makefile.in              |   59 +++++++++++++++++++--------------------
 7 files changed, 120 insertions(+), 70 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 79b7d39..5a15698 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-03  Ralf Wildenhues  <address@hidden>
+
+       maintainer-check coverage for variables before rules.
+       * Makefile.am (sc_ensure_testsuite_has_run): Suggest keeping
+       around the test directories.
+       (sc_tests_makefile_variable_order): New rule with a heuristic to
+       catch ordering violations.
+
+       Document and fix expansion of variables before rules.
+       * doc/automake.texi (General Operation): Document that variables
+       are expanded before rules.
+       * lib/am/check.am (am__check_post): Reword a bit so it does not
+       get matched as a rule.
+       Suggestion by Ben Pfaff.
+
 2010-10-02  Ralf Wildenhues  <address@hidden>
 
        Coverage and minor fixes for variable typo detection.
diff --git a/Makefile.am b/Makefile.am
index 8eb1bde..a5df109 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -195,6 +195,7 @@ sc_tests_plain_sleep \
 sc_tests_plain_egrep_fgrep \
 sc_tests_PATH_SEPARATOR \
 sc_tests_logs_duplicate_prefixes \
+sc_tests_makefile_variable_order \
 sc_mkdir_p \
 sc_perl_at_substs \
 sc_unquoted_DESTDIR \
@@ -467,9 +468,10 @@ sc_tests_plain_egrep_fgrep:
 ## Rule to ensure that the testsuite has been run before.  We don't depend on 
`check'
 ## here, because that would be very wasteful in the common case.  We could run
 ## `make check RECHECK_LOGS=' and avoid toplevel races with 
AM_RECURSIVE_TARGETS.
+## Suggest keeping test directories around for greppability of the Makefile.in 
files.
 sc_ensure_testsuite_has_run:
        @if test ! -f tests/test-suite.log; then \
-         echo "Run \`make check' before \`maintainer-check'" >&2; \
+         echo "Run \`env keep_testdirs=yes make check' before 
\`maintainer-check'" >&2; \
          exit 1; \
        fi
 .PHONY: sc_ensure_testsuite_has_run
@@ -482,6 +484,24 @@ sc_tests_logs_duplicate_prefixes: 
sc_ensure_testsuite_has_run
          exit 1; \
        fi
 
+## Ensure variables are listed before rules in Makefile.in files we generate.
+sc_tests_makefile_variable_order: sc_ensure_testsuite_has_run
+       @for file in `find tests -name Makefile.in -print`; do \
+         latevars=`sed -n \
+           -e :x -e 's/#.*//' \
+           -e '/\\\\$$/{' -e N -e 'b x' -e '}' \
+## Literal TAB.
+           -e '1,/^    /d' \
+## Allow @ so we match conditionals.
+           -e '/^ address@hidden,\} *=/p' $$file`; \
+         if test -n "$$latevars"; then \
+           echo 'Ensure variables are expanded before rules' >&2; \
+           echo "Variables are expanded too late in $$file:" >&2; \
+           echo "$$latevars" | sed 's/^/  /' >&2; \
+           exit 1; \
+         fi; \
+       done
+
 ## Using `:' as a PATH separator is not portable.
 sc_tests_PATH_SEPARATOR:
        @if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
diff --git a/Makefile.in b/Makefile.in
index f468541..232fbf7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -316,6 +316,7 @@ sc_tests_plain_sleep \
 sc_tests_plain_egrep_fgrep \
 sc_tests_PATH_SEPARATOR \
 sc_tests_logs_duplicate_prefixes \
+sc_tests_makefile_variable_order \
 sc_mkdir_p \
 sc_perl_at_substs \
 sc_unquoted_DESTDIR \
@@ -1188,7 +1189,7 @@ sc_tests_plain_egrep_fgrep:
 
 sc_ensure_testsuite_has_run:
        @if test ! -f tests/test-suite.log; then \
-         echo "Run \`make check' before \`maintainer-check'" >&2; \
+         echo "Run \`env keep_testdirs=yes make check' before 
\`maintainer-check'" >&2; \
          exit 1; \
        fi
 .PHONY: sc_ensure_testsuite_has_run
@@ -1199,6 +1200,21 @@ sc_tests_logs_duplicate_prefixes: 
sc_ensure_testsuite_has_run
          exit 1; \
        fi
 
+sc_tests_makefile_variable_order: sc_ensure_testsuite_has_run
+       @for file in `find tests -name Makefile.in -print`; do \
+         latevars=`sed -n \
+           -e :x -e 's/#.*//' \
+           -e '/\\\\$$/{' -e N -e 'b x' -e '}' \
+           -e '1,/^    /d' \
+           -e '/^ address@hidden,\} *=/p' $$file`; \
+         if test -n "$$latevars"; then \
+           echo 'Ensure variables are expanded before rules' >&2; \
+           echo "Variables are expanded too late in $$file:" >&2; \
+           echo "$$latevars" | sed 's/^/  /' >&2; \
+           exit 1; \
+         fi; \
+       done
+
 sc_tests_PATH_SEPARATOR:
        @if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
          echo "Use \`$$PATH_SEPARATOR', not \`:', in PATH definitions above." 
1>&2; \
diff --git a/doc/automake.texi b/doc/automake.texi
index 487f230..22c2f27 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -1763,7 +1763,8 @@ for compiling and linking programs to be generated.
 @trindex git-dist
 
 The variable definitions and rules in the @file{Makefile.am} are
-copied verbatim into the generated file.  This allows you to add
+copied mostly verbatim into the generated file, with all variable
+definitions preceding all rules.  This allows you to add almost
 arbitrary code into the generated @file{Makefile.in}.  For instance,
 the Automake distribution includes a non-standard rule for the
 @code{git-dist} target, which the Automake maintainer uses to make
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index 343cf0d..dd5b61b 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -145,6 +145,35 @@ elif test -f "$$f"; then dir=;                             
\
 else dir="$(srcdir)/"; fi;                             \
 tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;           \
 $(TESTS_ENVIRONMENT)
+# To be appended to the command running the test.  Handle the stdout
+# and stderr redirection, and catch the exit status.
+am__check_post = \
+>address@hidden 2>&1;                                          \
+estatus=$$?;                                           \
+if test -n '$(DISABLE_HARD_ERRORS)'                    \
+   && test $$estatus -eq 99; then                      \
+  estatus=1;                                           \
+fi;                                                    \
+TERM=$$__SAVED_TERM; export TERM;                      \
+$(am__tty_colors);                                     \
+xfailed=PASS;                                          \
+case " $(XFAIL_TESTS) " in                             \
+  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
+    xfailed=XFAIL;;                                    \
+esac;                                                  \
+case $$estatus.$$xfailed in                            \
+    0.XFAIL) col=$$red; res=XPASS;;                    \
+    0.*)     col=$$grn; res=PASS ;;                    \
+    77.*)    col=$$blu; res=SKIP ;;                    \
+    99.*)    col=$$red; res=FAIL ;;                    \
+    *.XFAIL) col=$$lgn; res=XFAIL;;                    \
+    *.*)     col=$$red; res=FAIL ;;                    \
+esac;                                                  \
+echo "$${col}$$res$${std}: $$f";                       \
+echo "$$res: $$f (exit: $$estatus)" |                  \
+  $(am__rst_section) >$@;                              \
+cat address@hidden >>$@;                                               \
+rm -f address@hidden
 RECHECK_LOGS = $(TEST_LOGS)
 AM_RECURSIVE_TARGETS = check check-html recheck recheck-html
 TEST_SUITE_LOG = test-suite.log
@@ -314,36 +343,6 @@ CTAGS:
 cscope cscopelist:
 
 
-# To be appended to the command running the test.  Handle the stdout
-# and stderr redirection, and catch the exit status.
-am__check_post =                                       \
->address@hidden 2>&1;                                          \
-estatus=$$?;                                           \
-if test -n '$(DISABLE_HARD_ERRORS)'                    \
-   && test $$estatus -eq 99; then                      \
-  estatus=1;                                           \
-fi;                                                    \
-TERM=$$__SAVED_TERM; export TERM;                      \
-$(am__tty_colors);                                     \
-xfailed=PASS;                                          \
-case " $(XFAIL_TESTS) " in                             \
-  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
-    xfailed=XFAIL;;                                    \
-esac;                                                  \
-case $$estatus:$$xfailed in                            \
-    0:XFAIL) col=$$red; res=XPASS;;                    \
-    0:*)     col=$$grn; res=PASS ;;                    \
-    77:*)    col=$$blu; res=SKIP ;;                    \
-    99:*)    col=$$red; res=FAIL ;;                    \
-    *:XFAIL) col=$$lgn; res=XFAIL;;                    \
-    *:*)     col=$$red; res=FAIL ;;                    \
-esac;                                                  \
-echo "$${col}$$res$${std}: $$f";                       \
-echo "$$res: $$f (exit: $$estatus)" |                  \
-  $(am__rst_section) >$@;                              \
-cat address@hidden >>$@;                                               \
-rm -f address@hidden
-
 $(TEST_SUITE_LOG): $(TEST_LOGS)
        @$(am__sh_e_setup);                                             \
        list='$(TEST_LOGS)';                                            \
diff --git a/lib/am/check.am b/lib/am/check.am
index c612b22..c953be8 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -128,13 +128,13 @@ case " $(XFAIL_TESTS) " in                                
\
   *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
     xfailed=XFAIL;;                                    \
 esac;                                                  \
-case $$estatus:$$xfailed in                            \
-    0:XFAIL) col=$$red; res=XPASS;;                    \
-    0:*)     col=$$grn; res=PASS ;;                    \
-    77:*)    col=$$blu; res=SKIP ;;                    \
-    99:*)    col=$$red; res=FAIL ;;                    \
-    *:XFAIL) col=$$lgn; res=XFAIL;;                    \
-    *:*)     col=$$red; res=FAIL ;;                    \
+case $$estatus.$$xfailed in                            \
+    0.XFAIL) col=$$red; res=XPASS;;                    \
+    0.*)     col=$$grn; res=PASS ;;                    \
+    77.*)    col=$$blu; res=SKIP ;;                    \
+    99.*)    col=$$red; res=FAIL ;;                    \
+    *.XFAIL) col=$$lgn; res=XFAIL;;                    \
+    *.*)     col=$$red; res=FAIL ;;                    \
 esac;                                                  \
 echo "$${col}$$res$${std}: $$f";                       \
 echo "$$res: $$f (exit: $$estatus)" |                  \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index e1d72ac..6bb00da 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -148,6 +148,35 @@ elif test -f "$$f"; then dir=;                             
\
 else dir="$(srcdir)/"; fi;                             \
 tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;           \
 $(TESTS_ENVIRONMENT)
+# To be appended to the command running the test.  Handle the stdout
+# and stderr redirection, and catch the exit status.
+am__check_post = \
+>address@hidden 2>&1;                                          \
+estatus=$$?;                                           \
+if test -n '$(DISABLE_HARD_ERRORS)'                    \
+   && test $$estatus -eq 99; then                      \
+  estatus=1;                                           \
+fi;                                                    \
+TERM=$$__SAVED_TERM; export TERM;                      \
+$(am__tty_colors);                                     \
+xfailed=PASS;                                          \
+case " $(XFAIL_TESTS) " in                             \
+  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
+    xfailed=XFAIL;;                                    \
+esac;                                                  \
+case $$estatus.$$xfailed in                            \
+    0.XFAIL) col=$$red; res=XPASS;;                    \
+    0.*)     col=$$grn; res=PASS ;;                    \
+    77.*)    col=$$blu; res=SKIP ;;                    \
+    99.*)    col=$$red; res=FAIL ;;                    \
+    *.XFAIL) col=$$lgn; res=XFAIL;;                    \
+    *.*)     col=$$red; res=FAIL ;;                    \
+esac;                                                  \
+echo "$${col}$$res$${std}: $$f";                       \
+echo "$$res: $$f (exit: $$estatus)" |                  \
+  $(am__rst_section) >$@;                              \
+cat address@hidden >>$@;                                               \
+rm -f address@hidden
 RECHECK_LOGS = $(TEST_LOGS)
 AM_RECURSIVE_TARGETS = check check-html recheck recheck-html
 TEST_SUITE_LOG = test-suite.log
@@ -1095,36 +1124,6 @@ CTAGS:
 cscope cscopelist:
 
 
-# To be appended to the command running the test.  Handle the stdout
-# and stderr redirection, and catch the exit status.
-am__check_post =                                       \
->address@hidden 2>&1;                                          \
-estatus=$$?;                                           \
-if test -n '$(DISABLE_HARD_ERRORS)'                    \
-   && test $$estatus -eq 99; then                      \
-  estatus=1;                                           \
-fi;                                                    \
-TERM=$$__SAVED_TERM; export TERM;                      \
-$(am__tty_colors);                                     \
-xfailed=PASS;                                          \
-case " $(XFAIL_TESTS) " in                             \
-  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
-    xfailed=XFAIL;;                                    \
-esac;                                                  \
-case $$estatus:$$xfailed in                            \
-    0:XFAIL) col=$$red; res=XPASS;;                    \
-    0:*)     col=$$grn; res=PASS ;;                    \
-    77:*)    col=$$blu; res=SKIP ;;                    \
-    99:*)    col=$$red; res=FAIL ;;                    \
-    *:XFAIL) col=$$lgn; res=XFAIL;;                    \
-    *:*)     col=$$red; res=FAIL ;;                    \
-esac;                                                  \
-echo "$${col}$$res$${std}: $$f";                       \
-echo "$$res: $$f (exit: $$estatus)" |                  \
-  $(am__rst_section) >$@;                              \
-cat address@hidden >>$@;                                               \
-rm -f address@hidden
-
 $(TEST_SUITE_LOG): $(TEST_LOGS)
        @$(am__sh_e_setup);                                             \
        list='$(TEST_LOGS)';                                            \


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]