From 2f29c7fbe758ffb53e4de9983df8b1cc927dad05 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 17 Jun 2022 10:04:28 +0200 Subject: Add ability to ignore subprojects in create_bootstrap_outer() --- libbuild2/file.cxx | 6 +++--- libbuild2/file.hxx | 5 +++-- libbuild2/scope.hxx | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'libbuild2') diff --git a/libbuild2/file.cxx b/libbuild2/file.cxx index d3de787..03f6ccd 100644 --- a/libbuild2/file.cxx +++ b/libbuild2/file.cxx @@ -1360,7 +1360,7 @@ namespace build2 } void - create_bootstrap_outer (scope& root) + create_bootstrap_outer (scope& root, bool subp) { context& ctx (root.ctx); @@ -1408,7 +1408,7 @@ namespace build2 setup_root (rs, forwarded (root, out_root, v.as (), altn)); bootstrap_pre (rs, altn); - bootstrap_src (rs, altn); + bootstrap_src (rs, altn, nullopt, subp); // bootstrap_post() delayed until after create_bootstrap_outer(). } else @@ -1419,7 +1419,7 @@ namespace build2 rs.assign (ctx.var_forwarded) = true; // Only upgrade (see main()). } - create_bootstrap_outer (rs); + create_bootstrap_outer (rs, subp); if (!bstrapped) bootstrap_post (rs); diff --git a/libbuild2/file.hxx b/libbuild2/file.hxx index 0582a8c..091de7a 100644 --- a/libbuild2/file.hxx +++ b/libbuild2/file.hxx @@ -213,10 +213,11 @@ namespace build2 bootstrap_post (scope& root); // Create and bootstrap outer root scopes, if any. Loading is done by - // load_root(). + // load_root(). If subprojects is false, then do not discover or extract + // subprojects. // LIBBUILD2_SYMEXPORT void - create_bootstrap_outer (scope& root); + create_bootstrap_outer (scope& root, bool subprojects = true); // Create and bootstrap inner root scopes, if any, recursively. // diff --git a/libbuild2/scope.hxx b/libbuild2/scope.hxx index 948fc7d..36bbc81 100644 --- a/libbuild2/scope.hxx +++ b/libbuild2/scope.hxx @@ -602,7 +602,7 @@ namespace build2 // These two from set strong_. // - friend LIBBUILD2_SYMEXPORT void create_bootstrap_outer (scope&); + friend LIBBUILD2_SYMEXPORT void create_bootstrap_outer (scope&, bool); friend LIBBUILD2_SYMEXPORT scope& create_bootstrap_inner (scope&, const dir_path&); -- cgit v1.1