Boost logo

Boost-Build :

From: Mark Evans (evans_mark_at_[hidden])
Date: 2006-02-03 17:15:36


Hi Vladimir,

For grins I took a stab at implementing a set of rules for target filename prefix provisioning that started out as almost carbon copies of the suffix provisioning rules in build/type.jam. Then I factored out the common code in both sets of (prefix/suffix) rules to avoid copy/paste bloat.

I changed build/virtual-target.jam to the following:

rule add-prefix-and-suffix ( specified-name : type ? : property-set )
{
    local suffix = [ type.generated-target-suffix $(type) : $(property-set) ] ;
    suffix = .$(suffix) ;
    
    local prefix = [ type.generated-target-prefix $(type) : $(property-set) ] ;
    
    if [ type.is-derived $(type) LIB ] && [ os.on-unix ]
    {
        prefix = "lib" ;
    }
    if [ MATCH ^($(prefix)) : $(specified-name) ]
    {
        prefix = "" ;
    }
    return $(prefix:E="")$(specified-name)$(suffix:E="") ;
}

I would like to submit what I've done for consideration. I'm not up to speed with cvs or boost submission procedures (yet). Can I just send the updated files for y'all to diff against the current code base and inspect?

Regards,
Mark



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