From 0342dc2fcdd78ef28a4e59d84193a3807068d726 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 11 Apr 2016 07:57:19 +0200 Subject: New configuration logic, iteration 1 --- build2/config/module.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'build2/config/module.cxx') diff --git a/build2/config/module.cxx b/build2/config/module.cxx index 6d2bd70..16eabe9 100644 --- a/build2/config/module.cxx +++ b/build2/config/module.cxx @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -20,12 +21,14 @@ namespace build2 { namespace config { + const string module::name ("config"); + //@@ Same as in operation.cxx // static const path config_file ("build/config.build"); extern "C" void - config_boot (scope& root, const location&, unique_ptr&) + config_boot (scope& root, const location&, unique_ptr&) { tracer trace ("config::boot"); @@ -54,7 +57,7 @@ namespace build2 config_init (scope& root, scope&, const location& l, - unique_ptr&, + unique_ptr& mod, bool first, bool) { @@ -68,6 +71,11 @@ namespace build2 l5 ([&]{trace << "for " << root.out_path ();}); + // Only create the module if we are configuring. + // + if (current_mif->id == configure_id) + mod.reset (new module); + // Register alias and fallback rule for the configure meta-operation. // { -- cgit v1.1