[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Small automake patch
From: |
Ville Laurikari |
Subject: |
Small automake patch |
Date: |
Thu, 28 Dec 2000 13:20:48 +0200 |
User-agent: |
Mutt/1.2.5i |
Hello!
I sometimes need to work with AIX (poor me) and noticed that the
latest version of automake has a portable dependency tracking
mechanism. It does not work with AIX cc though, and I though fixing
it myself would be the fastest way to get it working. The diff is
rather small, so I'm including all of it in the end of this mail.
Here's a ChangeLog entry:
* depcomp (aix): New side-effect dependency tracking mode, for
the C for AIX compiler.
* m4/depend.m4 (AM_DEPENDENCIES): Recreate `conftest.c' and
`conftest.h' for each test, as the compiler may overwrite some of
them when testing with obscure command lines. This happens at
least with the AIX C compiler.
(498) ahma:/usr/local/gnu/src/automake (2) > cvs diff -u
? build
cvs server: Diffing .
Index: depcomp
===================================================================
RCS file: /cvs/automake/automake/depcomp,v
retrieving revision 1.12
diff -d -H -u -r1.12 depcomp
--- depcomp 2000/10/17 08:29:44 1.12
+++ depcomp 2000/12/28 11:07:55
@@ -97,6 +97,15 @@
exit 1
;;
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file.
+ tmpdepfile=`echo "$object" | sed 's/\(.*\)\..*$/\1.u/'`
+ if "$@" -M && test -f "$tmpdepfile"; then
+ mv "$tmpdepfile" "$depfile"
+ fi
+ ;;
+
dashmd)
# The Java front end to gcc doesn't run cpp, so we can't use the -Wp
# trick. Instead we must use -M and then rename the resulting .d
cvs server: Diffing m4
Index: m4/depend.m4
===================================================================
RCS file: /cvs/automake/automake/m4/depend.m4,v
retrieving revision 1.7
diff -d -H -u -r1.7 depend.m4
--- depend.m4 2000/12/22 20:29:23 1.7
+++ depend.m4 2000/12/28 11:07:59
@@ -24,9 +24,6 @@
AC_MSG_CHECKING([dependency style of $depcc])
AC_CACHE_VAL(am_cv_[$1]_dependencies_compiler_type,[
if test -z "$AMDEP"; then
- echo '#include "conftest.h"' > conftest.c
- echo 'int i;' > conftest.h
-
am_cv_[$1]_dependencies_compiler_type=none
for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$am_depcomp"`; do
case "$depmode" in
@@ -41,6 +38,11 @@
;;
none) break ;;
esac
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ echo '#include "conftest.h"' > conftest.c
+ echo 'int i;' > conftest.h
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
cvs server: Diffing tests
(499) ahma:/usr/local/gnu/src/automake (1) >
--
http://www.iki.fi/vl/
- Small automake patch,
Ville Laurikari <=