aboutsummaryrefslogtreecommitdiff
path: root/build2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-01-21 17:26:34 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-01-21 17:26:34 +0200
commit5b4206b8f38dbd680da02d1cdcd3f4912a27e627 (patch)
tree8379bf857f75cf35ccb5f5d48fad0bb5475bc0cb /build2
parent9063aa4930e4336712d34d850ca3bca575a8c2ea (diff)
Enter test module variables in boot() rather than init()
The other "boot" modules are config (doesn't enter any variables) and dist (that one is not straightforward).
Diffstat (limited to 'build2')
-rw-r--r--build2/test/module.cxx27
1 files changed, 14 insertions, 13 deletions
diff --git a/build2/test/module.cxx b/build2/test/module.cxx
index 2833429..217376d 100644
--- a/build2/test/module.cxx
+++ b/build2/test/module.cxx
@@ -31,6 +31,20 @@ namespace build2
// Register the test operation.
//
root.operations.insert (test_id, test);
+
+ // Enter module variables. Do it during boot in case they get assigned
+ // in bootstrap.build.
+ //
+ {
+ auto& v (var_pool);
+
+ v.find ("test", bool_type);
+ v.find ("test.input", name_type);
+ v.find ("test.output", name_type);
+ v.find ("test.roundtrip", name_type);
+ v.find ("test.options", strings_type);
+ v.find ("test.arguments", strings_type);
+ }
}
extern "C" bool
@@ -52,19 +66,6 @@ namespace build2
const dir_path& out_root (root.out_path ());
level5 ([&]{trace << "for " << out_root;});
- // Enter module variables.
- //
- {
- auto& v (var_pool);
-
- v.find ("test", bool_type);
- v.find ("test.input", name_type);
- v.find ("test.output", name_type);
- v.find ("test.roundtrip", name_type);
- v.find ("test.options", strings_type);
- v.find ("test.arguments", strings_type);
- }
-
// Register rules.
//
{