diff options
author | Alexandre Duret-Lutz <adl@gnu.org> | 2003-02-11 18:20:55 +0000 |
---|---|---|
committer | Alexandre Duret-Lutz <adl@gnu.org> | 2003-02-11 18:20:55 +0000 |
commit | faabcad8c3c11882a3de14d626abbeb1b90e8625 (patch) | |
tree | 0924b083d4b56720857820baeeb56f686e31f469 /lib/depcomp | |
parent | 7543ec879ee711b62740fd93e3b5dbe0b3919889 (diff) | |
download | automake-faabcad8c3c11882a3de14d626abbeb1b90e8625.tar.gz |
* m4/depend.m4: Grep depcomp's stderr for icc warnings about
ignored options.
* lib/depcomp (icc): New mode.
* tests/depcomp5.test: New file.
* tests/defs.in: Handle required=icc.
* tests/Makefile.am (TESTS): Add it.
Diffstat (limited to 'lib/depcomp')
-rwxr-xr-x | lib/depcomp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/depcomp b/lib/depcomp index 46d355355..c90ff925f 100755 --- a/lib/depcomp +++ b/lib/depcomp @@ -206,6 +206,35 @@ aix) rm -f "$tmpdepfile" ;; +icc) # Must come before tru64. + + # Intel's C compiler understands `-MD -MF file'. However + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.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" + rm -f "$tmpdepfile" + ;; + tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. |