Boost logo

Boost-Build :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2006-07-25 10:02:18


Roland Schwarz wrote:
> Altough departing from your initial suggestion I would kindly ask you to
> have a look onto and comment the following attempt to solve the problem:

Personally I use a custom bit of code in my Jamroot which brings back
the BBv1 sandboxing of targets...

====
## Some name conventions for all our builds. Most important
## is the use of location-prefix to sandbox all targets.

rule type.common ( names + : sources * : requirements * : default-build
* : usage-requirements * )
{
        local bt = [ BACKTRACE 1 ] ;
        local type-rule = $(bt[4]) ;
        
        if <location-prefix>off in $(requirements)
        {
                requirements = [ set.difference $(requirements) : <location-prefix>off ] ;
        }
        else if ! <location-prefix> in $(requirements:G)
        {
                requirements +=
                        <location-prefix>$(names[1])
                        ;
        }
        return [
                type.$(type-rule)
                $(names) : $(sources) : $(requirements) : $(default-build) :
$(usage-requirements)
                ] ;
}

rule type.wrap ( type-rule )
{
        IMPORT : $(type-rule) : $(__NAME__) : type.$(type-rule) ;
        modules.poke type : .main-target-type.type.$(type-rule) : [
type.type-from-rule-name $(type-rule) ] ;
        IMPORT $(__name__) : type.common : : $(type-rule) ;
}

type.wrap lib ;
type.wrap exe ;
====

Not sure this will help you as it would need to go into the Boost common
code to matter. But perhaps you can just specify the location-prefix
manually.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

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