+2003-02-18 Richard Dawe <rich@phekda.freeserve.co.uk>
+
+ * lib/depcomp (dashmstdout): Cope with DOS filenames in
+ dependencies.
+
2003-02-17 Alexandre Duret-Lutz <adl@gnu.org>
* lib/depcomp (makedepend): Don't pass $object to makedepend.
done
test -z "$dashmflag" && dashmflag=-M
- "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '