aboutsummaryrefslogtreecommitdiff
path: root/build2/b.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-04-13 13:14:35 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-04-13 13:14:35 +0200
commite9a3804c2ea5972dd84a7d4759d4ea965c2490fb (patch)
tree89f6eeaf50486213f8de898d55fefeea080e54f2 /build2/b.cxx
parent1308eb0d740a687161641d52dabad8c0f849db08 (diff)
Various minor generalizations for in-process configure support in bpkg
Diffstat (limited to 'build2/b.cxx')
-rw-r--r--build2/b.cxx12
1 files changed, 9 insertions, 3 deletions
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 ("<buildspec>");
try
{
istringstream is (cmdl.buildspec);
is.exceptions (istringstream::failbit | istringstream::badbit);
parser p (*pctx);
- bspec = p.parse_buildspec (is, path_name ("<buildspec>"));
+ 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 ("<buildspec>");
- 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<path> bf (
find_buildfile (src_base, src_base, altn, buildfile));