[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
automake 1.7.2b, tests/depcomp3.test and DJGPP
From: |
Richard Dawe |
Subject: |
automake 1.7.2b, tests/depcomp3.test and DJGPP |
Date: |
Tue, 18 Feb 2003 16:33:40 +0000 |
Hello.
I've just tried automake 1.7.2b with DJGPP 2.03. It all looks good. Some of
the tests fail, because they use DESTDIR. The depcomp3 test fails unexpectedly
though.
On further examination of the depcomp3 failure, it appears the problem is that
gcc 3.2.1 (3.x perhaps?) can generate multiple-line dependencies containing
MS-DOS-style paths:
bash-2.04$ gcc -M src/sub.c
sub.o: src/sub.c c:/djgpp/lib/gcc-lib/djgpp/3.21/djgpp.ver \
c:/djgpp/include/sys/version.h src/foo.h
Note: The DOS port of gcc always includes <sys/version.h>, which defines
various DJGPP-related things like __DJGPP__ and __DJGPP_MINOR__.
depcomp munges the dependencies into this:
bash-2.04$ cat src/.deps/sub.TPo
src/sub.o: src/sub.c c:/djgpp/lib/gcc-lib/djgpp/3.21/djgpp.ver \
src/sub.o: /djgpp/include/sys/version.h src/foo.h
and then this:
bash-2.04$ cat src/.deps/sub.Po
src/sub.o: src/sub.c c:/djgpp/lib/gcc-lib/djgpp/3.21/djgpp.ver \
src/sub.o: /djgpp/include/sys/version.h src/foo.h
src/sub.c :
c:/djgpp/lib/gcc-lib/djgpp/3.21/djgpp.ver :
/djgpp/include/sys/version.h :
src/foo.h :
One solution that seems to work is to join the lines together from the output
of the compiler/pre-processor. Below is a diff to do this.
There's probably a more portable/optimal/whatever way of doing this than using
tr+sed, but I couldn't think of one off the top of my head.
Note that I did not run the test suite again, after applying the patch. The
test suite takes 1-1.5 hours and maybe this isn't the right fix. It seems to
do the right thing for DJGPP's gcc, though.
Bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
--- orig/automake-1.7.2b/lib/depcomp 2003-02-11 21:00:26.000000000 +0000
+++ gnu.dev/automake-1.7.2b/lib/depcomp 2003-02-18 16:28:56.000000000 +0000
@@ -315,7 +315,9 @@ dashmstdout)
done
test -z "$dashmflag" && dashmflag=-M
- "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ "$@" $dashmflag | \
+ sed 's: \\$::' | tr "\n" ' ' | \
+ sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
--- orig/automake-1.7.2b/ChangeLog 2003-02-12 16:22:04.000000000 +0000
+++ gnu.dev/automake-1.7.2b/ChangeLog 2003-02-18 16:30:30.000000000 +0000
@@ -1,3 +1,8 @@
+2003-02-18 Richard Dawe <address@hidden>
+
+ * lib/depcomp (dashmstdout): Handle dependencies with DOS
+ filenames split across multiple lines by merging the lines.
+
2003-02-12 Alexandre Duret-Lutz <address@hidden>
* tests/defs.in: Handle required=makedepend.
- automake 1.7.2b, tests/depcomp3.test and DJGPP,
Richard Dawe <=
- Re: automake 1.7.2b, tests/depcomp3.test and DJGPP, Alexandre Duret-Lutz, 2003/02/18
- Re: automake 1.7.2b, tests/depcomp3.test and DJGPP, Richard Dawe, 2003/02/18
- Re: automake 1.7.2b, tests/depcomp3.test and DJGPP, Alexandre Duret-Lutz, 2003/02/18
- Re: automake 1.7.2b, tests/depcomp3.test and DJGPP, Richard Dawe, 2003/02/19
- Re: automake 1.7.2b, tests/depcomp3.test and DJGPP, Alexandre Duret-Lutz, 2003/02/19
- Re: automake 1.7.2b, tests/depcomp3.test and DJGPP, Richard Dawe, 2003/02/19
- Re: automake 1.7.2b, tests/depcomp3.test and DJGPP, Alexandre Duret-Lutz, 2003/02/20
- Re: automake 1.7.2b, tests/depcomp3.test and DJGPP, Richard Dawe, 2003/02/20