Boost logo

Boost-Build :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2003-06-30 19:54:17


[2003-06-30] Beman Dawes wrote:

>At 12:27 AM 6/30/2003, David Abrahams wrote:

> >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.

This one is a known problem, as in we never addressed this Jam limitation.
You can see a workaround I used because of this in the archive action of the
borland-tools.jam toolset.

>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.

Wow! So the batch interpreter has different behaviour than the shell
interpreter, even though they are the same program, wonderfull :-\

>Possible fixes:
>
>* Try to explain the above in the docs.

Yes. I'd say adding it to:
http://www.boost.org/tools/build/jam_src/index.html#jam_fundamentals would
be appropriate.

>* Just give examples in the form "-sBUILD=<cxxflags>-W4".

Also yes. But only for consistency, as currently the docs mix both styles.

>* Change bjam so it treats two arguments -sBUILD "<cxxflags>-W4" the same
>as -sBUILD="<cxxflags>-W4" and "-sBUILD=<cxxflags>-W4"

Not worth the pain. Because BBv2 option handling already does something like
that, although not universally. Hopefully we can standardize on the option
handling of BBv2 and not have the problem.

-- 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