From 41c1f41245db26acb1bb8c624bae47140bcc56aa Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 10 Oct 2024 12:39:42 +0200 Subject: Don't match group-based targets with fallback rule during configure (GH #364) Membership of such targets can only be accurately determined by the ad hoc recipe. --- libbuild2/rule.hxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'libbuild2/rule.hxx') diff --git a/libbuild2/rule.hxx b/libbuild2/rule.hxx index eceb6ad..71782c0 100644 --- a/libbuild2/rule.hxx +++ b/libbuild2/rule.hxx @@ -209,8 +209,17 @@ namespace build2 virtual recipe apply (action, target&) const override; - noop_rule () {} - static const noop_rule instance; + // If exclude_group is true then exclude the group-based targets (since + // their membership can only be accurately determined by the ad hoc + // recipe). + // + explicit + noop_rule (bool exclude_group = false): exclude_group_ (exclude_group) {} + + static const noop_rule instance; // Note: does not exclude group. + + private: + bool exclude_group_; }; // Ad hoc rule. -- cgit v1.1