automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, branch-1.13.2, updated. v1.


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, branch-1.13.2, updated. v1.13.1b-47-gd432f06
Date: Wed, 01 May 2013 12:25:45 +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=d432f067fb1569c4127b86c8d7e157e3687115f2

The branch, branch-1.13.2 has been updated
       via  d432f067fb1569c4127b86c8d7e157e3687115f2 (commit)
       via  6d3ffeb90d64fe060c8ce6aa57b1cc69321bf994 (commit)
       via  8430d41254e03ff3d79f682b4abab6c967db633d (commit)
       via  5a29f7aa6fdc2aa1cb8fccfc917dbd5f579c1e7b (commit)
       via  02ead48eb3043b1cfa9eb8072d8270cf5cc66c84 (commit)
       via  69f7791509c523fe8b199a432b72dca6a5ce3caa (commit)
       via  e432b0d3f7deffd3468e7b32ab6760bc7f3148f2 (commit)
       via  c97218a54271bdcc59a0a7b67704feb5344b89d9 (commit)
       via  6eedee4c85c9817e46ed3de9df912ebe0fc9baa4 (commit)
       via  cbf23cebcb8fdeb02b5a69a6741af2507d3ded57 (commit)
      from  2a40fa7174961a0eb0ca08280ab638ed1998ead4 (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 d432f067fb1569c4127b86c8d7e157e3687115f2
Merge: 6d3ffeb 5a29f7a
Author: Stefano Lattarini <address@hidden>
Date:   Tue Apr 30 23:55:47 2013 +0200

    Merge branch 'fix-pr12554' into branch-1.13.2
    
    * fix-pr12554:
      tests: avoid a spurious error with Solaris make
      subdirs: don't return false positives for the '-k' option's presence
      header-vars: recognize more make flags ('-k' in particular)
      header-vars: simplify how make flags are determined
      tests: remove dead code from t/make-dryrun.tap
      header-vars: new variable $(am__running_with_option)
      tests: expose bug#12554 (false positives for presence of '-k' make option)

commit 6d3ffeb90d64fe060c8ce6aa57b1cc69321bf994
Author: Stefano Lattarini <address@hidden>
Date:   Tue Apr 30 23:00:53 2013 +0200

    cosmetics: remove few trailing whitespace occurrences
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 8430d41254e03ff3d79f682b4abab6c967db633d
Author: Stefano Lattarini <address@hidden>
Date:   Tue Apr 30 22:59:30 2013 +0200

    typofix: in NEWS (extra whitespace)
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 5a29f7aa6fdc2aa1cb8fccfc917dbd5f579c1e7b
Author: Stefano Lattarini <address@hidden>
Date:   Mon Apr 29 20:43:02 2013 +0200

    tests: avoid a spurious error with Solaris make
    
    * t/make-keepgoing.tap (Makefile.am): Here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 02ead48eb3043b1cfa9eb8072d8270cf5cc66c84
Author: Stefano Lattarini <address@hidden>
Date:   Mon Apr 29 16:12:34 2013 +0200

    subdirs: don't return false positives for the '-k' option's presence
    
    This change fixes automake bug#12554.
    
    The old implementation of the code descending into $(SUBDIRS)
    entries used the following snippet to decide whether make is running
    with the '-k' a.k.a. '--keep-going' option, and thus whether a failure
    in a subdirectory should prevent the descent in the following ones:
    
        fail= failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
            *=* | --[!k]*);; \
            *k*) failcom='fail=yes';; \
          esac; \
        done
    
    It's clear that the second pattern in the 'case' construct could possibly
    match false positives, for examples in these two cases:
    
        make check TESTS="x.test k.test"
        make -I /usr/local/kool-fragments
    
    which are somewhat unusual, but not invalid.  So we need a more resilient
    implementation, as we did for the detection of the '-n' flag.
    
    This implementation is now provided by the new private macro
    '$(am__make_keepgoing)' (introduced in recent commits); so we can
    just us that to fix the bug.
    
    * lib/am/subdirs.am ($(am__recursive_targets)): Use '$(am__make_keepgoing)'
    instead of ad-hoc and more brittle checks.
    * t/list-of-tests.mk (XFAIL_TESTS): Remove the now-passing test case
    't/subdir-keep-going-pr12554.sh'.
    
    Reported-by: Michael Daniels <address@hidden>
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 69f7791509c523fe8b199a432b72dca6a5ce3caa
Author: Stefano Lattarini <address@hidden>
Date:   Mon Apr 29 15:22:10 2013 +0200

    header-vars: recognize more make flags ('-k' in particular)
    
    * lib/am/header-vars.am (am__running_with_option): Here.
    Few improvements to comments, while at it.
    (am__make_keepgoing): New, tell whther make is being runt with
    the '-k' option.
    * t/make-keepgoing.tap: New test.
    * t/list-of-tests.mk: Add it.
    * t/make-dryrun.tap: Minor edits to keep it more in sync with
    the new test.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit e432b0d3f7deffd3468e7b32ab6760bc7f3148f2
Author: Stefano Lattarini <address@hidden>
Date:   Sat Apr 27 16:09:43 2013 +0200

    header-vars: simplify how make flags are determined
    
    Actually, son far only the '-n' option ("dry mode") was detected,
    but this change will allow us to soon detect more options.
    
    * lib/am/header-vars.am (am__running_with_option): Even when $MAKEFLAGS
    appears to contain definition of variables with embedded whitespace,
    use simple textual pre-processing over $MAKEFLAGS rather than tricky
    recursive invocations of make to determine whether the '-n' option was
    given.  This is enough to correctly handle all the tricky usages covered
    in the testsuite.
    * t/nodep.sh: Adjust to avoid a spurious failure.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit c97218a54271bdcc59a0a7b67704feb5344b89d9
Author: Stefano Lattarini <address@hidden>
Date:   Sat Apr 27 15:49:52 2013 +0200

    tests: remove dead code from t/make-dryrun.tap
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 6eedee4c85c9817e46ed3de9df912ebe0fc9baa4
Author: Stefano Lattarini <address@hidden>
Date:   Sat Apr 27 15:25:06 2013 +0200

    header-vars: new variable $(am__running_with_option)
    
    This is a preparatory refactoring, needed by later patches.
    No semantic change is intended.
    
    * lib/am/header-vars.am (am__running_with_option): New, contains
    shell code that determines whether the current make instance is
    running with a given one-letter option (e.g., -k, -n) that takes
    no argument.  Actually, the only supported option at the moment
    is '-n' (support for '-k' will be added soon).
    (am__make_dryrun): Rewrite as a thin wrapper around
    '$(am__make_running_with_option)'.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit cbf23cebcb8fdeb02b5a69a6741af2507d3ded57
Author: Stefano Lattarini <address@hidden>
Date:   Tue Oct 2 21:27:28 2012 +0200

    tests: expose bug#12554 (false positives for presence of '-k' make option)
    
    The current implementation of the code descending into $(SUBDIRS)
    entries uses the following snippet to decide whether make is running
    with the '-k' a.k.a. '--keep-going' option, and thus whether a failure
    in a subdirectory should prevent the descent in the following ones:
    
        fail= failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
            *=* | --[!k]*);; \
            *k*) failcom='fail=yes';; \
          esac; \
        done
    
    It's clear that the second pattern in the 'case' construct can possibly
    match false positives, for examples in these two cases:
    
        make check TESTS="x.test k.test"
        make -I /usr/local/kool-fragments
    
    which are somewhat unusual, but not invalid.  So we need a more resilient
    implementation, as we did for the detection of the '-n' flag.
    
    But alas, such an implementation seems quite tricky to obtain in portable
    make.  So for the moment we content ourselves with exposing the bug, with
    the hope of being able to fix soon enough.
    
    * t/subdir-keep-going-pr12554.sh: New test.
    * t/list-of-tests.mk (handwritten_TESTS, XFAIL_TESTS): Add it.
    * THANKS: Update
    
    Reported-by: Michael Daniels <address@hidden>
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 NEWS                                      |    2 +-
 THANKS                                    |    1 +
 lib/am/header-vars.am                     |   84 +++++++++++++++++----------
 lib/am/subdirs.am                         |   13 ++--
 m4/tar.m4                                 |    2 +-
 t/list-of-tests.mk                        |    2 +
 t/make-dryrun.tap                         |   11 ++--
 t/make-is-gnu.sh                          |    2 +-
 t/{make-dryrun.tap => make-keepgoing.tap} |   89 +++++++++++++----------------
 t/nodep.sh                                |    6 +-
 t/subdir-keep-going-pr12554.sh            |   70 ++++++++++++++++++++++
 11 files changed, 183 insertions(+), 99 deletions(-)
 copy t/{make-dryrun.tap => make-keepgoing.tap} (52%)
 create mode 100755 t/subdir-keep-going-pr12554.sh

diff --git a/NEWS b/NEWS
index 9f69cf7..dc893bb 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@
       documentation updates and bug and regression fixes; they will
       not introduce new features, nor any backward-incompatibility (any
       such incompatibility would be considered a bug, to be fixed with
-      a further  micro release).
+      a further micro release).
 
     + Minor versions (e.g., 1.14, 2.1) can introduce new backward
       compatible features; the only backward-incompatibilities allowed
diff --git a/THANKS b/THANKS
index 6f82e93..fd023e2 100644
--- a/THANKS
+++ b/THANKS
@@ -258,6 +258,7 @@ Maxim Sinev                     address@hidden
 Maynard Johnson                 address@hidden
 Merijn de Jonge                 address@hidden
 Michael Brantley                address@hidden
+Michael Daniels                 address@hidden
 Michael Hofmann                 address@hidden
 Michael Ploujnikov              address@hidden
 Michel de Ruiter                address@hidden
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index d2f0984..4ad1783 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -31,55 +31,77 @@ VPATH = @srcdir@
 ## enough for now.
 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 
-## 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" -- either because they
-## are declared as dependencies to '.MAKE' (NetBSD make), or because
-## their recipes contain the "$(MAKE)" string (GNU and Solaris make).
-am__make_dryrun = \
+## Shell code that determines whether the current make instance is
+## running with a given one-letter option (e.g., -k, -n) that takes
+## no argument.  Actually, the only supported option at the moment
+## is '-n' (support for '-k' will be added soon).
+am__make_running_with_option = \
   { \
-    am__dry=no; \
+    case $${am__target_option-} in \
+        ?) ;; \
+        *) echo "am__make_running_with_option: internal error: invalid" \
+                "target option '$${am__target_option-}' specified" >&2; \
+           exit 1;; \
+    esac; \
+    am__has_opt=no; \
     if $(am__is_gnu_make); then \
-## GNU make: $(MAKEFLAGS) is quite tricky there, and the older
-## $(MFLAGS) variable behaves much better.
+## GNU make: $(MAKEFLAGS) is quite tricky there, while the older variable
+## $(MFLAGS) behaves much better.  So use the latter.
       for am__flg in $$MFLAGS; do \
         case $$am__flg in \
           *=*|--*) ;; \
-          -*n*) am__dry=yes; break;; \
+          -*$$am__target_option*) am__has_opt=yes; break;; \
         esac; \
       done; \
     else \
-## Non-GNU make: we must rely on $(MAKEFLAGS).  This is tricky and brittle,
-## but is the best we can do.
+## Non-GNU make: we must rely on $(MAKEFLAGS).  This is tricker and more
+## brittle, but is the best we can do.
       case $$MAKEFLAGS in \
 ## If we run "make TESTS='snooze nap'", FreeBSD 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 unpleasant hack.
+## 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 ;; \
+## Extra indirection with ${am__bs} required by FreeBSD 8.x make.
+## Not sure why (so sorry for the cargo-cult programming here).
+           am__bs=\\; \
+           am__flags=`printf '%s\n' "$$MAKEFLAGS" \
+            | sed "s/$$am__bs$$am__bs[$$am__bs $$am__bs        ]*//g"`;; \
          *) \
-          am__skip_next=no; \
-           for am__flg in $$MAKEFLAGS; do \
-            if test $$am__skip_next = yes; then \
-              am__skip_next=no; \
-              continue; \
-            fi; \
-             case $$am__flg in \
-               *=*|--*) ;; \
-## Quite ugly special-casing.  We might need other similar, but let's
-## wait until the need arises.
-              -I) am__skip_next=yes;; \
-               *n*) am__dry=yes; break;; \
-             esac; \
-           done ;;\
-       esac; \
+           am__flags=$$MAKEFLAGS;; \
+      esac; \
+      am__skip_next=no; \
+      for am__flg in $$am__flags; do \
+        if test $$am__skip_next = yes; then \
+          am__skip_next=no; \
+          continue; \
+        fi; \
+        case $$am__flg in \
+          *=*|--*) ;; \
+## Quite ugly special-casing.  We might need other similar ones actually,
+## but let's wait until the need arises.
+          -I) am__skip_next=yes;; \
+          *$$am__target_option*) am__has_opt=yes; break;; \
+        esac; \
+      done;\
     fi; \
-    test $$am__dry = yes; \
+    unset am__skip_next am__flg am__flags am__target_option; \
+    test $$am__has_opt = yes; \
   }
 
+## 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" -- either because they
+## are declared as dependencies to '.MAKE' (NetBSD make), or because
+## their recipes contain the "$(MAKE)" string (GNU and Solaris make).
+am__make_dryrun = { am__target_option=n; $(am__make_running_with_option); }
+
+## Shell code that determines whether make is running in "keep-going mode"
+## ("make -k") or not.  Useful in rules that must recursively descend into
+## subdirectories, and decide whther to stop at the first error or not.
+am__make_keepgoing = { am__target_option=k; $(am__make_running_with_option); }
+
 ## Some derived variables that have been found to be useful.
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
diff --git a/lib/am/subdirs.am b/lib/am/subdirs.am
index c4c3694..999aa78 100644
--- a/lib/am/subdirs.am
+++ b/lib/am/subdirs.am
@@ -39,13 +39,12 @@ AM_RECURSIVE_TARGETS += $(am__recursive_targets:-recursive=)
 $(am__recursive_targets):
 ## Using $failcom allows "-k" to keep its natural meaning when running a
 ## recursive rule.
-       @fail= failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
+       @fail=; \
+       if $(am__make_keepgoing); then \
+         failcom='fail=yes'; \
+       else \
+         failcom='exit 1'; \
+       fi; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
 ## For distclean and maintainer-clean we make sure to use the full
diff --git a/m4/tar.m4 b/m4/tar.m4
index aac6d8f..539aa3a 100644
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -126,7 +126,7 @@ m4_if([$1], [v7],
 
   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-  
+
 AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index afe2183..89f7c87 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -666,6 +666,7 @@ t/maken.sh \
 t/maken3.sh \
 t/makevars.sh \
 t/make-dryrun.tap \
+t/make-keepgoing.tap \
 t/make-is-gnu.sh \
 t/man.sh \
 t/man2.sh \
@@ -1015,6 +1016,7 @@ t/subdir-order.sh \
 t/subdir-with-slash.sh \
 t/subdir-subsub.sh \
 t/subdir-distclean.sh \
+t/subdir-keep-going-pr12554.sh \
 t/subobj.sh \
 t/subobj2.sh \
 t/subobj4.sh \
diff --git a/t/make-dryrun.tap b/t/make-dryrun.tap
index 208b421..2fd37a2 100755
--- a/t/make-dryrun.tap
+++ b/t/make-dryrun.tap
@@ -18,7 +18,7 @@
 
 . test-init.sh
 
-plan_ 18
+plan_ 20
 
 if echo "all: ; address@hidden %sbb%s aa cc" | $MAKE -n -f - | grep aabbcc; 
then
   make_plus_silence () { return 0; }
@@ -26,7 +26,7 @@ else
   make_plus_silence () { return 1; }
 fi
 
-mkdir none
+mkdir none # Also used later.
 if echo nil: | $MAKE -I none -f -; then
   make_supports_option_I () { return 0; }
 else
@@ -38,8 +38,6 @@ echo AC_OUTPUT >> configure.ac
 cat > Makefile.am <<'END'
 all:
        : Dummy, nothing to do.
-foo:
-       $(MAKE) all
 run:
        @echo ":: $$MAKEFLAGS ::"; : For debugging.
        $(am__make_dryrun) && exit 1; echo ok > from-run
@@ -61,7 +59,6 @@ check_make ()
     case $1 in
       -C) condition=$2 skip_reason=$3; shift; shift;;
       -M) msg=$2; shift;;
-      -X) directive=TODO;;
       --) shift; break;;
        *) break;;
     esac
@@ -116,7 +113,7 @@ check_make --run -C make_supports_option_I "-I make option 
unsupported" \
                  -M "$pr" -I none
 
 check_make --run -C using_gmake "\$MAKE is not GNU make" \
-                 -M "$pr" -I none --include dry-run 
+                 -M "$pr" -I none --include dry-run
 
 check_make --dry -C make_supports_option_I "-I make option unsupported" \
                  -M "$pr" -I none -n
@@ -138,7 +135,9 @@ check_metachars MYFLAGS='-knf2\ n\ \\n'
 check_metachars MYFLAGS="(&) | ; \" \` '"
 check_metachars MYFLAGS=" ' # ' "
 check_metachars MYFLAGS='$(foo)'
+check_metachars MYFLAGS='$(foo -n)'
 check_metachars MYFLAGS='`touch bad`'
+check_metachars MYFLAGS='`touch --dry-run bad`'
 
 # ----------------------------------------------------------------------
 
diff --git a/t/make-is-gnu.sh b/t/make-is-gnu.sh
index c37cc17..79397da 100755
--- a/t/make-is-gnu.sh
+++ b/t/make-is-gnu.sh
@@ -31,7 +31,7 @@ cat > Makefile.am <<'END'
 all: file
        $(am__is_gnu_make)
 file:
-       if $(am__is_gnu_make); then : > ok; else : > ko; fi 
+       if $(am__is_gnu_make); then : > ok; else : > ko; fi
 END
 
 $ACLOCAL
diff --git a/t/make-dryrun.tap b/t/make-keepgoing.tap
similarity index 52%
copy from t/make-dryrun.tap
copy to t/make-keepgoing.tap
index 208b421..a71d2d0 100755
--- a/t/make-dryrun.tap
+++ b/t/make-keepgoing.tap
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012-2013 Free Software Foundation, Inc.
+# Copyright (C) 2013 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,20 +14,14 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Check that $(am__make_dryrun) works as expected.
+# Check that $(am__make_keepgoing) works as expected.
 
 . test-init.sh
 
-plan_ 18
+plan_ 20
 
-if echo "all: ; address@hidden %sbb%s aa cc" | $MAKE -n -f - | grep aabbcc; 
then
-  make_plus_silence () { return 0; }
-else
-  make_plus_silence () { return 1; }
-fi
-
-mkdir none
-if echo nil: | $MAKE -I none -f -; then
+mkdir kool # Also used later.
+if echo nil: | $MAKE -I kool -f -; then
   make_supports_option_I () { return 0; }
 else
   make_supports_option_I () { return 1; }
@@ -37,23 +31,20 @@ echo AC_OUTPUT >> configure.ac
 
 cat > Makefile.am <<'END'
 all:
-       : Dummy, nothing to do.
-foo:
-       $(MAKE) all
-run:
-       @echo ":: $$MAKEFLAGS ::"; : For debugging.
-       $(am__make_dryrun) && exit 1; echo ok > from-run
-dry:
-       address@hidden ":: $$MAKEFLAGS ::"; : For debugging.
-       +$(am__make_dryrun) || exit 1; echo ok > from-dry
+       @echo 'Default target $@ should not be called'>&2; exit 1;
+k-y:
+       @echo ":: $$MAKEFLAGS ::" ;: For debugging.
+       $(am__make_keepgoing)
+k-n:
+       @echo ":: $$MAKEFLAGS ::" ;: For debugging.
+       $(am__make_keepgoing) && exit 1; exit 0
 END
 
 check_make ()
 {
   r=ok msg= mode= condition=: directive= reason= skip_reason=
   case $1 in
-    --dry) mode=dry;;
-    --run) mode=run;;
+    k-[yn]) mode=$1;;
     *) fatal_ "check_run: invalid usage";;
   esac
   shift
@@ -70,9 +61,6 @@ check_make ()
   msg=${mode}${msg:+" [$msg]"}
   if $condition; then
     $MAKE "$mode" ${1+"$@"} || r='not ok'
-    test -f from-$mode      || r='not ok'
-    test ! -e bad           || r='not ok'
-    rm -f bad from-*        || fatal_ "cleaning up"
   else
     directive=SKIP reason=$skip_reason
   fi
@@ -89,40 +77,39 @@ $AUTOMAKE   || fatal_ "automake failed"
 
 # ----------------------------------------------------------------------
 
-check_make --run
+check_make k-n
 
-# Test against a known regression.  This was especially heinous, since
-# make running in normal mode was sometimes mistaken for make running
-# in dry mode.
-check_make --run TESTS="n1.test n2.test"
-check_make --run TESTS="n1 n2" AM_MAKEFLAGS="TESTS='n1 n2'"
-check_make --run TESTS="n1 n2" AM_MAKEFLAGS='TESTS="n1 n2"'
-check_make --run FOOFLAGS="-n -n -knf2 n --none -n"
-check_make --run MYFLAGS="-n --dryrun -n --dry-run -n"
+# Test against a possible regressions similar to those that affected
+# detection of dry mode ("make -n").
+check_make k-n TESTS="k.test k2.test"
+check_make k-n TESTS="k1 k k2" AM_MAKEFLAGS="TESTS='k1 k2'"
+check_make k-n TESTS="k1 k k2" AM_MAKEFLAGS='TESTS="k1 k k2"'
+check_make k-n FOOFLAGS="-k -k -nkf2 k -ks --keep -k"
+check_make k-n MYFLAGS="-k --keepgoing -k --keep-run -k"
 
 # ----------------------------------------------------------------------
 
-check_make --dry -C make_plus_silence 'recipe prefix "+" unsupported' -n
-check_make --dry -C using_gmake "\$MAKE is not GNU make" --dry-run -k
+check_make k-y -k
+check_make k-y -C using_gmake "\$MAKE is not GNU make" --keep-going
 
 # ----------------------------------------------------------------------
 
-# Automake bug#13760: the "n" in "none" used to confound am__make_dryrun
-# into thinking the '-n' option had been passed.
+# Related to automake bug#12554: the "k" in "kool" used to confound
+# am__make_keepgoing into thinking the '-k' option had been passed.
 
-pr='bug#13760'
+pr='bug#12554'
 
-check_make --run -C make_supports_option_I "-I make option unsupported" \
-                 -M "$pr" -I none
+check_make k-n -C make_supports_option_I "-I make option unsupported" \
+               -M "$pr" -I kool
 
-check_make --run -C using_gmake "\$MAKE is not GNU make" \
-                 -M "$pr" -I none --include dry-run 
+check_make k-n -C using_gmake "\$MAKE is not GNU make" \
+               -M "$pr" -I kool --include keep-going
 
-check_make --dry -C make_supports_option_I "-I make option unsupported" \
-                 -M "$pr" -I none -n
+check_make k-y -C make_supports_option_I "-I make option unsupported" \
+               -M "$pr" -I kool -k
 
-check_make --dry -C using_gmake "\$MAKE is not GNU make" \
-                 -M "$pr" --dry-run -I none --include dry-run
+check_make k-y -C using_gmake "\$MAKE is not GNU make" \
+               -M "$pr" --keep-going -I kool --include keep-going
 
 # ----------------------------------------------------------------------
 
@@ -130,15 +117,17 @@ check_make --dry -C using_gmake "\$MAKE is not GNU make" \
 
 check_metachars ()
 {
-  check_make --run -M "metachars" "$@"
+  check_make k-n -M "metachars" "$@"
 }
 
-check_metachars MYFLAGS="-n \"n\" '-n' --none -n"
-check_metachars MYFLAGS='-knf2\ n\ \\n'
+check_metachars MYFLAGS="-k \"k\" '-k' --keep-going -k"
+check_metachars MYFLAGS='-knf2\ k\ \\k'
 check_metachars MYFLAGS="(&) | ; \" \` '"
 check_metachars MYFLAGS=" ' # ' "
 check_metachars MYFLAGS='$(foo)'
+check_metachars MYFLAGS='$(foo -k)'
 check_metachars MYFLAGS='`touch bad`'
+check_metachars MYFLAGS='`touch --keep-going bad`'
 
 # ----------------------------------------------------------------------
 
diff --git a/t/nodep.sh b/t/nodep.sh
index c36405d..b0b29f6 100755
--- a/t/nodep.sh
+++ b/t/nodep.sh
@@ -36,5 +36,7 @@ mkdir x
 $ACLOCAL
 $AUTOMAKE
 
-grep '%' Makefile.in && exit 1
-exit 0
+sed 's/printf .*%s//' Makefile.in > Makefile.tmp
+grep '%' Makefile.tmp && exit 1
+
+:
diff --git a/t/subdir-keep-going-pr12554.sh b/t/subdir-keep-going-pr12554.sh
new file mode 100755
index 0000000..03d5cb0
--- /dev/null
+++ b/t/subdir-keep-going-pr12554.sh
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (C) 2013 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the Automake-generated recursive rules are resilient against
+# false positives in deciding whether make is running with the '-k'
+# option, and thus whether a failure into one of the $(SUBDIRS) should
+# still prevent recursion in the following $(SUBDIRS) entries.  See
+# automake bug#12544.
+
+. test-init.sh
+
+echo nil: | $MAKE -I . -f - || skip_ "$MAKE doesn't support the -I option"
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
+AC_OUTPUT
+END
+
+mkdir k ./--keep-going sub1 sub2
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 sub2
+END
+
+cat > sub1/Makefile.am <<'END'
+all-local:
+       touch ko
+       false
+END
+cat > sub2/Makefile.am <<'END'
+all-local:
+       test -f ../sub1/ko
+       touch ok
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+st=0
+$MAKE -I k -I --keep-going \
+  TESTS='k --keep-going -k' AM_MAKEFLAGS="TESTS='k --keep-going -k'" \
+  || st=$?
+# Don't trust the exit status of "make -k" for non-GNU make.
+if using_gmake; then
+  test $st -gt 0 || exit 1
+fi
+test ! -r sub2/ok
+
+# Sanity check.
+st=0; $MAKE -k || st=$?
+if { using_gmake && test $st -eq 0; } || test ! -f sub2/ok; then
+  fatal_ '"make -k" not working as expected'
+fi
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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