From 960156f2046e0fa07c94e6b437eb766563c19106 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 2 Feb 2004 09:29:22 +0000 Subject: [PATCH] Simplification. Now that non-searched libraries are directly passes to action (not via property), there's no need to explicitly set dependency on such targets. * tools/builtin.jam (link-action): Remove (linking-generator.action-class): Don't override. (linking-generator.generated-targets): Don't pass searched-libraries as sources. [SVN r22130] --- src/tools/builtin.jam | 53 +------------------------------------------ 1 file changed, 1 insertion(+), 52 deletions(-) diff --git a/src/tools/builtin.jam b/src/tools/builtin.jam index 1140c7b0f..8ea9ac6e8 100644 --- a/src/tools/builtin.jam +++ b/src/tools/builtin.jam @@ -597,40 +597,6 @@ rule register-c-compiler ( id : source-types + : target-types + : # register all generators as "generator.some-rule", not with "some-module.some-rule".) IMPORT $(__name__) : register-c-compiler : : generators.register-c-compiler ; -class link-action : action -{ - import path ; - import sequence ; - - rule __init__ ( targets + : sources * : action-name : properties * ) - { - action.__init__ $(targets) : $(sources) : $(action-name) : $(properties) ; - } - - # Filters out all sources which are of LIB type and actualizes the remaining - # sources by calling base method. - rule actualize-sources ( sources * ) - { - local real-sources ; - for local s in $(sources) - { - if ! [ type.is-derived [ $(s).type ] LIB ] || - ! [ class.is-a $(s) : searched-lib-target ] - - { - real-sources += $(s) ; - } - else - { - self.dependency-only-sources += [ $(s).actualize ] ; - } - } - - action.actualize-sources $(real-sources) ; - } -} - - class linking-generator : generator { import property-set ; @@ -700,28 +666,11 @@ class linking-generator : generator } } - # Sorry, still pass 'sources', which includes library targets. - # We need to set dependency on libraries, which is currently done - # by 'actualize-sources' above, via some secret hook. We need a better - # mechanism, but until it's implemented, need to pass all sources. - local spawn = [ generator.generated-targets $(sources) + local spawn = [ generator.generated-targets $(sources2) : [ property-set.create $(properties2) ] : $(project) $(name) ] ; - # And we'll also get warning about unused sources :-( - #if $(libraries) - #{ - # for local s in $(spawn) - # { - # $(s).depends $(libraries) ; - # } - #} return $(spawn) ; } - - rule action-class ( ) - { - return link-action ; - } } rule register-linker ( id composing ? : source-types + : target-types + :