From 548bdfb7bdd7c4761b58bed18b0032afc05b3ce4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 3 Dec 2020 10:59:34 +0200 Subject: Add match_rule() in addition to match_recipe() --- libbuild2/algorithm.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'libbuild2/algorithm.cxx') diff --git a/libbuild2/algorithm.cxx b/libbuild2/algorithm.cxx index e535af3..d1a796d 100644 --- a/libbuild2/algorithm.cxx +++ b/libbuild2/algorithm.cxx @@ -682,9 +682,7 @@ namespace build2 // in its match() (provided that it matches) in order to, for // example, convey some information to apply(). // - s.vars.clear (); - t.prerequisite_targets[a].clear (); - if (a.inner ()) t.clear_data (); + clear_target (a, t); const rule_match* r (match_rule (a, t, nullptr, try_match)); @@ -723,9 +721,7 @@ namespace build2 // As a sanity measure clear the target data since it can be incomplete // or invalid (mark()/unmark() should give you some ideas). // - s.vars.clear (); - t.prerequisite_targets[a].clear (); - if (a.inner ()) t.clear_data (); + clear_target (a, t); s.state = target_state::failed; l.offset = target::offset_applied; -- cgit v1.1