automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, micro, updated. v1.14.1-29-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, micro, updated. v1.14.1-29-gb8aa9fc
Date: Tue, 30 Dec 2014 21:52:54 +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=b8aa9fc0ce8d411be4451022e4b14d0f4238a9d9

The branch, micro has been updated
       via  b8aa9fc0ce8d411be4451022e4b14d0f4238a9d9 (commit)
       via  0fae5905f9b676725a7e82c7aa03e8e3cbf5008a (commit)
       via  cd040965d51f9818c56a714efaaaa699eb93b503 (commit)
       via  b9303ccf7f3c13fd9422b3457f3ffd20ad300ce3 (commit)
       via  c3da5a74ffef3cb177270b021c34bd4cd2bb80f5 (commit)
      from  6979c8e680b68dbc2b27b4db808cb037ba6aabb7 (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 -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 t/ax/shell-no-trail-bslash.in         |  109 ++++++++++++++++++---------------
 t/instmany-mans.sh                    |   16 +++--
 t/instmany-python.sh                  |   16 +++--
 t/instmany.sh                         |   16 +++--
 t/lex-noyywrap.sh                     |    7 +-
 t/parallel-tests-concurrency.sh       |   15 +++--
 t/self-check-shell-no-trail-bslash.sh |   40 +++++++++++-
 t/txinfo-override-texinfo-tex.sh      |    6 +-
 8 files changed, 147 insertions(+), 78 deletions(-)

diff --git a/t/ax/shell-no-trail-bslash.in b/t/ax/shell-no-trail-bslash.in
index f785de8..26979b6 100644
--- a/t/ax/shell-no-trail-bslash.in
+++ b/t/ax/shell-no-trail-bslash.in
@@ -1,5 +1,5 @@
 #! @AM_TEST_RUNNER_SHELL@
-# Copyright (C) 2012-2013 Free Software Foundation, Inc.
+# Copyright (C) 2012-2014 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,63 +14,72 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# A "shell" that chokes on '-c' commands having a trailing '\' character
-# (possibly followed by whitespace only).  This is to emulate problems
-# seen in older bash versions (e.g., bash 2.05b).
-# See also automake bug#10436.
+# A "shell" that chokes on '-c' commands and/or shell scripts having
+# a trailing '\' character (possibly followed by whitespace only).
+# This is to emulate problems seen in older bash versions (e.g., bash
+# 2.05b). See also automake bug#10436.
 
-set -e
 set -u
 
 am_SHELL=${AM_TESTSUITE_SHELL-'@SHELL@'}
 
-tab='  '
-nl='
+(
+  set -e
+  shell_command=; unset shell_command
+  shell_script=; unset shell_script
+  while test $# -gt 0; do
+    case $1 in
+      # The shell might be invoked by make e.g. as "sh -ec" or "sh -ce".
+      # Be liberal (in the spirit of defensive programming) and accept
+      # both forms.
+      -*c*) shell_command=$2; shift;;
+       -?*) ;;
+         *) break;;
+    esac
+    shift
+  done
+
+  if test x${shell_command+"set"} != x"set"; then
+    if test $# -gt 0; then
+      shell_script=$1
+      shell_command=$(cat <"$shell_script")
+    else
+      # Some make implementations, like *BSD's, pass the recipes to the
+      # shell through its standard input.  Trying to run our extra checks
+      # in this case would be too tricky, so we just skip them.
+      exit 0
+    fi
+  fi
+  original_shell_command=$shell_command
+
+  tab='        '
+  nl='
 '
-am_shell_flags=
-am_shell_command=; unset am_shell_command
-while test $# -gt 0; do
-  case $1 in
-    # If the shell is invoked by make e.g. as "sh -ec" (seen on
-    # GNU make in POSIX mode) or "sh -ce" (seen on Solaris make).
-    -*c*)
-        am_flg=$(printf '%s\n' "$1" | sed -e 's/^-//' -e 's/c//g')
-        if test x"$am_flg" != x; then
-          am_shell_flags="$am_shell_flags -$am_flg"
+  case "$shell_command" in
+    *" "|*"$tab"|*"$nl")
+      shell_command=$(printf '%s\n' "$shell_command" | tr -d " $tab$nl");;
+  esac
+
+  case "$shell_command" in
+    *\\)
+      {
+        printf '%s\n' "$0: recipe/script ends with backslash character"
+        printf '%s\n' "=== BEGIN recipe/script"
+        if test x${shell_script+"set"} = x"set"; then
+          cat <"$shell_script"
+        else
+          printf '%s\n' "$original_shell_command"
         fi
-        am_shell_command=$2
-        shift;;
-    -?*)
-        am_shell_flags="$am_shell_flags $1";;
-      *)
-        break;;
+        printf '%s\n' "=== END recipe/script"
+      } >&2
+      exit 1
+      ;;
   esac
-  shift
-done
+)
 
-if test x${am_shell_command+"set"} != x"set"; then
-  # Some make implementations, like *BSD's, pass the recipes to the shell
-  # through its standard input.  Trying to run our extra checks in this
-  # case would be too tricky, so we just skip them.
-  exec $am_SHELL $am_shell_flags ${1+"$@"}
+if test $? -gt 0; then
+  # Some of our scripts or makefile recipes had invalid contents.
+  exit 3
 fi
 
-case $am_shell_command in
-  *" "|*"$tab"|*"$nl")
-    am_tweaked_shell_command=$(printf '%s\n' "$am_shell_command" \
-                                 | tr -d " $tab$nl");;
-  *)
-    am_tweaked_shell_command=$am_shell_command;;
-esac
-
-case $am_tweaked_shell_command in
-  *\\)
-    printf '%s\n' "$0: recipe ends with backslash character" >&2
-    printf '%s\n' "=== BEGIN recipe" >&2
-    printf '%s\n' "${am_shell_command-}" >&2
-    printf '%s\n' "=== END recipe" >&2
-    exit 1
-    ;;
-esac
-
-exec $am_SHELL $am_shell_flags -c "$am_shell_command" ${1+"$@"}
+exec ${AM_TESTSUITE_SHELL-'@SHELL@'} ${1+"$@"}
diff --git a/t/instmany-mans.sh b/t/instmany-mans.sh
index eb0c9db..0ed2348 100644
--- a/t/instmany-mans.sh
+++ b/t/instmany-mans.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 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
@@ -37,8 +37,6 @@ mkdir x-bin
 
 sed "s|@limit@|$limit|g" >x-bin/my-install <<'END'
 #! /bin/sh
-# Fake install script.  This doesn't really install
-# (the INSTALL path below would be wrong outside this directory).
 address@hidden@
 PATH=$oPATH; export PATH
 if test -z "$orig_INSTALL"; then
@@ -72,8 +70,16 @@ END
 # Creative quoting in the next line to please maintainer-check.
 chmod +x x-bin/'rm' x-bin/my-install
 
-cat > setenv.in <<'END'
-orig_INSTALL='@INSTALL@'; export orig_INSTALL
+cat >setenv.in <<'END'
+orig_INSTALL='@INSTALL@'
+# In case we've falled back on the install-sh script (seen e.g.,
+# on AIX 7.1), we need to make sure we use its absolute path,
+# as we don't know from which directory we'll be run.
+case "$orig_INSTALL" in
+   /*) ;;
+  */*) orig_INSTALL=$(pwd)/$orig_INSTALL;;
+esac
+export orig_INSTALL
 END
 
 cat >>configure.ac <<END
diff --git a/t/instmany-python.sh b/t/instmany-python.sh
index dfcf14b..0088b2d 100644
--- a/t/instmany-python.sh
+++ b/t/instmany-python.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 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
@@ -33,8 +33,6 @@ mkdir x-bin
 
 sed "s|@limit@|$limit|g" >x-bin/my-install <<'END'
 #! /bin/sh
-# Fake install script.  This doesn't really install
-# (the INSTALL path below would be wrong outside this directory).
 address@hidden@
 PATH=$oPATH; export PATH
 if test -z "$orig_INSTALL"; then
@@ -68,8 +66,16 @@ END
 # Creative quoting in the next line to please maintainer-check.
 chmod +x x-bin/'rm' x-bin/my-install
 
-cat > setenv.in <<'END'
-orig_INSTALL='@INSTALL@'; export orig_INSTALL
+cat >setenv.in <<'END'
+orig_INSTALL='@INSTALL@'
+# In case we've falled back on the install-sh script (seen e.g.,
+# on AIX 7.1), we need to make sure we use its absolute path,
+# as we don't know from which directory we'll be run.
+case "$orig_INSTALL" in
+   /*) ;;
+  */*) orig_INSTALL=$(pwd)/$orig_INSTALL;;
+esac
+export orig_INSTALL
 END
 
 cat >>configure.ac <<END
diff --git a/t/instmany.sh b/t/instmany.sh
index 0a479cc..126c93f 100644
--- a/t/instmany.sh
+++ b/t/instmany.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 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
@@ -45,8 +45,6 @@ mkdir x-bin
 
 sed "s|@limit@|$limit|g" >x-bin/my-install <<'END'
 #! /bin/sh
-# Fake install script.  This doesn't really install
-# (the INSTALL path below would be wrong outside this directory).
 address@hidden@
 PATH=$oPATH; export PATH
 if test -z "$orig_INSTALL"; then
@@ -80,8 +78,16 @@ END
 # Creative quoting in the next line to please maintainer-check.
 chmod +x x-bin/'rm' x-bin/my-install
 
-cat > setenv.in <<'END'
-orig_INSTALL='@INSTALL@'; export orig_INSTALL
+cat >setenv.in <<'END'
+orig_INSTALL='@INSTALL@'
+# In case we've falled back on the install-sh script (seen e.g.,
+# on AIX 7.1), we need to make sure we use its absolute path,
+# as we don't know from which directory we'll be run.
+case "$orig_INSTALL" in
+   /*) ;;
+  */*) orig_INSTALL=$(pwd)/$orig_INSTALL;;
+esac
+export orig_INSTALL
 END
 
 cat >>configure.ac <<END
diff --git a/t/lex-noyywrap.sh b/t/lex-noyywrap.sh
index 615a7fc..750f322 100644
--- a/t/lex-noyywrap.sh
+++ b/t/lex-noyywrap.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 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
@@ -69,7 +69,8 @@ if ! cross_compiling; then
   : For shells with busted 'set -e'.
 fi
 
-# Sanity check on distribution.
-yl_distcheck DISTCHECK_CONFIGURE_FLAGS='LEXLIB="none needed"'
+# Sanity check on distribution.  Escape in LEXLIB must use backspace,
+# not double-quotes, to avoid a spurious failure with AIX make.
+yl_distcheck DISTCHECK_CONFIGURE_FLAGS='LEXLIB=none\ needed'
 
 :
diff --git a/t/parallel-tests-concurrency.sh b/t/parallel-tests-concurrency.sh
index 7fbd20e..4a70e23 100644
--- a/t/parallel-tests-concurrency.sh
+++ b/t/parallel-tests-concurrency.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 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
@@ -17,8 +17,8 @@
 # Check parallel-tests features:
 # - concurrent parallel execution
 
-# FIXME: we should factorize the code to determine how to run
-#        make in parallel out in am-test-lib.sh ...
+# FIXME: we should factor out (into am-test-lib.sh?) the code to determine
+#        how to run make in parallel mode ...
 
 . test-init.sh
 
@@ -89,11 +89,16 @@ for build in serial parallel; do
 done
 
 cd serial
-$MAKE ${j}1 check &
-cd ../parallel
+# Do *not* use "make -j1" here; apparently, some make implementations
+# (e.g., AIX 7.1) interpret it as a synonym of "make -j" :-(
+$MAKE check &
+cd ..
+
+cd parallel
 $sleep
 run_make -O -- ${j}4 check
 cd ..
+
 # Ensure the tests are really being run in parallel mode: if this is
 # the case, the serial run of the dummy testsuite started above should
 # still be ongoing when the parallel one has terminated.
diff --git a/t/self-check-shell-no-trail-bslash.sh 
b/t/self-check-shell-no-trail-bslash.sh
index 14ee02c..8b7afa5 100644
--- a/t/self-check-shell-no-trail-bslash.sh
+++ b/t/self-check-shell-no-trail-bslash.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012-2013 Free Software Foundation, Inc.
+# Copyright (C) 2012-2014 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
@@ -34,12 +34,48 @@ bad:
 END
 
 SHELL=$am_testaux_builddir/shell-no-trail-bslash
+
 $SHELL -c 'exit 0'
 test "$($SHELL -c 'echo is  o\k')" = "is ok"
 
+echo 'echo is  ok\"' > ok.sh
+$SHELL ./ok.sh
+test "$($SHELL ./ok.sh)" = "is ok\""
+
+tab='  '
+nl='
+'
+for sfx in \
+  '\' \
+  '\\' \
+  '\\\\\' \
+  '\ ' \
+  "\\$tab" \
+  "\\ $tab$tab   " \
+  "\\$nl" \
+  "\\ $nl " \
+  "\\$nl$nl$nl" \
+; do
+  for pfx in "" "echo bad" ": a${nl}# multine${nl}: text"; do
+    cmd=${pfx}${sfx}
+    printf '%s' "$cmd" > bad.sh
+    for args in '-c "$cmd"' './bad.sh'; do
+      eval "\$SHELL $args 2>stderr && { cat stderr >&2; exit 1; }; :"
+      cat stderr >&2
+      $FGREP "recipe/script ends with backslash character" stderr
+      cmd="$cmd" $PERL -w -e '
+        undef $/;
+        $_ = <>;
+        index($_, $ENV{cmd}) >= 0 or exit 1;
+      ' <stderr
+      $FGREP "$cmd" stderr
+    done
+  done
+done
+
 $MAKE good
 
 run_make -E -e FAIL bad SHELL="$SHELL"
-$FGREP "recipe ends with backslash character" stderr
+$FGREP "recipe/script ends with backslash character" stderr
 
 :
diff --git a/t/txinfo-override-texinfo-tex.sh b/t/txinfo-override-texinfo-tex.sh
index 72bf834..c03dd39 100644
--- a/t/txinfo-override-texinfo-tex.sh
+++ b/t/txinfo-override-texinfo-tex.sh
@@ -30,12 +30,13 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TEXINFO_TEX = $(srcdir)/tex/texinfo.tex
+TEXINFO_TEX = ../tex/texinfo.tex
 info_TEXINFOS = main.texi
 sure_it_exists:
-       test -f $(TEXINFO_TEX)
+       test -f $(srcdir)/$(TEXINFO_TEX)
 sure_it_is_not_distributed: distdir
        test ! -f $(distdir)/tex/texinfo.tex
+check-local: sure_it_exists
 END
 
 cat > main.texi << 'END'
@@ -61,7 +62,6 @@ test -f tex/texinfo.tex
 
 ./configure
 
-$MAKE sure_it_exists
 $MAKE distcheck
 $MAKE sure_it_is_not_distributed
 


hooks/post-receive
-- 
GNU Automake



reply via email to

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