From c4fcbad1cb603756dc4dac65392feb86be1a722d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 29 Jan 2020 09:19:06 +0200 Subject: Rename module_base to module, redo module boot/init argument passing --- libbuild2/dist/init.cxx | 9 +++------ libbuild2/dist/init.hxx | 12 ------------ libbuild2/dist/module.hxx | 2 +- 3 files changed, 4 insertions(+), 19 deletions(-) (limited to 'libbuild2/dist') diff --git a/libbuild2/dist/init.cxx b/libbuild2/dist/init.cxx index 93bcfdb..30cd56b 100644 --- a/libbuild2/dist/init.cxx +++ b/libbuild2/dist/init.cxx @@ -24,7 +24,7 @@ namespace build2 static const rule rule_; bool - boot (scope& rs, const location&, unique_ptr& mod) + boot (scope& rs, const location&, module_boot_extra& extra) { tracer trace ("dist::boot"); @@ -77,7 +77,7 @@ namespace build2 // Create the module. // - mod.reset (new module (v_d_p)); + extra.set_module (new module (v_d_p)); return false; } @@ -86,10 +86,9 @@ namespace build2 init (scope& rs, scope&, const location& l, - unique_ptr&, bool first, bool, - const variable_map& config_hints) + module_init_extra&) { tracer trace ("dist::init"); @@ -101,8 +100,6 @@ namespace build2 l5 ([&]{trace << "for " << rs;}); - assert (config_hints.empty ()); // We don't known any hints. - // Register our wildcard rule. Do it explicitly for the alias to prevent // something like insert(dist_id, test_id) taking precedence. // diff --git a/libbuild2/dist/init.hxx b/libbuild2/dist/init.hxx index ffaa91d..6069252 100644 --- a/libbuild2/dist/init.hxx +++ b/libbuild2/dist/init.hxx @@ -16,18 +16,6 @@ namespace build2 { namespace dist { - bool - boot (scope&, const location&, unique_ptr&); - - bool - init (scope&, - scope&, - const location&, - unique_ptr&, - bool, - bool, - const variable_map&); - // Module `dist` requires bootstrapping. // // `dist` -- registers the dist meta-operation, registers/sets variables, diff --git a/libbuild2/dist/module.hxx b/libbuild2/dist/module.hxx index abc1400..983aebc 100644 --- a/libbuild2/dist/module.hxx +++ b/libbuild2/dist/module.hxx @@ -17,7 +17,7 @@ namespace build2 { namespace dist { - struct LIBBUILD2_SYMEXPORT module: module_base + struct LIBBUILD2_SYMEXPORT module: build2::module { static const string name; -- cgit v1.1