aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/dist/init.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/dist/init.cxx')
-rw-r--r--libbuild2/dist/init.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/libbuild2/dist/init.cxx b/libbuild2/dist/init.cxx
index 26ff86d..9de84ce 100644
--- a/libbuild2/dist/init.cxx
+++ b/libbuild2/dist/init.cxx
@@ -21,8 +21,6 @@ namespace build2
{
namespace dist
{
- static const rule rule_;
-
void
boot (scope& rs, const location&, module_boot_extra& extra)
{
@@ -196,7 +194,7 @@ namespace build2
const location& l,
bool first,
bool,
- module_init_extra&)
+ module_init_extra& extra)
{
tracer trace ("dist::init");
@@ -208,13 +206,19 @@ namespace build2
l5 ([&]{trace << "for " << rs;});
+ module& mod (extra.module_as<module> ());
+
auto& vp (rs.var_pool (true /* public */)); // All qualified.
// Register our wildcard rule. Do it explicitly for the alias to prevent
// something like insert<target>(dist_id, test_id) taking precedence.
//
- rs.insert_rule<target> (dist_id, 0, "dist", rule_);
- rs.insert_rule<alias> (dist_id, 0, "dist.alias", rule_);
+ {
+ const rule& r (mod);
+
+ rs.insert_rule<target> (dist_id, 0, "dist", r);
+ rs.insert_rule<alias> (dist_id, 0, "dist.alias", r);
+ }
// We need this rule for out-of-any-project dependencies (for example,
// executables imported from /usr/bin, etc). We are registering it on