diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-12-03 10:59:34 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-12-03 10:59:34 +0200 |
commit | 548bdfb7bdd7c4761b58bed18b0032afc05b3ce4 (patch) | |
tree | 60394a7ffbfc7ff1509c9f9f62be6d66d8bea2ae /libbuild2/algorithm.cxx | |
parent | a34582df17e2ca4a4e1b204152c82d935bca7467 (diff) |
Add match_rule() in addition to match_recipe()
Diffstat (limited to 'libbuild2/algorithm.cxx')
-rw-r--r-- | libbuild2/algorithm.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
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; |