From 3a9e08dddbb800ffc38c60f93ba100769de31d98 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Tue, 13 Jan 2004 10:24:11 +0000 Subject: [PATCH] Remove the concept of 'active' features, for lack of any use. * build/feature.jam (action, run-actions): Remove. * build/targets.jam (basic-target.refined-properties): Don't call 'run-actions'. [SVN r21667] --- src/build/feature.jam | 72 ------------------------------------------- src/build/targets.jam | 8 ++--- 2 files changed, 2 insertions(+), 78 deletions(-) diff --git a/src/build/feature.jam b/src/build/feature.jam index 88de52418..1e1bad987 100644 --- a/src/build/feature.jam +++ b/src/build/feature.jam @@ -1004,43 +1004,6 @@ rule split ( property-set ) return $(result) ; } -# Appends a rule to the list of rules assigned to the given feature or property. -# That rules will be used in extending property sets by the 'run-actions' rule. -# The rule should accept two arguments: -# - the property which is registered -# - the list of all properties -# and return a set of additional -# properties to be added. Property should be specified in the usual way: -# value, and feature should be specified as . -rule action ( property-or-feature : rule-name ) -{ - .rules.$(property-or-feature) += [ indirect.make-qualified $(rule-name) ] ; -} - -# Returns 'properties' augmented with results of calling rule associated with properties. -# If both a property and its feature have rules, only rules for the property are executed. -rule run-actions ( properties * ) -{ - local added = ; - for local e in $(properties) - { - local rules ; - if $(.rules.$(e)) - { - rules = $(.rules.$(e)) ; - } - else if $(.rules.$(e:G)) - { - rules = $(.rules.$(e:G)) ; - } - for local r in $(rules) - { - added += [ indirect.call $(r) $(e) : $(properties) ] ; - } - } - return $(properties) $(added) ; -} - # tests of module feature local rule __test__ ( ) { @@ -1069,31 +1032,6 @@ local rule __test__ ( ) subfeature toolset gcc : version : 2.95.2 2.95.3 2.95.4 3.0 3.0.1 3.0.2 : optional ; - local rule handle-stlport ( property : properties * ) - { - return /path/to/stlport ; - } - - local rule handle-magic ( property : properties * ) - { - return MAGIC=$(property:G=) ; - } - - local rule handle-magic2 ( property : properties * ) - { - return MAGIC=BIG_MAGIC ; - } - - local rule handle-magic3 ( property : properties * ) - { - return MAGIC=VERY_BIG_MAGIC ; - } - - action stlport : handle-stlport ; - action : handle-magic ; - action 17 : handle-magic2 ; - action 17 : handle-magic3 ; - assert.result : select-subfeatures gcc : @@ -1171,16 +1109,6 @@ local rule __test__ ( ) : defaults ; - - assert.result gcc foo stlport 3 /path/to/stlport MAGIC=3 - : run-actions gcc foo stlport 3 - ; - - assert.result 17 MAGIC=BIG_MAGIC MAGIC=VERY_BIG_MAGIC - : run-actions 17 - ; - - assert.result gcc-3.0.1 debug on : minimize [ expand gcc-3.0.1 debug on native ] ; diff --git a/src/build/targets.jam b/src/build/targets.jam index 5dd199f70..b284be72f 100644 --- a/src/build/targets.jam +++ b/src/build/targets.jam @@ -824,13 +824,9 @@ class basic-target : abstract-target erequirements = [ $(erequirements).expand-composites ] ; local rproperties = [ $(build-request).refine $(erequirements) ] ; + # TODO: issue a warning when requirements change properties, but + # link-compatibility is still not broken. - if $(rproperties[1]) != "@error" - { - # TODO: issue a warning when requirements change properties, but - # link-compatibility is still not broken. - rproperties = [ $(rproperties).run-actions ] ; - } return $(rproperties) ; }