summaryrefslogtreecommitdiff
path: root/lib/depcomp
diff options
context:
space:
mode:
authorAlexandre Duret-Lutz <adl@gnu.org>2003-07-04 21:08:06 +0000
committerAlexandre Duret-Lutz <adl@gnu.org>2003-07-04 21:08:06 +0000
commitc0cc33cebe06ef8ee5a3f07707f24ebbb7553ebc (patch)
treec2786a790810a323fda6d84539f5c82560ff4aa8 /lib/depcomp
parentae954adccefe42db555945571c2dabe6a06b8e15 (diff)
downloadautomake-c0cc33cebe06ef8ee5a3f07707f24ebbb7553ebc.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.
Diffstat (limited to 'lib/depcomp')
-rwxr-xr-xlib/depcomp24
1 files changed, 16 insertions, 8 deletions
diff --git a/lib/depcomp b/lib/depcomp
index ce8752106..78a8b9921 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"
;;
@@ -270,7 +278,7 @@ tru64)
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a space and a tab in the [].
+ # That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"