Boost logo

Boost-Build :

Subject: [Boost-build] eval default property fails
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2010-11-13 02:06:59


Hi,
in my Jamfile I add a new property/feature called 'abi' which should get
an default value (calculated by 'default_abi()'):

local rule eval_architecture ( properties * )
{
        local result = "" ;
...
        return $(result) ;
}

local rule default_abi ( properties * )
{
        local result = sysv ;
        local arch = [ eval_architecture $(properties) ] ;

         if <target-os>windows in $(properties) { result = ms ; }
        else if $(arch) = "arm" { result = aapcs ; }
        return $(result) ;
}

feature.feature abi
    : aapcs
         eabi
         ms
         n32
         n64
         o32
         o64
      sysv
    : propagated
    ;
feature.set-default abi : [ default_abi $(properties) ] ;

The problem is, that 'local arch = [ eval_architecture $(properties) ]'
in 'default_abi()' does not evaluate 'properties'. It seams that
'properties' contains nothing.

How do I have to pass 'properties' to 'default_abi()' invoked in
'feature.set-default abi' so that 'eval_architecture()' can inspect the
builtin-proprties like <archtiecture>, <instructions-set>, <target-os> etc.

thx,
Oliver


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