From 5b4206b8f38dbd680da02d1cdcd3f4912a27e627 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 21 Jan 2016 17:26:34 +0200 Subject: 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). --- build2/test/module.cxx | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'build2') 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. // { -- cgit v1.1