From c6a5df5a4e1eb13f80ddbcf426531380b8e4fcaf Mon Sep 17 00:00:00 2001 From: jehelset <47066444+jehelset@users.noreply.github.com> Date: Sun, 9 Feb 2020 15:45:45 +0100 Subject: [PATCH] move abstract-file-target.root to virtual-target. (#537) seems to only be called from basic-target.create-subvariant, which seems (looking at the comments and 5.6.4 of docs) to assume that it exists on virtual-target. without this fix a user wanting to produce something derived from virtual-target in the construct-function of something derived from basic-target will get an error. --- src/build/virtual-target.jam | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/build/virtual-target.jam b/src/build/virtual-target.jam index 5df6bbe7e..d7b84321c 100644 --- a/src/build/virtual-target.jam +++ b/src/build/virtual-target.jam @@ -174,6 +174,19 @@ class virtual-target # private: (overridables) + # Sets/gets the 'root' flag. Target is root if it directly corresponds to + # some variant of a main target. + # + rule root ( set ? ) + { + if $(set) + { + self.root = true ; + } + return $(self.root) ; + } + + # Sets up build actions for 'target'. Should call appropriate rules and set # target variables. # @@ -296,18 +309,6 @@ class abstract-file-target : virtual-target return $(self.action) ; } - # Sets/gets the 'root' flag. Target is root if it directly corresponds to - # some variant of a main target. - # - rule root ( set ? ) - { - if $(set) - { - self.root = true ; - } - return $(self.root) ; - } - # Gets or sets the subvariant which created this target. Subvariant is set # when target is brought into existence and is never changed after that. In # particular, if a target is shared by multiple subvariants, only the first