diff options
-rw-r--r-- | build2/dist/module.cxx | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/build2/dist/module.cxx b/build2/dist/module.cxx index 893109a..6dd1453 100644 --- a/build2/dist/module.cxx +++ b/build2/dist/module.cxx @@ -32,30 +32,10 @@ namespace build2 // Register meta-operation. // r.meta_operations.insert (dist_id, dist); - } - - extern "C" bool - dist_init (scope& r, - scope&, - const location& l, - unique_ptr<module>&, - bool first, - bool) - { - tracer trace ("dist::init"); - - if (!first) - { - warn (l) << "multiple dist module initializations"; - return true; - } - - const dir_path& out_root (r.out_path ()); - level5 ([&]{trace << "for " << out_root;}); - // Enter module variables. + // Enter module variables. Do it during boot in case they get assigned + // in bootstrap.build (which is customary for, e.g., dist.package). // - if (first) { auto& v (var_pool); @@ -74,6 +54,26 @@ namespace build2 v.find ("dist.archives", strings_type); v.find ("config.dist.archives", strings_type); } + } + + extern "C" bool + dist_init (scope& r, + scope&, + const location& l, + unique_ptr<module>&, + bool first, + bool) + { + tracer trace ("dist::init"); + + if (!first) + { + warn (l) << "multiple dist module initializations"; + return true; + } + + const dir_path& out_root (r.out_path ()); + level5 ([&]{trace << "for " << out_root;}); // Register our wildcard rule. Do it explicitly for the alias // to prevent something like insert<target>(dist_id, test_id) |