Boost logo

Boost-Build :

From: João Abecasis (jpabecasis_at_[hidden])
Date: 2006-04-15 07:16:31

Rene Rivera wrote:
> João Abecasis wrote:
>> Rene Rivera wrote:
>>> João Abecasis wrote:
>>>> Hi everyone!
>>>> Playing around with BB and bjam I came across and odd behaviour with
>>>> the -f option. This option allows one to override the built-in
>>>> Jambase file with a custom one.
>>>> When I run 'bjam -ffile', that is without intervening spaces, as
>>>> documented in --help-usage, bjam will pick file and everything runs
>>>> smoothly.
>>>> If, however, I run it as 'bjam -f file', with a space between, bjam
>>>> will still pick up the file argument appropriately, only this will
>>>> confuse boost-build into believing file is actually a target to
>>>> build, thus putting aside other targets:
>>>> > bjam
>>>> ...found 187 targets...
>>>> > bjam -f Jambase
>>>> ...found 2 targets...
>>>> Is this intended?
>>> Hm, no. It should not consider that name a target. Could you post a
>>> bug to the SF tracker about this, for future TODO and reference.
>>> Assign it to me :-)
>> Would a working patch help? (see attached)
> Of course :-)


>> Is this the right approach and can it be applied to CVS?
> Hm, I thought the problem was in bjam and not So I'm not
> sure about the patch itself.

 From my investigations, after processing its options bjam passes the
command-line untouched in ARGV, so I'm not sure how we'd fix bjam, in
this case.

Are you saying bjam shouldn't accept "-f Jambase" or do you think bjam
should normalize the options it recognizes to the no-space versions,
before passing control to the build system? Or some other option, entirely?

> But there are other options that take an
> extra argument that would have the same problem if they are not being
> handled at the level.

You're right, there other single letter options that take an argument
and may have the same problem. I missed that. The complete set is: '-'
(yep!), 'l', 'd', 'j', 'f', 's', 't' and 'o'.

The attached patch, still in the same direction as the previous, is
updated to handle all options. (If this is still not the right approach,
no harm done ;-)

Incidentally, I noticed that the -l (action timeout) and -g (build from
newest sources first) are not documented in --help-usage. One may still
get the description for '-l' with a syntax error in the command-line,
like 'bjam -h' :-)

Best regards,


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at