summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-08-05 07:23:41 +0000
committerJim Meyering <jim@meyering.net>2003-08-05 07:23:41 +0000
commit01c8ab70824f2f6578bd5636c018489d9e410d2c (patch)
tree8d0989a8e39129b40c449786a85a8c1d314dcf7a
parent29496816bec2b97f03a20a6950e76c26344c8694 (diff)
downloadcoreutils-01c8ab70824f2f6578bd5636c018489d9e410d2c.tar.xz
.
-rw-r--r--config/depcomp19
1 files changed, 13 insertions, 6 deletions
diff --git a/config/depcomp b/config/depcomp
index 78a8b9921..86f7f1539 100644
--- a/config/depcomp
+++ b/config/depcomp
@@ -172,19 +172,25 @@ sgi)
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 @@ aix)
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:'.