automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH: AIX C compiler v6 depcomp fix


From: Ralf Wildenhues
Subject: PATCH: AIX C compiler v6 depcomp fix
Date: Tue, 29 Jul 2003 10:31:46 +0200
User-agent: Mutt/1.4.1i

Hi there,

AIX Compiler version 6 outputs dependency information in
subdir/name.u instead of name.u, and within that uses
subdir/name.o as target instead of name.o.

The comment in depcomp suggests that earlier versions did
not have this behaviour, so here's a patch against automake-1.7.6
which should work for both versions (only lightly tested).
I'm unsure if removing the supposed tmpdepfile before compiler
invocation is necessary to avoid false hits from other depcomp runs.

Regards,
Ralf

--- depcomp.orig        2003-07-04 23:04:03.000000000 +0200
+++ depcomp     2003-07-29 10:07:56.000000000 +0200
@@ -171,18 +171,24 @@
   ;;
 
 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/'`
+  # The C for AIX Compiler uses -M and outputs the dependencies 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 -e 's/\(.*\)\..*$/\1/'`
   tmpdepfile="$stripped.u"
-  outname="$stripped.o"
+  rm -f "$tmpdepfile"
   if test "$libtool" = yes; then
     "$@" -Wc,-M
   else
     "$@" -M
   fi
+  if test -f "$tmpdepfile"; then :
+  else
+    stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+    tmpdepfile="$stripped.u"
+  fi
+  outname="$stripped.o"
 
   stat=$?
   if test $stat -eq 0; then :




reply via email to

[Prev in Thread] Current Thread [Next in Thread]