[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PATCH: AIX C compiler v6 depcomp fix
From: |
Alexandre Duret-Lutz |
Subject: |
Re: PATCH: AIX C compiler v6 depcomp fix |
Date: |
Thu, 31 Jul 2003 23:18:17 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
>>> "Ralf" == Ralf Wildenhues <address@hidden> writes:
Ralf> Hi there,
Ralf> AIX Compiler version 6 outputs dependency information in
Ralf> subdir/name.u instead of name.u, and within that uses
Ralf> subdir/name.o as target instead of name.o.
Ralf> The comment in depcomp suggests that earlier versions did
Ralf> not have this behaviour, so here's a patch against automake-1.7.6
Ralf> which should work for both versions (only lightly tested).
Thank you.
Ralf> I'm unsure if removing the supposed tmpdepfile before compiler
Ralf> invocation is necessary to avoid false hits from other depcomp runs.
I think it doesn't matter. Keeping stat=$? right after the
compiler invocation matters, though :)
I'm installing your patch on HEAD and branch-1-7 as follows.
2003-07-31 Ralf Wildenhues <address@hidden> (tiny change)
* lib/depcomp (aix): Support AIX Compiler version 6.
Index: lib/depcomp
===================================================================
RCS file: /cvs/automake/automake/lib/depcomp,v
retrieving revision 1.35.2.7
diff -u -r1.35.2.7 depcomp
--- lib/depcomp 4 Jul 2003 21:08:19 -0000 1.35.2.7
+++ lib/depcomp 31 Jul 2003 21:12:15 -0000
@@ -172,19 +172,25 @@
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
- # in a .u file. This file always lives in the current directory.
- # Also, the AIX compiler puts `$object:' at the start of each line;
- # $object doesn't have directory information.
- stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
- outname="$stripped.o"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
-
stat=$?
+
+ if test -f "$tmpdepfile"; then :
+ else
+ stripped=`echo "$stripped" | sed 's,^.*/,,'`
+ tmpdepfile="$stripped.u"
+ fi
+
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
@@ -192,6 +198,7 @@
fi
if test -f "$tmpdepfile"; then
+ outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
--
Alexandre Duret-Lutz