aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/rule.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/rule.cxx')
-rw-r--r--libbuild2/rule.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/libbuild2/rule.cxx b/libbuild2/rule.cxx
index 0b401c2..097e15a 100644
--- a/libbuild2/rule.cxx
+++ b/libbuild2/rule.cxx
@@ -44,7 +44,7 @@ namespace build2
// Use scratch match_extra since if there is no recipe, then we don't
// want to keep any changes and if there is, then we want it discarded.
//
- match_extra s;
+ match_extra s (true /* locked */); // Not called from adhoc_rule::match().
if (match_adhoc_recipe (action (a.meta_operation (), o), t, s) != nullptr)
return false;
}
@@ -73,7 +73,7 @@ namespace build2
{
if (!t.adhoc_recipes.empty ())
{
- match_extra s;
+ match_extra s (true /* locked */); // Not called from adhoc_rule::match().
if (match_adhoc_recipe (action (a.meta_operation (), o), t, s) != nullptr)
return false;
}
@@ -403,8 +403,9 @@ namespace build2
}
bool adhoc_rule::
- match (action a, target& t, const string& h, match_extra& me) const
+ match (action a, target& xt, const string& h, match_extra& me) const
{
+ const target& t (xt);
return pattern == nullptr || pattern->match (a, t, h, me);
}