From 9034f7c51ef6437ce9d4547ba5bde217b4740fb2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 19 Apr 2022 11:10:53 +0200 Subject: Use target recipe for auxiliary data storage during match-apply In particular, we now have separate auxiliary data storage for inner and outer operations. --- libbuild2/algorithm.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libbuild2/algorithm.cxx') diff --git a/libbuild2/algorithm.cxx b/libbuild2/algorithm.cxx index 7116b8b..355e633 100644 --- a/libbuild2/algorithm.cxx +++ b/libbuild2/algorithm.cxx @@ -821,9 +821,9 @@ namespace build2 // // Clear the rule-specific variables, resolved targets list, and the - // data pad before calling match(). The rule is free to modify these - // in its match() (provided that it matches) in order to, for - // example, convey some information to apply(). + // auxiliary data storage before calling match(). The rule is free + // to modify these in its match() (provided that it matches) in + // order to, for example, convey some information to apply(). // clear_target (a, t); @@ -1920,7 +1920,8 @@ namespace build2 // group_state()) and should retain its value. // // - s.recipe = nullptr; + if (!s.recipe_keep) + s.recipe = nullptr; // Decrement the target count (see set_recipe() for details). // -- cgit v1.1