|
From: | Roumen Petrov |
Subject: | Re: [PATCH] [cygwin|mingw]: Add cross-compile support to cwrapper (take 6) |
Date: | Fri, 27 Aug 2010 01:27:16 +0300 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100721 SeaMonkey/2.0.6 |
Ralf Wildenhues wrote:
Hi Charles,
[SNIP]
+ func_wine_to_win32_path_result="$1" + if test -n "$1"; then + # Unfortunately, winepath does not exit with a non-zero + # error code, so we are forced to check the contents of + # stdout. On the other hand, if the command is not + # found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both + # error code of zero AND non-empty stdout, which explains + # the odd construction:
Starting from wine 1.3.1 wine path always output paths:Lets wine is correctly configured (Z: drive is linked to the file system root):
$ cd $WINEPREFIX/dosdevices $ winepath -w `pwd` Z:\%WINEPREFIX_CONVERTED_TO_BACKSLASHES%\dosdevices Now lets remove link: $ rm z: $ winepath -w `pwd` \\?\unix\%WINEPREFIX_CONVERTED_TO_BACKSLASHES%\dosdevices So sed should remove leading //?/unix
Peter, are you reading this? Looks like a TODO item for automake/lib/compile. ;-)+ func_wine_to_win32_path_tmp=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0&& test -n "${func_wine_to_win32_path_tmp}"; thenI'll just note that some shells ((d?)ash 0.2) fail to propagate the exit status of an assignment. No need to change the code, but users should have a decent shell for this.+ func_wine_to_win32_path_result=`$ECHO "$func_wine_to_win32_path_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_wine_to_win32_path_result=The way this is coded, correctness relies on the fact that all code paths that invoke this function do eventually check for non-emptiness of the result.+ fi + fi +} +# end: func_wine_to_win32_path
[SNIP]
[Prev in Thread] | Current Thread | [Next in Thread] |