Boost logo

Boost-Build :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2003-09-23 22:30:42


[2003-09-23] Misha Bergal wrote:

>Rene Rivera <grafik666_at_[hidden]> writes:
>
>>>actions do_A
>>> {
>>> echo "$(<)">test
>>> set A="$(<)"
>>> echo "%A%">>test
>>> }
>>>
>>>A d ;
>>>
>>>
>>>This is what I get in file test:
>>>
>>>"d"
>>>""d" "
>>>
>>>Problems:
>>>
>>>1. The first line has a space after last quote <"><d><"><space>
>>>2. The second line has a space after 3rd quote <"><">d<"><space><">
>>>
>>>This prevents the build on latest Comeau 4.3.3b8. The @
>>>command files get generated with extra spaces in them.
>>
>> Just tried some tests out on the WinXP command prompt. This is really a
bug
>> in the Windows command prompt. If you try this in a regular command
>> window...
>>
>> echo "test"[space]>test
>> set A="test"[space]
>> echo "%A%">>test
>>
>>...replacing [space] for a real space ;-) You get those spaces in the
file.
>>It just so happens that the action is getting split and passed into the
>>command execution with the extra space :-(
>
>Right, but where am I getting this extra space from? Are you saying
>that in jamfile "A d ;", the rule a gets called with value "d " as an
argument.

Found the extra space... It comes from the actions that append to the
command file. They use:

echo "$(<)" > "$(<)"

The issue is that the actions are used for all platforms in this case. And
as you saw from my experiment it means that the command file in the Windows
command shell will have the extra space at the end of each line.

>the .cmd file gets generated with spaces after quote:
>
>"...debug\mem_fn_test.obj"<spaces>
>
>4.3.3b8 doesn't understand that - it is a regression from 4.3.2
>
>If it is not a bjam problem, I can contact Greg Comeau and request a
>fix, which actually I am going to do anyway.

It's both a Boost.Build problem and a Comeau problem. I'll fix the build
problem, but programs should not be so sensitive to whitespace. And your
regression shows Comeau wasn't that sensitive.

[an hour later...]

PS. The fix is checked in, along with a variety of other changes. Please
test and tell me if it helps.

-- grafik - Don't Assume Anything
-- rrivera (at) acm.org - grafik (at) redshift-software.com
-- 102708583 (at) icq

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk