From 1027babe711cfeb7242f658aeaf5f02b01beb5cf Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 13 Jun 2002 07:40:06 +0000 Subject: [PATCH] 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'. --- ChangeLog | 8 ++++++ lib/depcomp | 66 +++++++++++++++++++++++++++++++++++++++++++---- stamp-vti | 2 +- tests/Makefile.in | 3 ++- version.texi | 2 +- 5 files changed, 73 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 72ecae03..8d667ab1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-06-13 Alexandre Duret-Lutz + + 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 * lib/depcomp (tru64): Expect dependency files in .libs/, maybe as diff --git a/lib/depcomp b/lib/depcomp index 340abb15..807b991f 100755 --- a/lib/depcomp +++ b/lib/depcomp @@ -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" diff --git a/stamp-vti b/stamp-vti index 7721be68..937b3793 100644 --- 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 diff --git a/tests/Makefile.in b/tests/Makefile.in index e1937309..0204a4f7 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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 \ diff --git a/version.texi b/version.texi index 7721be68..937b3793 100644 --- a/version.texi +++ b/version.texi @@ -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 -- 2.43.5