From 6c8695e4028ae3793ddccfbccfa6522f4088528b Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 11 Apr 2005 11:59:10 +0000 Subject: [PATCH] Tweak the generator pruning code that that generators with empty source type list are considered to accept anything and never pruned. [SVN r28103] --- v2/build/generators.jam | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/v2/build/generators.jam b/v2/build/generators.jam index 066af17e4..a3f04c7fe 100644 --- a/v2/build/generators.jam +++ b/v2/build/generators.jam @@ -117,7 +117,7 @@ class generator # recusrive generators.construct-types call. : source-types * # types that this generator can handle. If - # empty, the generator can consume anything. + # empty, the generator can consume anything. : target-types-and-names + # types the generator will create and, optionally, names for @@ -724,6 +724,14 @@ local rule viable-source-types-real ( target-type ) for local g in $(generators) { + if ! [ $(g).source-types ] + { + # Empty source types -- everything can be accepted + result = * ; + generator = ; + t = ; + } + for local source-type in [ $(g).source-types ] { if ! $(source-type) in $(result) @@ -792,7 +800,11 @@ rule viable-source-types-for-generator-real ( generator ) result += [ type.all-derived $(s) ] [ generators.viable-source-types $(s) ] ; } - result = [ sequence.unique $(result) ] ; + result = [ sequence.unique $(result) ] ; + if * in $(result) + { + result = * ; + } return $(result) ; } }