]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* lib/depcomp (dashmstdout): Cope with DOS filenames in
authorAlexandre Duret-Lutz <adl@gnu.org>
Tue, 18 Feb 2003 23:28:42 +0000 (23:28 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Tue, 18 Feb 2003 23:28:42 +0000 (23:28 +0000)
dependencies.

ChangeLog
lib/depcomp

index e945e2c0a789b0e4466b8e4cb696b4f43217e747..6d12a7cb136862ab9bdac0a8bd1f25a6e4ee7d25 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
index 3f5d1d5009d5b64be534879781774a8b0ee142e0..51606f8c4632e402516abd7afb1071a2c3b18a99 100755 (executable)
@@ -315,7 +315,11 @@ dashmstdout)
   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 ' ' '