[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix dependency tracking for MSYS/MinGW.
From: |
Peter Rosin |
Subject: |
Re: [PATCH] Fix dependency tracking for MSYS/MinGW. |
Date: |
Thu, 09 Sep 2010 20:58:02 +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 |
Den 2010-09-09 19:00 skrev Ralf Wildenhues:
> * Peter Rosin wrote on Thu, Sep 09, 2010 at 10:59:30AM CEST:
>> + func_stripname 'func_convert_file_' '' "$to_tool_file_cmd"
>
> func_stripname is fast with modern shells, but may fork with others.
> Let's not introduce a number of forks here, just because you would like
> to match against a shorter string of your own choosing. Either cache
> the result of stripping $to_tool_file_cmd (or define it from libtool.m4
> already), so this is done once only or just right away match against the
> whole function name.
Right, that code path is in the "hot path". I neglected that. Good point.
Pushed as below. Thanks!
Cheers,
Peter
>From 18a85621b92fbeac985484679a2160c7bb2433c6 Mon Sep 17 00:00:00 2001
From: Peter Rosin <address@hidden>
Date: Thu, 9 Sep 2010 20:51:27 +0200
Subject: [PATCH] Fix dependency tracking for MSYS/MinGW.
* libltdl/config/ltmain.m4sh (func_to_tool_file): 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 | 18 +++++++++++++-----
2 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8e17222..5d4876b 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): 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..b2d0f88 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -873,14 +873,22 @@ 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, no conversion takes place.
func_to_tool_file ()
{
$opt_debug
- $to_tool_file_cmd "$1"
- func_to_tool_file_result=$func_to_host_file_result
+ case ,$2, in
+ *,"$to_tool_file_cmd",*)
+ 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 +1384,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" func_convert_file_msys_to_w32
srcfile=$func_to_tool_file_result
func_quote_for_eval "$srcfile"
qsrcfile=$func_quote_for_eval_result
--
1.7.1
- Re: [PATCH 6/7] Convert file name to toolchain format when invoking $NM., (continued)
- Re: [PATCH 6/7] Convert file name to toolchain format when invoking $NM., Charles Wilson, 2010/09/09
- Re: [PATCH 6/7] Convert file name to toolchain format when invoking $NM., Peter Rosin, 2010/09/09
- [PATCH] Fix dependency tracking for MSYS/MinGW., Peter Rosin, 2010/09/09
- Re: [PATCH] Fix dependency tracking for MSYS/MinGW., Charles Wilson, 2010/09/09
- Re: [PATCH] Fix dependency tracking for MSYS/MinGW., Charles Wilson, 2010/09/09
- Re: [PATCH] Fix dependency tracking for MSYS/MinGW., Ralf Wildenhues, 2010/09/09
- Re: [PATCH] Fix dependency tracking for MSYS/MinGW.,
Peter Rosin <=
- Re: [PATCH 6/7] Convert file name to toolchain format when invoking $NM., Charles Wilson, 2010/09/09
- Re: [PATCH 6/7] Convert file name to toolchain format when invoking $NM., Peter Rosin, 2010/09/09
- Re: [PATCH 6/7] Convert file name to toolchain format when invoking $NM., Peter Rosin, 2010/09/10
- Re: [PATCH 6/7] Convert file name to toolchain format when invoking $NM., Charles Wilson, 2010/09/10
- Re: [PATCH 6/7] Convert file name to toolchain format when invoking $NM., Peter Rosin, 2010/09/10
- Re: [PATCH 6/7] Convert file name to toolchain format when invoking $NM., Charles Wilson, 2010/09/10
- Re: [PATCH 6/7] Convert file name to toolchain format when invoking $NM., Peter Rosin, 2010/09/10
- Re: [PATCH 6/7] Convert file name to toolchain format when invoking $NM., Ralf Wildenhues, 2010/09/10
- Re: [PATCH 6/7] Convert file name to toolchain format when invoking $NM., Peter Rosin, 2010/09/10
[PATCH 7/7] Prefer $NM @file over calculating the cmd line length., Peter Rosin, 2010/09/05