|
Boost-Build : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2003-06-30 19:19:21
At 12:27 AM 6/30/2003, David Abrahams wrote:
>Beman Dawes <bdawes_at_[hidden]> writes:
>
>> The "Initiating a Build" section of .../tools/build/build_system.htm
has a
>
>> table with several command line examples. For example:
>>
>> bjam -sBUILD="<cxxflags>/G6"
>>
>> At least on my Win XP system, that doesn't work. It has to be:
>>
>> bjam "-sBUILD=<cxxflags>/G6"
>>
>> I'm not entirely sure, but wouldn't be surprised if every case is wrong
>> where the double-quote is in the middle of an argument.
>
>Very suprising. I never had a problem with that syntax on XP myself.
>
>> If someone with a better understanding of bjam (and how various
operating
>
>> systems parse arguments) will confirm that, I'll update the HTML.
>
>All I have for you is anti-confirmation.
Hum... Test... Test... Test...
OK, here is what happens. If bjam is invoked directly from the command line
on XP, both of these work correctly and identically:
bjam -a -d2 -sBUILD="<cxxflags>-W4" "-sTOOLS=vc7.1" config_info
bjam -a -d2 "-sBUILD=<cxxflags>-W4" "-sTOOLS=vc7.1" config_info
Problem 1: If the -W4 is changed to /W4, the / gets converted to a \, which
vc7.1 interprets as a filename rather than an option.
Problem 2 (the original problem): If bjam is invoked in a batch file like
this:
bjam %1 %2 %3 %4 %5 %6 %7 %8 %9
and the batch file is invoked like this:
my_batch -a -d2 "-sBUILD=<cxxflags>-W4" "-sTOOLS=vc7.1" config_info
then all works as desired. But if invoked like this:
my_batch -a -d2 -sBUILD="<cxxflags>-W4" "-sTOOLS=vc7.1" config_info
then bjam is invoked with this set of arguments:
bjam -a -d2 -sBUILD "<cxxflags>-W4" "-sTOOLS=vc7.1" config_info
and bjam then gives unexpected results.
Possible fixes:
* Try to explain the above in the docs.
* Just give examples in the form "-sBUILD=<cxxflags>-W4".
* Change bjam so it treats two arguments -sBUILD "<cxxflags>-W4" the same
as -sBUILD="<cxxflags>-W4" and "-sBUILD=<cxxflags>-W4"
I don't have a strong feeling as to which is best.
--Beman
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