[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] msvc: eliminate spaces in the library search path.
From: |
Peter Rosin |
Subject: |
Re: [PATCH] msvc: eliminate spaces in the library search path. |
Date: |
Tue, 21 Sep 2010 20:41:42 +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-21 20:08 skrev Charles Wilson:
> On 9/21/2010 1:33 PM, Ralf Wildenhues wrote:
>> * Peter Rosin wrote on Tue, Sep 21, 2010 at 09:37:16AM CEST:
>>> + do
>>> + IFS=$lt_save_ifs
>>> + # Let DOS variable expansion print the short 8.3 style file name.
>>> + lt_path=`cd "$lt_path" && cmd //C "for %i in (".") do @echo %~si"`
>>
>> Can you explain what this command does? I mean, no need to change the
>> patch, but I don't understand the %~si syntax and I can only infer the
>> %i and (...) bits, but can't tell whether they are correct, work by
>> accident, or something else. I'm willing to believe you, but it would
>> be nice to know for sure.
>
> See http://thread.gmane.org/gmane.comp.gnu.mingw.user/34276
>
>> Can the command fail?
>
> Sure -- if lt_path doesn't exist. I don't know if that is an issue in
> this particular case. It will also fail on Win9x (where cmd.exe doesn't
> exist, and command.com is supposed to be used). However, we already
> have that "problem" in func_convert_core_msys_to_w32.
>
> One workaround would be to use the %COMSPEC% variable in both cases,
> but...I'd rather go with cmd in both places, and then worry about
> %COMSPEC% after the release, and only if we get complaints.
cmd in my MSYS installation is a script /bin/cmd with content:
#!/bin/sh
# Copyright (C) 2002, Earnie Boyd
# mailto:address@hidden
# This file is part of Minimal SYStem.
# http://www.mingw.org/msys.shtml
# File: cmd
`echo $COMSPEC | sed -e 's#\\\\#/#g'` "$@"
So, COMSPEC is not an issue.
>>> + ;;
>>> + *)
>>> + sys_lib_search_path_spec="$LIB"
>>> + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/'
>>> >/dev/null]; then
>
> What if there is only a single directory in the path spec? Then there
> won't be a ';', and we'll use the else clause -- is that the right thing
> to do?
If there is no path separator, the two branches are equivalent.
>>> + # It is most probably a Windows format PATH.
>>> + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED
>>> -e 's/;/ /g'`
>>> + else
>>> + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED
>>> -e "s/$PATH_SEPARATOR/ /g"`
>>> + fi
Cheers,
Peter