aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/file.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-10-12 08:31:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-10-13 06:49:26 +0200
commit3ba17db6300d7e0cfc4fa001b5a8eb91bf417ea3 (patch)
tree2c0878097ba9b049ea472c2c8c99a0e4ff77e959 /libbuild2/file.cxx
parentd66e21ffa3ac9520fb15dd3859339b178d6e6540 (diff)
Switch to public/private variables model
Now unqualified variables are project-private and can be typified.
Diffstat (limited to 'libbuild2/file.cxx')
-rw-r--r--libbuild2/file.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/libbuild2/file.cxx b/libbuild2/file.cxx
index a3962d7..cb57f70 100644
--- a/libbuild2/file.cxx
+++ b/libbuild2/file.cxx
@@ -582,7 +582,7 @@ namespace build2
fail << "variable out_root expected as first line in " << f << endf;
}
- // Note: not static due to being a friend of variable_pool.
+ // Note: not static due to being a friend of scope and variable_pool.
//
void
setup_root_extra (scope& root, optional<bool>& altn)
@@ -620,6 +620,8 @@ namespace build2
{}, /* environment */
""} /* environment_checksum */);
+ root.var_pool_ = &root.root_extra->var_pool;
+
// Enter built-in meta-operation and operation names. Loading of
// modules (via the src bootstrap; see below) can result in
// additional meta/operations being added.
@@ -628,9 +630,9 @@ namespace build2
root.insert_meta_operation (perform_id, mo_perform);
root.insert_meta_operation (info_id, mo_info);
- root.insert_operation (default_id, op_default);
- root.insert_operation (update_id, op_update);
- root.insert_operation (clean_id, op_clean);
+ root.insert_operation (default_id, op_default, nullptr);
+ root.insert_operation (update_id, op_update, ctx.var_update);
+ root.insert_operation (clean_id, op_clean, ctx.var_clean);
}
value&