[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Caret escaping
Re: Caret escaping
Thu, 05 Jan 2006 12:22:05 +0100
Mozilla Thunderbird 1.0.6 (Windows/20050716)
Markus Mauhart wrote:
%% Alessandro Vesely <address@hidden> writes:
av> Thus, in case the "slow path" is taken, the LINE command should be replaced
av> SHELL FLAG ESCAPED-LINE, where:
av> SHELL may be either a unixy_shell, cmd.exe or the old command.com,
av> FLAG should be -c for unixy_shell or /C otherwise, and
av> ESCAPED-LINE should be escaped using backslashes for unixy_shell,
av> carets for cmd.exe, or
av> no escape at all for the old command.exe.
av> Then there is a batch_mode_shell flag, which is usually set for cmd.exe
av> and causes a NOT-SO-ESCAPED-LINE to be written to a temporary batch file.
av> Should we revise those specs in order to make a smarter use of cmd.exe?
I just checked it out (VC - built make381beta4 with above patches applied)
and it turns out that ^-escaping breaks my makefiles (not using -j):
make381beta4.exe now creates a batch file which 2nd line starts with ...
(^"C:/Program Files/msvs71/Common7/Tools/vsvars32.bat^" > nul) && cl
So AFAICS this part of the jobs-patch is wrong:
> . use '^' to escape special characters such as \ and " in job.c
Thanks for the test. You proved that making a smarter use of cmd.exe is
not strightforward. cmd.exe /C LINE does not require LINE to be a single
argument, i.e. double quotes around LINE are not needed.
The special characters are &<>()@^| thus \ and " should not be escaped.
The following command works as intended from the command line:
start cmd.exe /C "("C:/Program Files/msvs71/Common7/Tools/vsvars32.bat" > nul)"
Thus, the escaping logic used by cmd.exe is not consistent with Unix,
and there is no code in make that would produce the above escaping.
Re: make'ing make-3.18beta4 under mingw/msys - "undefined referenceto `sleep'", KJKHyperion, 2006/01/02
- Re: running with -jN on Windows, (continued)