diff --git a/boostcpp.jam b/boostcpp.jam index 0d43c5d..bb34a7b 100644 --- a/boostcpp.jam +++ b/boostcpp.jam @@ -596,27 +596,32 @@ rule declare-targets ( all-libraries * : headers * ) declare_top_level_targets $(libraries) : $(headers) ; } +# Returns the properties identifying the toolset. We'll use them +# below to configure checks. These are essentially same as in +# configure.builds, except we don't use address-model and +# architecture - as we're trying to detect them here. +# +rule toolset-properties ( properties * ) +{ + local toolset = [ property.select : $(properties) ] ; + local toolset-version-property = "" ; + return [ property.select $(toolset-version-property) : $(properties) ] ; +} + feature.feature deduced-address-model : 32 64 : propagated optional composite hidden ; feature.compose 32 : 32 ; feature.compose 64 : 64 ; rule deduce-address-model ( properties * ) { - local result = [ property.select : $(properties) ] ; - if $(result) + properties = [ toolset-properties $(properties) ] ; + if [ configure.builds /boost/architecture//32 : $(properties) : 32-bit ] { - return $(result) [ property.select : $(properties) ] ; + return 32 ; } - else + else if [ configure.builds /boost/architecture//64 : $(properties) : 64-bit ] { - if [ configure.builds /boost/architecture//32 : $(properties) : 32-bit ] - { - return 32 ; - } - else if [ configure.builds /boost/architecture//64 : $(properties) : 64-bit ] - { - return 64 ; - } + return 64 ; } } @@ -634,37 +639,30 @@ for a in $(deducable-architectures) rule deduce-architecture ( properties * ) { - local result = [ property.select : $(properties) ] ; - if $(result) + properties = [ toolset-properties $(properties) ] ; + if [ configure.builds /boost/architecture//arm : $(properties) : arm ] { - return $(result) [ property.select : $(properties) ] ; + return arm ; } - else + else if [ configure.builds /boost/architecture//mips1 : $(properties) : mips1 ] { - if [ configure.builds /boost/architecture//arm : $(properties) : arm ] - { - return arm ; - } - else if [ configure.builds /boost/architecture//mips1 : $(properties) : mips1 ] - { - return mips1 ; - } - else if [ configure.builds /boost/architecture//power : $(properties) : power ] - { - return power ; - } - else if [ configure.builds /boost/architecture//sparc : $(properties) : sparc ] - { - return sparc ; - } - else if [ configure.builds /boost/architecture//x86 : $(properties) : x86 ] - { - return x86 ; - } - else if [ configure.builds /boost/architecture//combined : $(properties) : combined ] - { - return combined ; - } + return mips1 ; + } + else if [ configure.builds /boost/architecture//power : $(properties) : power ] + { + return power ; + } + else if [ configure.builds /boost/architecture//sparc : $(properties) : sparc ] + { + return sparc ; + } + else if [ configure.builds /boost/architecture//x86 : $(properties) : x86 ] + { + return x86 ; + } + else if [ configure.builds /boost/architecture//combined : $(properties) : combined ] + { + return combined ; } }