automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.12.2-84-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.12.2-84-g70b503a
Date: Sat, 04 Aug 2012 21:45:06 +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=70b503ae955f36fd0e0b960940933b92e98ea94c

The branch, maint has been updated
       via  70b503ae955f36fd0e0b960940933b92e98ea94c (commit)
       via  f989c7e173a925e0dbe879afafa9db23fd12a974 (commit)
       via  3632e7d87d2deba49abdf1dba9fbb536ce58328d (commit)
       via  96afe638f09cd5fc32659883952b89f2d7e2a315 (commit)
       via  65dadf65814d7dd395d5cc35903f624b464091c6 (commit)
       via  6d6c831d9cec0549434f0f0c15437b810b877d10 (commit)
       via  4e922a42f01b5ba146c1b7d29e3253bee07e2c8b (commit)
       via  32eed29a7171549080a91514374cff7341d9c08e (commit)
      from  a38534b1de0d0b582297cea30d163405f03924e3 (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 70b503ae955f36fd0e0b960940933b92e98ea94c
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 4 23:03:46 2012 +0200

    tests: fix a spurious XPASS on OpenIndiana
    
    * t/instspc.tap: Here, by isolating the $(DESTDIR) used by runs with
    different "problematic strings" to prevent them to unduly interfering
    with each other.  With this, the Automake testsuite finally run cleanly
    on the OpenIndiana and Solaris 10 systems I have access to.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit f989c7e173a925e0dbe879afafa9db23fd12a974
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 4 20:38:31 2012 +0200

    tests: avoid spurious failure of 't/vala-vapi.sh' on OpenIndiana
    
    * t/vala-vapi.sh: Use 'printf', not 'echo', to print strings containing
    substrings like '\n', that can be interpreted like escape strings.  That
    because the /bin/sh and the /bin/bash shell from OpenIndiana actually
    interpret them that way:
    
      $ /bin/sh -c 'echo "foo\nbar"'
      foo
      bar
      $ /bin/bash -c 'echo "foo\nbar"'
      foo
      bar
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 3632e7d87d2deba49abdf1dba9fbb536ce58328d
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 4 20:06:28 2012 +0200

    tests: avoid spurious failure of 't/uninstall-fail.sh' on OpenIndiana
    
    On current OpenIndiana (based on what once was OpenSolaris 11), the shell
    /bin/sh (which, differently from what happens on Solaris, is a true POSIX
    shell, thus worthy of consideration) somehow manages to "eat" the
    error message from 'rm' when that fails to remove a file due to lacking
    permission on the parent directory:
    
      $ /bin/sh -c "cd unwritable-dir || { echo OOPS; exit 1; }; rm -f foo"
      $ echo rc = $?
      rc = 1
      $ /bin/bash -c "cd unwritable-dir || { echo OOPS; exit 1; }; rm -f foo"
      rm: foo not removed: Permission denied
      $ echo rc = $?
      rc = 2
      $ /bin/sh -c "cd unwritable-dir || { echo OOPS; exit 1; }; env rm -f foo"
      rm: foo not removed: Permission denied
      $ echo rc = $?
      rc = 2
    
    That is probably due to an improper optimization, that is, the shell tries
    to be smart and remove the file itself instead of invoking 'rm', but fails
    spectacularly in the attempt.
    
    * t/uninstall-fail.sh: The just-described bug was causing a spurious
    failure in this test case.  Cater to thus situation, by relaxing the
    test when a faulty shell is detected.  And while at it, fix and improve
    an unrelated comment.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 96afe638f09cd5fc32659883952b89f2d7e2a315
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 4 18:36:24 2012 +0200

    tests: reimplement wrappers for automake and aclocal in perl
    
    This will allow us to avoid one extra shell invocation per automake
    and aclocal invocation in our testsuite, and, more importantly, will
    allow us not to worry about potential shell portability issues, at
    least in those wrappers.  For an example of such a portability issue,
    refer to the recent commit v1.12.2-80-g65dadf6 "tests: work around a
    ksh bug w.r.t. ${1+"$@"}".
    
    * t/wrap/automake.in, t/wrap/aclocal.in: Rewritten in perl.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 65dadf65814d7dd395d5cc35903f624b464091c6
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 4 16:54:30 2012 +0200

    tests: work around a ksh bug w.r.t. ${1+"$@"}
    
    Fixes automake bug#10898.  See also the older (much older) thread:
    <http://lists.gnu.org/archive/html/automake-patches/2009-12/msg00036.html>
    
    At least the AT&T and OpenSolaris versions of the Korn shell, as well
    as the /bin/sh from OpenIndiana 11, have a strange bug regarding the
    expansion of ${1+"$@"}: when exactly *one empty* argument is passed to
    a script run by one of this shells, inside that script ${1+"$@"} will
    expand to *nothing*, rather than to to the single empty string, as
    one would expect (OTOH, $# will correctly expand to 1).  This buggy
    behaviour was causing a spurious failure in our testsuite (test 6 in
    't/automake-cmdline.tap').  Work around it.
    
    * t/wrap/automake.in: Here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 6d6c831d9cec0549434f0f0c15437b810b877d10
Merge: a38534b 4e922a4
Author: Stefano Lattarini <address@hidden>
Date:   Thu Aug 2 11:41:28 2012 +0200

    Merge branch 'depcomp-pgcc' into maint
    
    * depcomp-pgcc:
      depcomp: style changes to Portland Group Compilers support
      depcomp: initial support for Portland Group Compilers

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

Summary of changes:
 lib/depcomp         |   75 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 t/instspc.tap       |    8 +++++-
 t/uninstall-fail.sh |   14 +++++++---
 t/vala-vapi.sh      |    8 ++++-
 t/wrap/aclocal.in   |   29 +++++++++----------
 t/wrap/automake.in  |   25 ++++++++---------
 6 files changed, 123 insertions(+), 36 deletions(-)

diff --git a/lib/depcomp b/lib/depcomp
index debb6ff..0544c68 100755
--- a/lib/depcomp
+++ b/lib/depcomp
@@ -1,7 +1,7 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2012-03-27.16; # UTC
+scriptversion=2012-07-12.20; # UTC
 
 # Copyright (C) 1999-2012 Free Software Foundation, Inc.
 
@@ -334,6 +334,79 @@ icc)
   rm -f "$tmpdepfile"
   ;;
 
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file.  A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+  # Portland's C compiler understands '-MD'.
+  # Will always output deps to 'file.d' where file is the root name of the
+  # source file under compilation, even if file resides in a subdirectory.
+  # The object file name does not affect the name of the '.d' file.
+  # pgcc 10.2 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using '\' :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  # Use the source, not the object, to determine the base name, since
+  # that's sadly what pgcc will do too.
+  base=`echo "$source" | sed -e 's|^.*/||' -e 's/\.[-_a-zA-Z0-9]*$//'`
+  tmpdepfile="$base.d"
+
+  # For projects that build the same source file twice into different object
+  # files, the pgcc approach of using the *source* file root name can cause
+  # problems in parallel builds.  Use a locking strategy to avoid stomping on
+  # the same $tmpdepfile.
+  lockdir="$base.d-lock"
+  trap "echo '$0: caught signal, cleaning up...' >&2; rm -rf $lockdir" 1 2 13 
15
+  numtries=100
+  i=$numtries
+  while test $i -gt 0 ; do
+    # mkdir is a portable test-and-set.
+    if mkdir $lockdir 2>/dev/null; then
+      # This process acquired the lock.
+      "$@" -MD
+      stat=$?
+      # Release the lock.
+      rm -rf $lockdir
+      break
+    else
+      ## the lock is being held by a different process,
+      ## wait until the winning process is done or we timeout
+      while test -d $lockdir && test $i -gt 0; do
+        sleep 1
+        i=`expr $i - 1`
+      done
+    fi
+    i=`expr $i - 1`
+  done
+  trap - 1 2 13 15
+  if test $i -le 0; then
+    echo "$0: failed to acquire lock after $numtries attempts" >&2
+    echo "$0: check lockdir '$lockdir'" >&2
+    exit 1
+  fi
+
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
 hp2)
   # The "hp" stanza above does not work with aCC (C++) and HP's ia64
   # compilers, which have integrated preprocessors.  The correct option
diff --git a/t/instspc.tap b/t/instspc.tap
index f72ccf3..2a0fb10 100755
--- a/t/instspc.tap
+++ b/t/instspc.tap
@@ -285,7 +285,13 @@ for test_name in $test_names_list; do
         ;;
       dest)
         build=build-$test_name
-        dest=$ocwd/$test_string
+        # Also use $test_name in the definition of $dest, to avoid
+        # interferences among different tests in case $test_string
+        # is strangely munged (which is not unexpected, considering
+        # how tricky its characters are).  With some shells, this
+        # has already happened (at least on OpenIndiana 11 and on
+        # Solaris 10).
+        dest=$ocwd/dest-$test_name/$test_string
         mkdir "$build" || fatal_ "cannot create '$build'"
         ;;
       *)
diff --git a/t/uninstall-fail.sh b/t/uninstall-fail.sh
index 230832c..510c968 100755
--- a/t/uninstall-fail.sh
+++ b/t/uninstall-fail.sh
@@ -28,9 +28,14 @@ chmod a-w d || skip "cannot make directories unwritable"
 
 # On Solaris 10, if '/bin/rm' is run with the '-f' option, it doesn't
 # print any error message when failing to remove a file (due to e.g.,
-# "Permission denied").  Yikes.  We'll cater to this incompatibility
-# by relaxing a test below if a faulty 'rm' is detected.
-st=0; rm -f d/f 2>stderr || st=$?
+# "Permission denied").  And it gets weirder.  On OpenIndiana 11, the
+# /bin/sh shell (in many respects a decent POSIX shell) seems to somehow
+# "eat" the error message from 'rm' in some situation, although the 'rm'
+# utility itself correctly prints it when invoked from (say) 'env' or
+# 'bash'.  Yikes.
+# We'll cater to these incompatibilities by relaxing a test below if
+# a faulty shell or 'rm' program is detected.
+st=0; $SHELL -c 'rm -f d/f' 2>stderr || st=$?
 cat stderr >&2
 test $st -gt 0 || skip_ "can delete files from unwritable directories"
 if grep 'rm:' stderr; then
@@ -53,7 +58,8 @@ $ACLOCAL
 $AUTOMAKE
 $AUTOCONF
 
-# Make it harder to experience false postives when grepping error messages.
+# Weird name, to make it harder to experience false positives when
+# grepping error messages.
 inst=__inst-dir__
 
 ./configure --prefix="$(pwd)/$inst"
diff --git a/t/vala-vapi.sh b/t/vala-vapi.sh
index 1862b71..2f332da 100755
--- a/t/vala-vapi.sh
+++ b/t/vala-vapi.sh
@@ -40,7 +40,9 @@ int main ()
 }
 END
 
-echo '#define BARBAR "Zardoz!\n"' > foo.h
+# Use printf, not echo, to avoid '\n' being considered and escape
+# sequence and printed as a newline in 'foo.h'.
+printf '%s\n' '#define BARBAR "Zardoz!\n"' > foo.h
 
 cat > foo.vapi <<'END'
 [CCode (cprefix="", lower_case_cprefix="", cheader_filename="foo.h")]
@@ -74,7 +76,9 @@ cross_compiling || $MAKE test1 || exit 1
 
 # Simple check on remake rules.
 $sleep
-echo '#define BAZBAZ "Quux!\n"' > foo.h
+# Use printf, not echo, to avoid '\n' being considered and escape
+# sequence and printed as a newline in 'foo.h'.
+printf '%s\n' '#define BAZBAZ "Quux!\n"' > foo.h
 sed 's/BARBAR/BAZBAZ/' zardoz.vala > t && mv -f t zardoz.vala || exit 99
 $MAKE && exit 1
 sed 's/BARBAR/BAZBAZ/' foo.vapi > t && mv -f t foo.vapi || exit 99
diff --git a/t/wrap/aclocal.in b/t/wrap/aclocal.in
index 18ee13a..a3defa9 100644
--- a/t/wrap/aclocal.in
+++ b/t/wrap/aclocal.in
@@ -1,4 +1,4 @@
-#!/bin/sh
address@hidden@ -w
 # @configure_input@
 
 # Copyright (C) 2012 Free Software Foundation, Inc.
@@ -16,17 +16,16 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-fi
-
-perllibdir="@abs_top_builddir@/address@hidden@@abs_top_srcdir@/lib"
-export perllibdir
-
-exec "@abs_top_builddir@/aclocal" "address@hidden@/m4" \
-     "address@hidden@/m4/acdir" ${1+"$@"}
+BEGIN
+{
+  use strict;
+  my $libdir;
+  $libdir = '@abs_top_srcdir@/lib';
+  $libdir = '@abs_top_builddir@/lib' . '@PATH_SEPARATOR@' . $libdir
+    if '@srcdir@' ne '.';
+  $ENV{perllibdir} = $libdir;
+  unshift @ARGV,
+    'address@hidden@/m4',
+    'address@hidden@/m4/acdir';
+}
+require '@abs_top_builddir@/aclocal';
diff --git a/t/wrap/automake.in b/t/wrap/automake.in
index 14f437f..8417360 100644
--- a/t/wrap/automake.in
+++ b/t/wrap/automake.in
@@ -1,4 +1,4 @@
-#!/bin/sh
address@hidden@ -w
 # @configure_input@
 
 # Copyright (C) 2012 Free Software Foundation, Inc.
@@ -16,15 +16,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/>.
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-fi
-
-perllibdir="@abs_top_builddir@/address@hidden@@abs_top_srcdir@/lib"
-export perllibdir
-exec "@abs_top_builddir@/automake" "address@hidden@/lib" ${1+"$@"}
+BEGIN
+{
+  use strict;
+  my $libdir;
+  $libdir = '@abs_top_srcdir@/lib';
+  $libdir = '@abs_top_builddir@/lib' . '@PATH_SEPARATOR@' . $libdir
+    if '@srcdir@' ne '.';
+  $ENV{perllibdir} = $libdir;
+  unshift @ARGV, 'address@hidden@/lib';
+}
+require '@abs_top_builddir@/automake';


hooks/post-receive
-- 
GNU Automake



reply via email to

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