"Eli Zaretskii" <[EMAIL PROTECTED]> writes:
| The version of `depcomp' supplied with sh-utils-2.0j does not work
| correctly for DOS/Windows-style file names. The following Sed script
| breaks if .deps/*.Tpo files include absolute file names with drive
| letters:
|
| sed 's/^[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
| This happens because on DOS/Windows, "gcc -MD" produces the following
| in, e.g., sh-utils-2.0j/lib/.deps/addext.Tpo:
|
| e:/src/gnu/sh-utils-2.0j/lib/addext.o: \
| e:/src/gnu/sh-utils-2.0j/lib/addext.c ../config.h \
| e:/src/gnu/sh-utils-2.0j/lib/backupfile.h c:/usr/gcc/include/limits.h \
| c:/usr/gcc/include/sys/types.h c:/usr/gcc/include/sys/djtypes.h \
| c:/usr/gcc/include/string.h c:/usr/gcc/include/sys/movedata.h \
| c:/usr/gcc/include/unistd.h
|
| The first line above is supposed to be removed by the Sed script, but
| that fails because the file name includes a colon.
|
| The patch to depcomp which fixes this is below. It assumes that
| \{m,n\} is supported by all versions of Sed.
|
| 2000-08-11 Eli Zaretskii <[EMAIL PROTECTED]>
|
| * depcomp (gcc): Support DOS-style absolute file names with drive
| letters.
|
| --- depcomp.~0 Mon Oct 4 07:56:46 1999
| +++ depcomp Thu Aug 10 20:49:02 2000
| @@ -65,7 +65,7 @@
| fi
| rm -f "$depfile"
| echo "$object : \\" > "$depfile"
| - sed 's/^[^:]*: / /' < "$tmpdepfile" >> "$depfile"
| + sed 's/^\([A-Za-z]:\/\)\{0,1\}[^:]*: / /' < "$tmpdepfile" >> "$depfile"
| ## This next piece of magic avoids the `deleted header file' problem.
| ## The problem is that when a header file which appears in a .P file
| ## is deleted, the dependency causes make to die (because there is
How about this instead, so it doesn't depend on the C locale:
alpha=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
sed 's/^\(['$alpha']:\/\)\{0,1\}[^:]*: / /' < "$tmpdepfile" >> "$depfile"