]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Fix pr307.test failure with gcc 3.x.
authorAlexandre Duret-Lutz <adl@gnu.org>
Thu, 13 Jun 2002 07:40:09 +0000 (07:40 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Thu, 13 Jun 2002 07:40:09 +0000 (07:40 +0000)
* lib/depcomp (dashmstdout): Strip the call to libtool, and
replace `-o $object' by `-o /dev/null' before running "$@"
to generate dependencies.
(cpp): Strip the call to libtool as well as `-o $object'.

ChangeLog
lib/depcomp
stamp-vti
tests/Makefile.in
version.texi

index 72ecae034c810d35326e0607f683e8b35c585b84..8d667ab114ddf0527995db1279791087986f8262 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-06-13  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       Fix pr307.test failure with gcc 3.x.
+       * lib/depcomp (dashmstdout): Strip the call to libtool, and
+       replace `-o $object' by `-o /dev/null' before running "$@"
+       to generate dependencies.
+       (cpp): Strip the call to libtool as well as `-o $object'.
+
 2002-06-12  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        * lib/depcomp (tru64): Expect dependency files in .libs/, maybe as
index 340abb153b23dccad156017bec9c8651f411080f..807b991f4a895431dfc232112e77b0ae7e3d5017 100755 (executable)
@@ -254,11 +254,40 @@ tru64)
 
 dashmstdout)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
+  # always write the proprocessed file to stdout, regardless of -o.
   "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.  We will use -o /dev/null later,
+  # however we can't do the remplacement now because
+  # `-o $object' might simply not be used
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
   test -z "$dashmflag" && dashmflag=-M
-  "$@" $dashmflag | sed 's:^[^:]*\:[   ]*:'"$object"'\: :' > "$tmpdepfile"
+  "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[      ]*:'"$object"'\: :' > "$tmpdepfile"
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
   tr ' ' '
@@ -310,9 +339,36 @@ makedepend)
 
 cpp)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
+  # always write the proprocessed file to stdout.
   "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
   "$@" -E |
     sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
     sed '$ s: \\$::' > "$tmpdepfile"
index 7721be68af092d7336a01a756a0c1b18f508319f..937b3793a3783125667b61cf502018a1180cfddd 100644 (file)
--- a/stamp-vti
+++ b/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 10 June 2002
+@set UPDATED 11 June 2002
 @set UPDATED-MONTH June 2002
 @set EDITION 1.6a
 @set VERSION 1.6a
index e19373095424a083d8b3847f72cc97d87024c8bc..0204a4f7d390205f4025a046e8aa2d0a57aa8413 100644 (file)
@@ -28,7 +28,7 @@ install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
 INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
 NORMAL_INSTALL = :
 PRE_INSTALL = :
 POST_INSTALL = :
@@ -272,6 +272,7 @@ instman2.test \
 interp.test \
 interp2.test \
 java.test \
+java2.test \
 javaprim.test \
 javasubst.test \
 ldadd.test \
index 7721be68af092d7336a01a756a0c1b18f508319f..937b3793a3783125667b61cf502018a1180cfddd 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 10 June 2002
+@set UPDATED 11 June 2002
 @set UPDATED-MONTH June 2002
 @set EDITION 1.6a
 @set VERSION 1.6a