From b1d778b2303c3dcb3f70e4b29a0a9bcba72c11d6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 29 Nov 2015 14:31:00 +0200 Subject: Allow for target group members to remain unresolved This, for example, can happen when we have a fallback rule for dist(update) or configure(update). --- build/target | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'build/target') diff --git a/build/target b/build/target index f2b093e..d451851 100644 --- a/build/target +++ b/build/target @@ -609,14 +609,18 @@ namespace build g_.count = 1; } - // Iterate over this group's members. Similar to leave_group(), - // you should increment the iterator after calling this function. + // Iterate over this group's members. Return false if the member + // information is not available. Similar to leave_group(), you + // should increment the iterator after calling this function + // (provided it returned true). // - void + bool enter_group () { - switch_members (); - --j_; // Compensate for the increment that will follow. + bool r (switch_members ()); + if (r) + --j_; // Compensate for the increment that will follow. + return r; } value_type operator* () const @@ -646,7 +650,7 @@ namespace build operator!= (const iterator& x, const iterator& y) {return !(x == y);} private: - void + bool switch_members (); private: -- cgit v1.1