aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-05-19 11:14:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-05-19 11:14:21 +0200
commitffaf9794efe344a6af27aaf3d69500bbf857559f (patch)
tree7102f7b5d5c28daf3cb6d24d6211d4aa7d31e3c4
parentbd3fb4a1324228b768bfa1f34ab4ce12539eb45b (diff)
Set <module>.booted variable for booted but not yet loaded modules
-rw-r--r--build2/context.cxx11
-rw-r--r--build2/module.cxx2
2 files changed, 9 insertions, 4 deletions
diff --git a/build2/context.cxx b/build2/context.cxx
index 95230a6..83b3cff 100644
--- a/build2/context.cxx
+++ b/build2/context.cxx
@@ -678,10 +678,13 @@ namespace build2
// module.cxx:load_module().
//
- vp.insert_pattern<bool> (
- "**.loaded", false, variable_visibility::project);
- vp.insert_pattern<bool> (
- "**.configured", false, variable_visibility::project);
+ {
+ auto v_p (variable_visibility::project);
+
+ vp.insert_pattern<bool> ("**.booted", false, v_p);
+ vp.insert_pattern<bool> ("**.loaded", false, v_p);
+ vp.insert_pattern<bool> ("**.configured", false, v_p);
+ }
{
auto v_p (variable_visibility::project);
diff --git a/build2/module.cxx b/build2/module.cxx
index 9994c9b..6ff3636 100644
--- a/build2/module.cxx
+++ b/build2/module.cxx
@@ -48,6 +48,8 @@ namespace build2
i = lm.emplace (name,
module_state {true, false, mf.init, nullptr, loc}).first;
i->second.first = mf.boot (rs, loc, i->second.module);
+
+ rs.assign (var_pool.rw (rs).insert (name + ".booted")) = true;
}
bool