aboutsummaryrefslogtreecommitdiff
path: root/build2/cli
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-01-25 15:41:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-13 12:39:24 +0200
commit88f0780e34116c0441a8d8c58b8a8fd9fde4b1f5 (patch)
tree1240b36211772479dc1220712e0daed4e35ecd85 /build2/cli
parent61aa8e2b4bd7849838c04dc1f421c4760d88319f (diff)
Add model mutex, make var_pool const by default
Diffstat (limited to 'build2/cli')
-rw-r--r--build2/cli/init.cxx4
-rw-r--r--build2/cli/rule4
-rw-r--r--build2/cli/rule.cxx16
3 files changed, 12 insertions, 12 deletions
diff --git a/build2/cli/init.cxx b/build2/cli/init.cxx
index b34711d..2650c1b 100644
--- a/build2/cli/init.cxx
+++ b/build2/cli/init.cxx
@@ -43,7 +43,7 @@ namespace build2
//
if (first)
{
- auto& v (var_pool);
+ auto& v (var_pool.rw (rs));
// Note: some overridable, some not.
//
@@ -274,7 +274,7 @@ namespace build2
//
if (!cast_false<bool> (bs["cli.config.loaded"]))
{
- if (!load_module ("cli.config", rs, bs, l, optional, hints))
+ if (!load_module (rs, bs, "cli.config", l, optional, hints))
return false;
}
else if (!cast_false<bool> (bs["cli.config.configured"]))
diff --git a/build2/cli/rule b/build2/cli/rule
index a46163b..fbacacf 100644
--- a/build2/cli/rule
+++ b/build2/cli/rule
@@ -20,10 +20,10 @@ namespace build2
compile () {}
virtual match_result
- match (action, target&, const string& hint) const override;
+ match (slock&, action, target&, const string& hint) const override;
virtual recipe
- apply (action, target&) const override;
+ apply (slock&, action, target&) const override;
static target_state
perform_update (action, target&);
diff --git a/build2/cli/rule.cxx b/build2/cli/rule.cxx
index 706830c..8cef1f5 100644
--- a/build2/cli/rule.cxx
+++ b/build2/cli/rule.cxx
@@ -44,7 +44,7 @@ namespace build2
}
match_result compile::
- match (action a, target& xt, const string&) const
+ match (slock& ml, action a, target& xt, const string&) const
{
tracer trace ("cli::compile::match");
@@ -57,7 +57,7 @@ namespace build2
// See if we have a .cli source file.
//
bool r (false);
- for (prerequisite_member p: group_prerequisite_members (a, t))
+ for (prerequisite_member p: group_prerequisite_members (ml, a, t))
{
if (p.is_a<cli> ())
{
@@ -125,7 +125,7 @@ namespace build2
//
if (g == nullptr || !g->has_prerequisites ())
{
- for (prerequisite_member p: group_prerequisite_members (a, t))
+ for (prerequisite_member p: group_prerequisite_members (ml, a, t))
{
if (p.is_a<cli> ())
{
@@ -151,7 +151,7 @@ namespace build2
// Resolve the group's members. This should link us up to the
// group.
//
- resolve_group_members (a, *g);
+ resolve_group_members (ml, a, *g);
// For ixx{}, verify it is part of the group.
//
@@ -169,7 +169,7 @@ namespace build2
}
recipe compile::
- apply (action a, target& xt) const
+ apply (slock& ml, action a, target& xt) const
{
if (cli_cxx* pt = xt.is_a<cli_cxx> ())
{
@@ -184,11 +184,11 @@ namespace build2
// Inject dependency on the output directory.
//
- inject_fsdir (a, t);
+ inject_fsdir (ml, a, t);
// Search and match prerequisite members.
//
- search_and_match_prerequisite_members (a, t);
+ search_and_match_prerequisite_members (ml, a, t);
switch (a)
{
@@ -200,7 +200,7 @@ namespace build2
else
{
cli_cxx& g (*static_cast<cli_cxx*> (xt.group));
- build2::match (a, g);
+ build2::match (ml, a, g);
return group_recipe; // Execute the group's recipe.
}
}