summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Duret-Lutz <adl@gnu.org>2003-07-04 21:08:19 +0000
committerAlexandre Duret-Lutz <adl@gnu.org>2003-07-04 21:08:19 +0000
commit0bce828bb031865c8cc8960a7efe2dbe3c2769d7 (patch)
tree717bb695d2711d619283b6779f8b097019eb121b
parent2f5af69296d64c3abd4c2d6541252be4aaf363e7 (diff)
downloadautomake-0bce828bb031865c8cc8960a7efe2dbe3c2769d7.tar.gz
* lib/depcomp (icc): Update to grok ICC 7.1's output.
* m4/depend.m4 (_AM_DEPENDENCIES): Check dependency generation in a subdirectory, and with many dependencies. This catches more failures of depcomp. Reports from Ralf Wildenhues and Akim Demaille.
-rw-r--r--ChangeLog8
-rw-r--r--Makefile.in2
-rw-r--r--THANKS1
-rwxr-xr-xlib/depcomp22
-rw-r--r--m4/depend.m429
5 files changed, 47 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 91b5a1959..49df2d184 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2003-07-04 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * lib/depcomp (icc): Update to grok ICC 7.1's output.
+ * m4/depend.m4 (_AM_DEPENDENCIES): Check dependency generation
+ in a subdirectory, and with many dependencies. This
+ catches more failures of depcomp.
+ Reports from Ralf Wildenhues and Akim Demaille.
+
2003-07-01 Alexandre Duret-Lutz <adl@gnu.org>
* automake.in (scan_autoconf_traces): Check the expected
diff --git a/Makefile.in b/Makefile.in
index 46e377261..bc4990f09 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -632,7 +632,7 @@ installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf autom4te.cache
+ -rm -rf $(top_srcdir)/autom4te.cache
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
maintainer-clean-generic maintainer-clean-vti
diff --git a/THANKS b/THANKS
index 337ec3e22..2b4b445d9 100644
--- a/THANKS
+++ b/THANKS
@@ -181,6 +181,7 @@ Rainer Orth ro@techfak.uni-bielefeld.de
Rafael Laboissiere laboissiere@psy.mpg.de
Raja R Harinath harinath@cs.umn.edu
Ralf Corsepius corsepiu@faw.uni-ulm.de
+Ralf Wildenhues Ralf.Wildenhues@gmx.de
Ralph Schleicher rs@purple.UL.BaWue.DE
Ramón García Fernández ramon@jl1.quim.ucm.es
Rich Wales richw@webcom.com
diff --git a/lib/depcomp b/lib/depcomp
index 51606f8c4..aea3d0078 100755
--- a/lib/depcomp
+++ b/lib/depcomp
@@ -207,11 +207,9 @@ aix)
;;
icc)
- # Must come before tru64.
-
- # Intel's C compiler understands `-MD -MF file'. However
+ # Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
- # will fill foo.d with something like
+ # ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
@@ -219,6 +217,12 @@ icc)
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
@@ -228,11 +232,15 @@ icc)
exit $stat
fi
rm -f "$depfile"
- # Each line is of the form `foo.o: dependent.h'.
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
- sed -e "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
- sed -e "s,^[^:]*: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
diff --git a/m4/depend.m4 b/m4/depend.m4
index d0b24dce1..388e5ad47 100644
--- a/m4/depend.m4
+++ b/m4/depend.m4
@@ -61,18 +61,32 @@ AC_CACHE_CHECK([dependency style of $depcc],
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
# 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
- echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ : > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
@@ -90,11 +104,12 @@ AC_CACHE_CHECK([dependency style of $depcc],
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=conftest.c object=conftest.o \
- depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
- grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# (even with -Werror). So we grep stderr for any message