From 6417a4e6af2b7732ec0da6af24f1a56f7cdada3f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 31 Mar 2016 09:01:50 +0200 Subject: Set part of variable override implementation --- build2/file.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'build2/file.cxx') diff --git a/build2/file.cxx b/build2/file.cxx index 90d584d..1f4e517 100644 --- a/build2/file.cxx +++ b/build2/file.cxx @@ -10,12 +10,12 @@ #include #include -#include #include #include #include #include +#include using namespace std; using namespace butl; @@ -131,11 +131,15 @@ namespace build2 rs.out_path_ = &i->first; } + // First time create_root() is called on this scope. + // + bool first (rs.meta_operations.empty ()); + // Enter built-in meta-operation and operation names. Loading of // modules (via the src bootstrap; see below) can result in // additional meta/operations being added. // - if (rs.meta_operations.empty ()) + if (first) { rs.meta_operations.insert (perform_id, perform); @@ -844,12 +848,14 @@ namespace build2 break; } - // Then try the config.import.* mechanism. + // Then try the config.import.* mechanism (overridable variable). // if (out_root.empty ()) { + // @@ OVR + // const variable& var ( - var_pool.find ("config.import." + project)); + var_pool.insert ("config.import." + project, true)); if (auto l = iroot[var]) { -- cgit v1.1