From d552de5d028e1dfb108f343810604d0dfd74c2e6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 13 Sep 2021 17:00:08 +0200 Subject: Consistently install prerequisites from any scope by default It is also now possible to adjust this behavior with global config.install.scope override. Valid values for this variable are: project -- only from project strong -- from strong amalgamation weak -- from weak amalgamation global -- from all projects (default) --- libbuild2/install/rule.hxx | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'libbuild2/install/rule.hxx') diff --git a/libbuild2/install/rule.hxx b/libbuild2/install/rule.hxx index 73f2486..ce60bb9 100644 --- a/libbuild2/install/rule.hxx +++ b/libbuild2/install/rule.hxx @@ -25,7 +25,9 @@ namespace build2 match (action, target&, const string&) const override; // Return NULL if this prerequisite should be ignored and pointer to its - // target otherwise. The default implementation allows all prerequsites. + // target otherwise. The default implementation ignores prerequsites + // that are outside of the installation scope (see install_scope() for + // details). // // The prerequisite is passed as an iterator allowing the filter to // "see" inside groups. @@ -34,10 +36,11 @@ namespace build2 prerequisite_members_range::iterator; virtual const target* - filter (action, const target&, prerequisite_iterator&) const; + filter (const scope*, + action, const target&, prerequisite_iterator&) const; virtual const target* - filter (action, const target&, const prerequisite&) const; + filter (const scope*, action, const target&, const prerequisite&) const; virtual recipe apply (action, target&) const override; @@ -103,11 +106,8 @@ namespace build2 // Return NULL if this prerequisite should be ignored and pointer to its // target otherwise. The default implementation ignores prerequsites - // that are outside of this target's project. - // - // @@ I wonder why we do weak amalgamation for alias but project for - // file? And then override this for prerequisite libraries/modules - // in cc::install_rule and bash::install_rule... + // that are outside of the installation scope (see install_scope() for + // details). // // The prerequisite is passed as an iterator allowing the filter to // "see" inside groups. @@ -116,10 +116,11 @@ namespace build2 prerequisite_members_range::iterator; virtual const target* - filter (action, const target&, prerequisite_iterator&) const; + filter (const scope*, + action, const target&, prerequisite_iterator&) const; virtual const target* - filter (action, const target&, const prerequisite&) const; + filter (const scope*, action, const target&, const prerequisite&) const; virtual recipe apply (action, target&) const override; -- cgit v1.1