aboutsummaryrefslogtreecommitdiff
path: root/build2/target.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-02-05 12:02:32 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-02-05 12:02:32 +0200
commit1bb564a690e2661094e9071d4003638390a5a6fe (patch)
tree48ed8eedb1f87fd05eb66547c12349bb3db92c2b /build2/target.hxx
parent7005f1f5b525705fa3fd458a840d027046a2085b (diff)
Fix test and install rules to handle see-through groups correctly
Diffstat (limited to 'build2/target.hxx')
-rw-r--r--build2/target.hxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/build2/target.hxx b/build2/target.hxx
index 105cc4b..5c8e7bd 100644
--- a/build2/target.hxx
+++ b/build2/target.hxx
@@ -697,8 +697,6 @@ namespace build2
// also be traversed in reverse, but that's what you usually want,
// anyway.
//
- // For constant iteration use const_group_prerequisites().
- //
class group_prerequisites
{
public:
@@ -1015,6 +1013,24 @@ namespace build2
bool
enter_group ();
+ // Return true if the next element is this group's members. Normally
+ // used to iterate over group members only, for example:
+ //
+ // for (...; ++i)
+ // {
+ // if (i->prerequisite.type.see_through)
+ // {
+ // for (i.enter_group (); i.group (); )
+ // {
+ // ++i;
+ // ...
+ // }
+ // }
+ // }
+ //
+ bool
+ group () const;
+
value_type operator* () const
{
const target* t (k_ != nullptr ? k_: