libtool-patches
[Top][All Lists]
Advanced

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

[PATCH] Fix dependency tracking for MSYS/MinGW.


From: Peter Rosin
Subject: [PATCH] Fix dependency tracking for MSYS/MinGW.
Date: Thu, 09 Sep 2010 10:59:30 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2

Hi!

As discussed in that other thread, namely
http://lists.gnu.org/archive/html/libtool-patches/2010-09/msg00105.html
I accidentally broke MSYS/MinGW. Here's an improved version of the patch
shown in that message to fix the build issue. Sorry again.

Ok to push?

Cheers,
Peter

>From 747d3b2a27abe2190225bb79e9cd547cf07be257 Mon Sep 17 00:00:00 2001
From: Peter Rosin <address@hidden>
Date: Thu, 9 Sep 2010 10:31:08 +0200
Subject: [PATCH] Fix dependency tracking for MSYS/MinGW.

* libltdl/config/ltmain.m4sh (func_to_tool_file_cmd): Add lazy
argument which allows the user to specify conversions that are
not desired.
(func_mode_compile): Don't convert source files on MSYS, as
MSYS does it for us. This fixes a regression introduced by
"Use func_to_tool_file instead of fix_srcfile_path".
Reported by Charles Wilson.

Signed-off-by: Peter Rosin <address@hidden>
---
 ChangeLog                  |   11 +++++++++++
 libltdl/config/ltmain.m4sh |   20 +++++++++++++++-----
 2 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8e17222..7e9c0db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-09-09  Peter Rosin  <address@hidden>
+
+       Fix dependency tracking for MSYS/MinGW.
+       * libltdl/config/ltmain.m4sh (func_to_tool_file_cmd): Add lazy
+       argument which allows the user to specify conversions that are
+       not desired.
+       (func_mode_compile): Don't convert source files on MSYS, as
+       MSYS does it for us. This fixes a regression introduced by
+       "Use func_to_tool_file instead of fix_srcfile_path".
+       Reported by Charles Wilson.
+
 2010-09-08  Peter Rosin  <address@hidden>
 
        Mention adjustment of naming of MSVC import libraries in NEWS.
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 1a7bd96..0387ce1 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -873,14 +873,24 @@ func_to_host_file ()
 # end func_to_host_file
 
 
-# func_to_tool_file ARG
+# func_to_tool_file ARG LAZY
 # converts the file name ARG from $build format to toolchain format. Return
-# result in func_to_tool_file_result.
+# result in func_to_tool_file_result.  If the conversion in use is listed
+# in (the comma separated) LAZY (with the func_convert_file_ prefix
+# dropped), no conversion will take place.
 func_to_tool_file ()
 {
   $opt_debug
-  $to_tool_file_cmd "$1"
-  func_to_tool_file_result=$func_to_host_file_result
+  func_stripname 'func_convert_file_' '' "$to_tool_file_cmd"
+  case ,$2, in
+    *,"$func_stripname_result",*)
+      func_to_tool_file_result=$1
+      ;;
+    *)
+      $to_tool_file_cmd "$1"
+      func_to_tool_file_result=$func_to_host_file_result
+      ;;
+  esac
 }
 # end func_to_tool_file
 
@@ -1376,7 +1386,7 @@ compiler."
     func_append removelist " $lockfile"
     trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
 
-    func_to_tool_file "$srcfile"
+    func_to_tool_file "$srcfile" msys_to_w32
     srcfile=$func_to_tool_file_result
     func_quote_for_eval "$srcfile"
     qsrcfile=$func_quote_for_eval_result
-- 
1.7.1




reply via email to

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