diff --git a/src/build/virtual-target.jam b/src/build/virtual-target.jam index 95e88e80c..eff94a9c9 100644 --- a/src/build/virtual-target.jam +++ b/src/build/virtual-target.jam @@ -18,31 +18,46 @@ import type ; # +--------------------------+ # | actualize-action() = 0 | # | actualize-location() = 0 | -# +------------+-------------+ -# | -# ^ -# / \ -# +-+-+ -# | -# +-------------+ +---------+------------+ -# | action | | abstract-file-target | -# +=============+ +======================+ -# | action-name | +---+ action | -# +-------------+ | | actualize-action() | -# | actualize() +---+ +---------+------------+ -# | path() | | -# +------+------+ ^ -# | / \ -# ^ +-+-+ -# / \ | -# +-+-+ +-------+-------------------+ -# | | | -# +------+------+ +------+---------------+ +--------+-------------+ -# | link-action | | file-target | | searched-lib-target | -# +=============+ +======================+ +======================+ -# | | | actualize-location() | | actualize-location() | -# +-------------+ +----------------------+ +----------------------+ +# +----------------+---------+ +# | +# ^ +# / \ +# +-+-+ +# | +# +---------------------+ +---------+------------+ +# | action | | abstract-file-target | +# +=====================| 1 +======================+ +# | action-name | +--| action | +# | properties | | +----------------------+ +# +---------------------+--+ | actualize-action() | +# | actualize() |0..1 +-----------+----------+ +# | path() | | +# | adjust-properties() | | +# | actualize-sources() | | +# +------+--------------+ ^ +# | / \ +# ^ +-+-+ +# / \ | +# +-+-+ +-------------|-------------+ +# | | | +# | +------+---------------+ +--------+-------------+ +# | | file-target | | searched-lib-target | +# | +======================+ +======================+ +# | | actualize-location() | | actualize-location() | +# | +----------------------+ +----------------------+ +# | +# +--------------------------------+ +# | | +# +---------------------+ +---------------------+ +# | compile-action | | link-action | +# +=====================+ +=====================+ +# | adjust-properties() | | adjust-properties() | +# +---------------------+ | actualize-sources() | +# +---------------------+ # +# The 'compile-action' and 'link-action' classes are defined not here, +# but in builtin.jam modules. They are shown in the diagram to give +# the big picture. # Potential target. It can be converted into jam target and used in # building, if needed. However, it can be also dropped, which allows diff --git a/src/tools/builtin.jam b/src/tools/builtin.jam index ef932d220..9a2a4fc7d 100644 --- a/src/tools/builtin.jam +++ b/src/tools/builtin.jam @@ -358,6 +358,9 @@ rule compile-action ( targets + : sources * : action-name : properties * ) { action.__init__ $(targets) : $(sources) : $(action-name) : $(properties) ; + # For all virtual targets for the same dependency graph as self, + # i.e. which belong to the same main target, add their directories + # to include path. rule adjust-properties ( properties * ) { local dg = [ $(self.targets[1]).dg ] ; @@ -402,6 +405,11 @@ rule link-action ( targets + : sources * : action-name : properties * ) { action.__init__ $(targets) : $(sources) : $(action-name) : $(properties) ; + # For all sources which are instances searched-lib-targets, add + # appropriate or propertry + # For all library sources, add property with that source. + # If true is in properties, for each library source + # add property with the absolute path to that library. rule adjust-properties ( properties * ) { local hardcore-rpath ; @@ -454,7 +462,9 @@ rule link-action ( targets + : sources * : action-name : properties * ) return $(properties) ; } - + # Filters out all sources which are of LIB type and actualizes the remaining + # sources by calling base method. + # Library sources are handled by "adjust-properties" above. rule actualize-sources ( sources * ) { local real-sources ;