automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11b-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11b-95-g52ea488
Date: Mon, 16 Apr 2012 20:39:26 +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=52ea488d39541b4d3b6618464caf4493878ba3f0

The branch, ng/master has been updated
       via  52ea488d39541b4d3b6618464caf4493878ba3f0 (commit)
       via  c4a74e8498e3ed0addede18d8d9c15ca49bf3727 (commit)
       via  00a623a2865fcd56341b69aa81707fce13f303d7 (commit)
       via  bb31e232cb75989c1c7cc8cdb91c10954bbb3333 (commit)
       via  2c35939ef284c2dbb78134f7bc8713b5b171850a (commit)
      from  f480f1a7b9673f74b531c26b1ff5ea136a320b52 (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 52ea488d39541b4d3b6618464caf4493878ba3f0
Author: Stefano Lattarini <address@hidden>
Date:   Sun Apr 15 21:38:03 2012 +0200

    [ng] parallel-tests: remove workarounds required by Solaris xpg4 make
    
    * lib/am/check.am (check-TESTS, recheck): Simplify by not bothering to
    work around a bug of Solaris xpg4 make that is not shared by GNU make.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit c4a74e8498e3ed0addede18d8d9c15ca49bf3727
Author: Stefano Lattarini <address@hidden>
Date:   Sun Apr 15 18:48:01 2012 +0200

    [ng] parallel-tests: don't cater to VPATH rewrites
    
    GNU make doesn't do VPATH rewrites a' la' Solaris make, but does VPATH
    rewrites for the '$<' automatic variable.  Take advantage of these facts
    to simplify the recipes of the parallel testsuite harness.
    
    * lib/am/check.am: Don't include 'inst-vars.am'
    (am__check_pre): Simplify and adjust.
    (am__set_TESTS_bases): Likewise.
    (check-TESTS): Likewise.
    * lib/am/check2.am (am__runtest): Don't bother setting the 'p' shell
    variable, it's not needed anymore.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 00a623a2865fcd56341b69aa81707fce13f303d7
Author: Stefano Lattarini <address@hidden>
Date:   Sun Apr 15 17:27:58 2012 +0200

    [ng] parallel-tests: reduce code duplication a little
    
    Use more GNU make features and built-ins, and less automake-time
    pre-processing, in order to reduce code duplication and improve
    clarity.
    
    * lib/am/check2.am: Define a new custom make function 'am__runtest', used
    to simplify rules in here, and reduce code duplication among them.
    * automake.in (handle_per_suffix_test): Update and simplify accordingly.
    As a result, the automake-defined 'LOG_COMPILE' variables are not defined
    anymore, which we should mention ...
    * NG-NEWS: ... in here.
    * t/test-extensions.sh: Adjust outdated grepping checks.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit bb31e232cb75989c1c7cc8cdb91c10954bbb3333
Author: Stefano Lattarini <address@hidden>
Date:   Sun Apr 15 12:02:47 2012 +0200

    [ng] parallel-tests: remove workaround for BSD make
    
    When BSD make is run in parallel mode, it apparently strips any
    leading directory component from the automatic variable '$*' (of
    course, against what POSIX mandates).  In order to avoid this
    behaviour from breaking the parallel-tests driver, we added an
    hacky workaround in commit v1.11-1982-ge1606b3 of 18-02-2012.
    Now that we assume GNU make, this workaround is not needed anymore,
    so let's remove it.
    
    * lib/check2.am (am__set_b): Remove its definition and its uses.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 2c35939ef284c2dbb78134f7bc8713b5b171850a
Author: Stefano Lattarini <address@hidden>
Date:   Sun Apr 15 22:45:47 2012 +0200

    [ng] dry run: only use GNU make builtins to determine whether running dry
    
    * lib/am/header-vars.am (am__make_dryrun): only use GNU make builtins to
    determine whether make is being running in "dry mode".
    * t/nodep.sh: Adjust grepping checks to avoid spurious failures.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 NG-NEWS               |    7 +++++
 automake.in           |   13 +---------
 lib/am/check.am       |   63 +++++++++++--------------------------------------
 lib/am/check2.am      |   47 +++++++++++++-----------------------
 lib/am/header-vars.am |   41 +++++++++++--------------------
 t/nodep.sh            |    2 +-
 t/test-extensions.sh  |    3 +-
 7 files changed, 56 insertions(+), 120 deletions(-)

diff --git a/NG-NEWS b/NG-NEWS
index ab7ee2e..6da558e 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -59,6 +59,13 @@ Warnings and diagnostic
 * The 'portability-recursive' warning category is obsolete, and has been
   removed.
 
+Parallel testsuite harness
+==========================
+
+* Automake does not automatically generate the definition of 'LOG_COMPILE'
+  variables anymore.  These have always been meant for internal use only
+  anyway.
+
 Miscellaneous
 =============
 
diff --git a/automake.in b/automake.in
index 820285b..bb47528 100644
--- a/automake.in
+++ b/automake.in
@@ -4743,20 +4743,9 @@ sub handle_per_suffix_test
                        "\$(SHELL) $am_config_aux_dir/test-driver",
                        INTERNAL);
     }
-  my $driver = '$(' . $pfx . 'LOG_DRIVER)';
-  my $driver_flags = '$(AM_' . $pfx . 'LOG_DRIVER_FLAGS)'
-                       . ' $(' . $pfx . 'LOG_DRIVER_FLAGS)';
-  my $compile = "${pfx}LOG_COMPILE";
-  define_variable ($compile,
-                   '$(' . $pfx . 'LOG_COMPILER)'
-                      . ' $(AM_' .  $pfx . 'LOG_FLAGS)'
-                      . ' $(' . $pfx . 'LOG_FLAGS)',
-                     INTERNAL);
   $output_rules .= file_contents ('check2', new Automake::Location,
                                    GENERIC => $generic,
-                                   DRIVER => $driver,
-                                   DRIVER_FLAGS => $driver_flags,
-                                   COMPILE => '$(' . $compile . ')',
+                                   PFX => $pfx,
                                    EXT => $test_suffix,
                                    am__EXEEXT => $am_exeext,
                                    %transform);
diff --git a/lib/am/check.am b/lib/am/check.am
index f697144..abdbd01 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -44,8 +44,6 @@ endif !%?COLOR%
 
 if %?PARALLEL_TESTS%
 
-include inst-vars.am
-
 ## New parallel test driver.
 ##
 ## The first version of the code here was adapted from check.mk, which was
@@ -79,46 +77,32 @@ am__common_driver_flags = \
 # thy have one).
 am__check_pre =                                                \
 $(am__sh_e_setup);                                     \
-$(am__vpath_adj_setup) $(am__vpath_adj)                        \
 $(am__tty_colors);                                     \
 srcdir=$(srcdir); export srcdir;                       \
 am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;           \
 test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?;        \
-if test -f "./$$f"; then dir=./;                       \
-elif test -f "$$f"; then dir=;                         \
-else dir="$(srcdir)/"; fi;                             \
-tst=$$dir$$f; log='$@';                                \
+f='$(patsubst $(srcdir)/%,%,$<)';                      \
+## We need to invoke the test in way that won't cause a PATH search.
+case $< in */*) tst=$<;; *) tst=./$<;; esac;           \
 if test -n '$(DISABLE_HARD_ERRORS)'; then              \
   am__enable_hard_errors=no;                           \
 else                                                   \
   am__enable_hard_errors=yes;                          \
 fi;                                                    \
-## The use of $dir below is required to account for VPATH
-## rewriting done by Sun make.
-case " $(XFAIL_TESTS) " in                             \
-  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
-    am__expect_failure=yes;;                           \
-  *)                                                   \
-    am__expect_failure=no;;                            \
+case " $(strip $(XFAIL_TESTS)) " in                    \
+  *" $$f "*) am__expect_failure=yes;;                  \
+          *) am__expect_failure=no;;                   \
 esac;                                                  \
 $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
 
 # A shell command to get the names of the tests scripts with any registered
 # extension removed (i.e., equivalently, the names of the test logs, with
 # the '.log' extension removed).  The result is saved in the shell variable
-# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
-# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
-# since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.test' and 'test-trs-basic.test'.
-am__set_TESTS_bases = \
-  bases='$(TEST_LOGS)'; \
-  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
-## Trim away any extra whitespace.  This has already proved useful
-## in avoiding weird bug on lesser make implementations.  It also
-## works around the GNU make 3.80 bug where trailing whitespace in
-## "TESTS = foo.test $(empty)" causes $(TESTS_LOGS)  to erroneously
-## expand to "foo.log .log".
-  bases=`echo $$bases`
+# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.
+# It also works around the GNU make 3.80 bug where trailing whitespace in
+# "TESTS = foo.test $(empty)" causes $(TESTS_LOGS) to erroneously expand to
+# "foo.log .log".
+am__set_TESTS_bases = bases='$(strip $(TEST_LOGS:.log=))'
 
 # Recover from deleted '.trs' file; this should ensure that
 # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
@@ -339,22 +323,8 @@ check-TESTS recheck:
            grep "^$$ws*:recheck:$$ws*no$$ws*$$" $$i.trs \
              >/dev/null 2>&1 && continue; \
          else :; fi; \
-## Be careful to avoid extra whitespace in the definition of $list, since
-## its value will be passed to the recursive make invocation below through
-## the TEST_LOGS macro, and leading/trailing white space in a make macro
-## definition can be problematic.  In this particular case, trailing white
-## space was known to cause a segmentation fault on Solaris 10 XPG4 make:
-## <http://lists.gnu.org/archive/html/bug-automake/2010-08/msg00004.html>
-         if test -z "$$log_list"; then \
-           log_list="$$i.log"; \
-         else \
-           log_list="$$log_list $$i.log"; \
-         fi; \
-         if test -z "$$trs_list"; then \
-           trs_list="$$i.trs"; \
-         else \
-           trs_list="$$trs_list $$i.trs"; \
-         fi; \
+         log_list="$$log_list $$i.log"; \
+         trs_list="$$trs_list $$i.trs"; \
        done; \
 ## Under "make recheck", remove the .log and .trs files associated
 ## with the files to recheck, so that those will be rerun by the
@@ -378,16 +348,11 @@ else !%?PARALLEL_TESTS%
 check-TESTS: $(TESTS)
        @failed=0; all=0; xfail=0; xpass=0; skip=0; \
        srcdir=$(srcdir); export srcdir; \
-## Make sure Solaris VPATH-expands all members of this list, even
-## the first and the last one; thus the spaces around $(TESTS)
-       list=' $(TESTS) '; \
+       list='$(TESTS)'; \
        $(am__tty_colors); \
        if test -n "$$list"; then \
          for tst in $$list; do \
            if test -f ./$$tst; then dir=./; \
-## Note: Solaris 2.7 seems to expand TESTS using VPATH.  That's
-## why we also try 'dir='.
-           elif test -f $$tst; then dir=; \
            else dir="$(srcdir)/"; fi; \
            if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
 ## Success
diff --git a/lib/am/check2.am b/lib/am/check2.am
index 9847a44..fce5498 100644
--- a/lib/am/check2.am
+++ b/lib/am/check2.am
@@ -15,33 +15,27 @@
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 if %?FIRST%
-## When BSD make is run in parallel mode, it apparently strips any
-## leading directory component from the automatic variable '$*' (of
-## course, against what POSIX mandates).  Try to detect and work
-## around this incompatibility.
-am__set_b = \
-  case '$@' in \
-    */*) \
-      case '$*' in \
-        */*) b='$*';; \
-          *) b=`echo '$@' | sed 's/\.log$$//'`; \
-       esac;; \
-    *) \
-      b='$*';; \
-  esac
+am__runtest = \
+  $(am__check_pre) \
+  $($(1)LOG_DRIVER) \
+  --test-name "$$f" \
+  --log-file $(2).log \
+  --trs-file $(2).trs \
+  $(am__common_driver_flags) \
+  $(AM_$(1)LOG_DRIVER_FLAGS) \
+  $($(1)LOG_DRIVER_FLAGS) \
+  -- \
+  $($(1)LOG_COMPILER) \
+  $(AM_$(1)LOG_FLAGS) \
+  $($(1)LOG_FLAGS) \
+  "$$tst" \
+  $(AM_TESTS_FD_REDIRECT)
 endif %?FIRST%
 
 ## From a test file to a .log and .trs file.
 ?GENERIC?%EXT%.log:
 ?!GENERIC?%OBJ%: %SOURCE%
-       @p='%SOURCE%'; \
-## Another hack to support BSD make in parallel mode.
-?!GENERIC?     b='%BASE%'; \
-?GENERIC?      $(am__set_b); \
-       $(am__check_pre) %DRIVER% --test-name "$$f" \
-       --log-file $$b.log --trs-file $$b.trs \
-       $(am__common_driver_flags) %DRIVER_FLAGS% -- %COMPILE% \
-       "$$tst" $(AM_TESTS_FD_REDIRECT)
+       @$(call am__runtest,%PFX%,%BASE%)
 
 ## If no programs are built in this package, then this rule is removed
 ## at automake time.  Otherwise, %am__EXEEXT% expands to a configure time
@@ -49,12 +43,5 @@ endif %?FIRST%
 ## conflict with the previous one.
 if %am__EXEEXT%
 ?GENERIC?%EXT%$(EXEEXT).log:
-       @p='%SOURCE%'; \
-       ## Another hack to support BSD make in parallel mode.
-?!GENERIC?     b='%BASE%'; \
-?GENERIC?      $(am__set_b); \
-       $(am__check_pre) %DRIVER% --test-name "$$f" \
-       --log-file $$b.log --trs-file $$b.trs \
-       $(am__common_driver_flags) %DRIVER_FLAGS% -- %COMPILE% \
-       "$$tst" $(AM_TESTS_FD_REDIRECT)
+       @$(call am__runtest,%PFX%,%BASE%)
 endif %am__EXEEXT%
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index f6ae460..40aa13f 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -29,32 +29,21 @@ am__vpath_rewrite = \
 ## a vendor make.
 ## DESTDIR =
 
-## Shell code that determines whether make is running in "dry mode"
-## ("make -n") or not.  Useful in rules that invoke make recursively, and
-## are thus executed also with "make -n" -- because, say, their recipes
-## contain the "$(MAKE)" string or starts with the '+' modifier.
-am__make_dryrun = \
-  { \
-    am__dry=no; \
-    case $$MAKEFLAGS in \
-## If we run "make TESTS='snooze nap'", GNU make will export MAKEFLAGS
-## to "TESTS=foo\ nap", so that the simpler loop below (on word-splitted
-## $$MAKEFLAGS) would see a "make flag" equal to "nap", and would wrongly
-## misinterpret that as and indication that make is running in dry mode.
-## This has already happened in practice.  So we need this hack.
-      *\\[\ \  ]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
-    esac; \
-    test $$am__dry = yes; \
-  }
+## Tell whether make is running in "dry mode".  It is either 'true' or
+## 'false', so that it can be easily used in shell code as well as in
+## GNU make conditionals.
+## If we run "make TESTS='snooze nap'", GNU make will export MAKEFLAGS to
+## "TESTS=foo\ nap", so that the builtins operating on word-split lists
+## would see a "make flag" equal to "nap" when analyzing $(MAKEFLAGS), and
+## would wrongly misinterpret that as and indication that make is running
+## in dry mode.  This has already happened in practice.  So we need the
+## hack with $(subst \, ...).
+am__make_dryrun := \
+  $(strip $(if $(strip \
+    $(foreach am__v, $(subst \ ,,$(strip $(MAKEFLAGS))), \
+      $(if $(or $(findstring =,$(am__v)),$(filter --%,$(am__v))),, \
+        $(findstring n,$(am__v))))), \
+    true, false))
 
 ## Some derived variables that have been found to be useful.
 pkgdatadir = $(datadir)/@PACKAGE@
diff --git a/t/nodep.sh b/t/nodep.sh
index 5dcad1c..1002c54 100755
--- a/t/nodep.sh
+++ b/t/nodep.sh
@@ -36,5 +36,5 @@ mkdir x
 $ACLOCAL
 $AUTOMAKE
 
-grep '%' Makefile.in && Exit 1
+$FGREP -v '$(filter --%,' Makefile.in | grep '%' && Exit 1
 Exit 0
diff --git a/t/test-extensions.sh b/t/test-extensions.sh
index d2fc2dd..c903798 100755
--- a/t/test-extensions.sh
+++ b/t/test-extensions.sh
@@ -41,8 +41,7 @@ grep -i 'log' Makefile.in # For debugging.
 
 for lc in $valid_extensions; do
   uc=`echo $lc | tr '[a-z]' '[A-Z]'`
-  $FGREP "\$(${uc}_LOG_COMPILER)" Makefile.in
-  grep "^${uc}_LOG_COMPILE =" Makefile.in
+  grep "^${uc}_LOG_DRIVER =" Makefile.in
   grep "^\.${lc}\.log:" Makefile.in
 done
 


hooks/post-receive
-- 
GNU Automake



reply via email to

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