From 2a0f9e035f673f1ee387924501a31990de37f18d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 24 Apr 2015 12:29:20 +0200 Subject: Implement lib/liba/libso{} target group, shared/static library build --- build/file.cxx | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'build/file.cxx') diff --git a/build/file.cxx b/build/file.cxx index 72b8d37..c130663 100644 --- a/build/file.cxx +++ b/build/file.cxx @@ -11,6 +11,8 @@ #include #include +#include + using namespace std; namespace build @@ -257,20 +259,14 @@ namespace build // Figure out this project's out_root. // - const variable& var (variable_pool.find ("config." + n.value)); - auto val (iroot[var]); + string var ("config." + n.value); + const dir_path& out_root ( + config::required (iroot, var.c_str (), dir_path ()).first); - if (val) - { - if (val.belongs (*global_scope)) - iroot.assign (var) = val; // Copy into root scope. - } - else + if (out_root.empty ()) fail (l) << "unable to find out_root for imported " << n << info << "consider explicitly configuring its out_root via the " - << var.name << " command line variable"; - - const dir_path& out_root (val.as ()); + << var << " command line variable"; // Bootstrap the imported root scope. This is pretty similar to // what we do in main() except that here we don't try to guess -- cgit v1.1