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.12.2-20


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.2-206-g12f0caf
Date: Sat, 04 Aug 2012 22:07:18 +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=12f0caf6d2d2c013c03200a12449d5f97428e0cf

The branch, master has been updated
       via  12f0caf6d2d2c013c03200a12449d5f97428e0cf (commit)
       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  e4fbe2ab6dee137d2f4735ca539613bb67411ebb (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 12f0caf6d2d2c013c03200a12449d5f97428e0cf
Merge: e4fbe2a 70b503a
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 4 23:45:39 2012 +0200

    Merge branch 'maint'
    
    * maint:
      tests: fix a spurious XPASS on OpenIndiana
      tests: avoid spurious failure of 't/vala-vapi.sh' on OpenIndiana
      tests: avoid spurious failure of 't/uninstall-fail.sh' on OpenIndiana
      tests: reimplement wrappers for automake and aclocal in perl
      tests: work around a ksh bug w.r.t. ${1+"$@"}
      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]