depcomp: avoid trailing backslash in depfile for depmode=msvc7
authorPeter Rosin <peda@lysator.liu.se>
Thu, 30 May 2013 08:49:42 +0000 (10:49 +0200)
committerPeter Rosin <peda@lysator.liu.se>
Thu, 30 May 2013 08:49:42 +0000 (10:49 +0200)
When compiling a file without any dependencies (no #includes), the
msvc7 depmode (and consequently msvc7msys) generates a depfile
Makefile fragment with the last line ending with a backslash. This
is less robust than needed.

Fixes automake bug#14501.

* lib/depcomp (msvc7): Finish off the depfile Makefile fragment with
an empty line.
(scriptversion): Update.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
lib/depcomp

index 06b0882..4ebd5b3 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2012-10-18.11; # UTC
+scriptversion=2013-05-30.07; # UTC
 
 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
 
@@ -552,6 +552,7 @@ $ {
   G
   p
 }' >> "$depfile"
+  echo >> "$depfile" # make sure the fragment doesn't end with a backslash
   rm -f "$tmpdepfile"
   ;;