From ce53d44c4480e2c14c02f3ebe88b24ef8688fbe6 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 19 Jun 2006 20:11:10 +0000 Subject: [PATCH] Use default match logic to prevent variant fallback bugs, where the requested build is ignored and an alternate is used. (merge from head) [SVN r34358] --- v2/tools/stlport.jam | 47 ++++++++++++-------------------------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/v2/tools/stlport.jam b/v2/tools/stlport.jam index 19dbedc02..95b1212f2 100644 --- a/v2/tools/stlport.jam +++ b/v2/tools/stlport.jam @@ -89,41 +89,15 @@ class stlport-target-class : basic-target self.libraries = $(libraries) ; self.version = $(version) ; self.version.5 = [ MATCH "^(5[.][0123456789]+).*" : $(version) ] ; - } - - rule match ( property-set debug ? ) - { - # Override the rule which detects if this basic-target is - # suitable for the specified property set. - # Basically, just checks that requested version is equal to - # self.version. We could have added stlport-$(version) to - # requirements, but then stlport-$(version) would show in - # the common properties, causing recursive building of ourselfs. - local matched ; - if [ $(property-set).get ] = $(self.version) + local requirements ; + requirements += $(self.version) ; + if $(self.version.5) { - if $(self.version.5) - { - # And for STLport 5.x multi-threading is required. - if [ $(property-set).get ] = multi - { - matched = stlport-$(self.version) ; - } - } - else - { - matched = stlport-$(self.version) ; - } + # For STLport 5.x multi-threading is required. + requirements += multi ; } - matched ?= no-match ; - - if $(debug) - { - ECHO " stlport.match: " $(matched) ; - } - - return $(matched) ; + self.requirements = [ property-set.create $(requirements) ] ; } rule generate ( property-set ) @@ -133,8 +107,13 @@ class stlport-target-class : basic-target # cause a loop in main target references. Remove that property # manually. - property-set = [ property-set.create [ difference - [ $(property-set).raw ] : /stlport//stlport stlport ] ] ; + property-set = [ property-set.create + [ difference + [ $(property-set).raw ] : + /stlport//stlport + stlport + ] + ] ; return [ basic-target.generate $(property-set) ] ; }