|
Boost-Build : |
Subject: Re: [Boost-build] feature treated as a subfeature
From: Jurko GospodnetiÄ (jurko.gospodnetic_at_[hidden])
Date: 2008-09-10 15:04:39
Hi Noel.
>> When building on my Linux system, with the sun-5.9 compilers, I try
>> to use the stdlib=sun-stlport feature (defined in sun.jam). I get
>> this error from the build system.
>>
>> bjam sun-5.9 stdlib=sun-stlport
>>
>> /var/scratch/boost/tools/build/v2/build/feature.jam:466: in validate-
>> value-string from module feature
>> error: "sun" is not a known value of feature <stdlib>
>> error: legal values: "native" "sun-stlport" "stlport"
>
> I've attached a patch which seems to fix this problem and, hopefully,
> doesn't cause any other problems. Can someone look this over and see if
> it looks okay? Basically the patch says if a feature has a subfeature
> (which <stdlib> does) and the value-string (sun-stlport) is not in the
> list of valid features ( $($(feature).values) ), then proceed as before
> (split the string into subfeatures and validate the subfeatures.
I am not so sure this solution is ok. There might be other places
where Boost Build expects feature values to simply not contain dash
('-') characters.
E.g.
* In build-request.jam it parses the built request parameters
specified on the command line and in the looks-like-implicit-value()
rule expects this when checking whether a parameter is an implicit value
or not.
* is-implicit-value() rule in build/feature.jam.
* implied-feature() rule in build/feature.jam.
* expand-subfeatures-aux() rule in build/feature.jam.
In fact, I have not seen any other code that tries to cope with
feature values containing dashes in them. There is code making sure
feature names with dashes in them are handled correctly, but I have not
seen anything similar for feature values.
Searching through the Boost Build code base I see only two features
that actually have dashes in their value names and those are:
* stdlib from tools/sun.jam.
* symlink-location from tools/symlink.jam.
My suggestion would be to simply rename these feature values to
something not using a dash. Or make sure that feature values with dashes
are handled consistently.
Anyone else have any thoughts on this?
Best regards,
Jurko GospodnetiÄ
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