From e9a3804c2ea5972dd84a7d4759d4ea965c2490fb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 13 Apr 2023 13:14:35 +0200 Subject: Various minor generalizations for in-process configure support in bpkg --- build2/b.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'build2') diff --git a/build2/b.cxx b/build2/b.cxx index 3b5f43a..1cfb019 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -451,13 +451,14 @@ main (int argc, char* argv[]) // Parse the buildspec. // buildspec bspec; + path_name bspec_name (""); try { istringstream is (cmdl.buildspec); is.exceptions (istringstream::failbit | istringstream::badbit); parser p (*pctx); - bspec = p.parse_buildspec (is, path_name ("")); + bspec = p.parse_buildspec (is, bspec_name); } catch (const io_error&) { @@ -483,9 +484,13 @@ main (int argc, char* argv[]) bspec.front ().front ().name == "info"))); if (!mo_info) + { + // Note: also adjust in bpkg if adjusting here. + // pctx->reserve (context::reserves { 30000 /* targets */, 1100 /* variables */}); + } const path& buildfile (ops.buildfile_specified () ? ops.buildfile () @@ -565,8 +570,7 @@ main (int argc, char* argv[]) context& ctx (*pctx); - const path p (""); - const location l (p, 0, 0); //@@ TODO + const location l (bspec_name, 0, 0); //@@ TODO (also bpkg::pkg_configure()) meta_operation_id mid (0); // Not yet translated. const meta_operation_info* mif (nullptr); @@ -1195,6 +1199,8 @@ main (int argc, char* argv[]) // defined there (common with non-intrusive project conversions // where everything is built from a single root buildfile). // + // @@ Shouldn't the second be src_root, not src_base? + // optional bf ( find_buildfile (src_base, src_base, altn, buildfile)); -- cgit v1.1