automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make compile wrapper eat win32 paths


From: Peter Rosin
Subject: Make compile wrapper eat win32 paths
Date: Sun, 01 Feb 2009 17:05:20 +0100
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Hi!

When the compile wrapper is given win32 paths (with colons and/or
backslashes) it gets into trouble with both creating the lock
directory and guessing the output file of the losing compiler.

Here's a patch.

Cheers,
Peter
diff --git a/ChangeLog b/ChangeLog
index 2463967..f9800e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-02-01  Peter Rosin  <address@hidden>
+
+       * lib/compile: Handle colons and backslashes in win32 paths.
+
 2009-01-23  Eric Blake  <address@hidden>
 
        Use no-arg macros via AC_REQUIRE for consistency.
diff --git a/lib/compile b/lib/compile
index 35af809..5b1ea71 100755
--- a/lib/compile
+++ b/lib/compile
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand `-c -o'.
 
-scriptversion=2005-05-14.22
+scriptversion=2009-02-01.17
 
 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
 # Written by Tom Tromey <address@hidden>.
@@ -102,13 +102,13 @@ if test -z "$ofile" || test -z "$cfile"; then
 fi
 
 # Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+cofile=`echo "$cfile" | sed -e 's|^.*/\\:||' -e 's/\.c$/.o/'`
 
 # Create the lock directory.
-# Note: use `[/.-]' here to ensure that we don't use the same name
+# Note: use `[/\\:.-]' here to ensure that we don't use the same name
 # that we are using for the .o file.  Also, base the name on the expected
 # object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
 while true; do
   if mkdir "$lockdir" >/dev/null 2>&1; then
     break

reply via email to

[Prev in Thread] Current Thread [Next in Thread]