Hi,

I was recently working with an IBM system using the IBM XL C/C++
compiler and the dependency tracking did not work (style "none").
Enclosed is a patch for depcomp to use the gcc-like generation of
dependency files of recent IBM compilers.


Best regards,
Michael
--- build-aux/depcomp.orig	2012-03-03 13:17:37.278369000 +0100
+++ build-aux/depcomp	2012-03-03 13:18:20.624761000 +0100
@@ -102,6 +102,12 @@
    depmode=msvc7
 fi
 
+if test "$depmode" = xlc; then
+   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
+   gccflag=-qmakedep=gcc,-MF
+   depmode=gcc
+fi
+
 case "$depmode" in
 gcc3)
 ## gcc 3 implements dependency tracking that does exactly what
@@ -226,6 +232,13 @@
   rm -f "$tmpdepfile"
   ;;
 
+xlc)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 aix)
   # The C for AIX Compiler uses -M and outputs the dependencies
   # in a .u file.  In older versions, this file always lives in the

Reply via email to