Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2002-11-29 19:48:12


Vladimir Prus <ghost_at_[hidden]> writes:

> Vladimir Prus wrote:
>
>> The comment for 'value-string' parameter of 'subfeature' rule
>> is much more clear for me.
>
> Sorry, it's no longer clear to me. I thought that subfeatures
> form a tree. I.e. you can declared one subfeature, and that another
> one under it, etc. But this is not so.
>
> Looking at the definitions in the user manual, I'd like to ask for
> clarifications:
>
> 1. In definition of subfeature -- can parent feature be subfeature itself?
>
> 2. In definition of 'value-string' --- what are "related subfeatures".

I hope I've now clarified that.

> Going back: what presicely mean 'value-string' parameter to
> 'subfeature' and 'extend-subfeature.

I hope I've now clarified that.

> Lastly, consider this:
>
> feature.extend toolset : gcc ;

Add a new value of the "toolset" feature, so that <toolset>gcc is now
a valid property.

> feature.subfeature toolset gcc : version : : optional ;

Add a new optional subfeature of <toolset>gcc. The feature's name is
"version".

> feature.extend-subfeature toolset gcc : version : 3.2 ;

Add 3.2 as a valid value of the "version" subfeature of <toolset>gcc.

> The last line does not change the set of allowed values of
> <toolset-version>, because I get this
>
> bjam toolset=gcc toolset-version=3.2
> /home/ghost/Work/boost/tools/build/examples-v2/../new/property.jam:221: in
> property.validate from module property
> error: Invalid property '<toolset-version>3.2': value '3.2' is not valid for
> feature'toolset-version'.
> /home/ghost/Work/boost/tools/build/examples-v2/../new/build-request.jam:182:
> in convert-command-line-element from module build-request
>
> Is this the right behaviour?

I don't know. I certainly never expected people to be able to set
subfeature values independently. Normally that should be something
like:

bjam toolset=gcc-3.2

In other words, I don't believe that property.validate is meant to
operate on subfeatures.

-- 
David Abrahams
dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution
 

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