|
Boost-Build : |
From: David Abrahams (dave_at_[hidden])
Date: 2007-03-10 01:10:32
# Returns usage requirements + list of created targets
local rule try-one-generator-really ( project name ? : generator :
target-type : property-set : sources * )
{
local targets =
[ $(generator).run $(project) $(name)
: $(property-set)
: $(sources)
] ;
local usage-requirements ;
local success ;
generators.dout [ indent ] returned $(targets) ;
if $(targets)
{
success = true ;
if [ class.is-a $(targets[1]) : property-set ]
{
usage-requirements = $(targets[1]) ;
targets = $(targets[2-]) ;
}
else
{
usage-requirements = [ property-set.empty ] ;
}
}
Apparently this means it's optional for the first element returned
from running a generator property-set of usage requirements. Why is
that a good idea? Wouldn't it be better to use a single protocol (all
generators return either nothing, or a sequence starting with a
property-set of usage requirements and followed by generated targets)?
Now as I modify gcc-linking-generator, I have to worry that
unix-linking-generator might not give me a property set of usage
requirements.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
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