From b63824f48a0a38ed9a8c4b7306b1af92ccf2135b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 2 Jun 2021 08:34:38 +0200 Subject: Redo fallback reverse operation machinery in ad hoc recipes --- libbuild2/target.hxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libbuild2/target.hxx') diff --git a/libbuild2/target.hxx b/libbuild2/target.hxx index 56b10c0..45f285c 100644 --- a/libbuild2/target.hxx +++ b/libbuild2/target.hxx @@ -97,6 +97,16 @@ namespace build2 // using rule_match = pair>; + // Additional information about a rule match (see rule.hxx for details). + // + // @@ TODO: will probably want to clear it after apply() if add anything + // dynamically-allocated here (see apply_impl()). + // + struct match_extra + { + bool fallback; // True if matching a fallback rule. + }; + // Target. // @@ -495,6 +505,10 @@ namespace build2 // mutable atomic_count dependents {0}; + // Match state storage between the match() and apply() calls. + // + build2::match_extra match_extra; + // Matched rule (pointer to hint_rule_map element). Note that in case of // a direct recipe assignment we may not have a rule (NULL). // -- cgit v1.1