From 954c9ac620a3f37d45ce2aa3bd35564a519b1143 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 23 May 2018 12:44:56 +0200 Subject: Fix bug in inner project bootstrap during configure/disfigure --- build2/file.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'build2/file.cxx') diff --git a/build2/file.cxx b/build2/file.cxx index 89c811d..3cb6980 100644 --- a/build2/file.cxx +++ b/build2/file.cxx @@ -940,6 +940,8 @@ namespace build2 scope& create_bootstrap_inner (scope& root, const dir_path& out_base) { + scope* r (&root); + if (auto l = root.vars[var_subprojects]) { for (const auto& p: cast (l)) @@ -986,11 +988,14 @@ namespace build2 // See if there are more inner roots. // - return create_bootstrap_inner (rs, out_base); + r = &create_bootstrap_inner (rs, out_base); + + if (!out_base.empty ()) + break; // We have found our subproject. } } - return root; + return *r; } void -- cgit v1.1