aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/install/rule.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-09-13 17:00:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-09-14 09:48:59 +0200
commitd552de5d028e1dfb108f343810604d0dfd74c2e6 (patch)
tree3ed1a320b0c3788001a1c61ff468f3392630f789 /libbuild2/install/rule.hxx
parentb9ea935ac2e31144db8ebdc2a98ebfc3f94357cc (diff)
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)
Diffstat (limited to 'libbuild2/install/rule.hxx')
-rw-r--r--libbuild2/install/rule.hxx21
1 files changed, 11 insertions, 10 deletions
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<group_prerequisites>::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<group_prerequisites>::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;