aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-configure.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-04-12 07:34:39 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-04-15 09:57:58 +0200
commit5267c62f8c1f483c5348d4a2e498088a41c2e945 (patch)
tree9592af2b2a374e9d5924dd7c859e4069ec75c4fb /bpkg/pkg-configure.hxx
parent306ad185e8d8f50923316bdd1b68ef9a3b1e50e6 (diff)
Implement in-process package configuration
Diffstat (limited to 'bpkg/pkg-configure.hxx')
-rw-r--r--bpkg/pkg-configure.hxx26
1 files changed, 25 insertions, 1 deletions
diff --git a/bpkg/pkg-configure.hxx b/bpkg/pkg-configure.hxx
index a7409b9..c4c2758 100644
--- a/bpkg/pkg-configure.hxx
+++ b/bpkg/pkg-configure.hxx
@@ -7,6 +7,9 @@
#include <libbpkg/manifest.hxx> // version
#include <libbpkg/package-name.hxx>
+#include <libbuild2/context.hxx>
+#include <libbuild2/variable.hxx> // variable_overrides
+
#include <bpkg/types.hxx>
#include <bpkg/forward.hxx> // transaction, selected_package
#include <bpkg/utility.hxx>
@@ -100,17 +103,38 @@ namespace bpkg
const function<find_database_function>&,
const function<find_package_state_function>&);
+
// Configure the package, update its state, and commit the transaction.
//
+ // This is a lower-level version meant for sharing the same build context
+ // to configure multiple packages (in the dependency order).
+ //
+ // Note: variable_overrides must include config.config.disfigure, if
+ // required.
+ //
+ // Note: expects all the non-external packages to be configured to be
+ // already unpackged (for subproject discovery).
+ //
void
pkg_configure (const common_options&,
database&,
transaction&,
const shared_ptr<selected_package>&,
configure_prerequisites_result&&,
- bool disfigured,
+ const unique_ptr<build2::context>&,
+ const build2::variable_overrides&,
bool simulate);
+ // Create a build context suitable for configuring packages.
+ //
+ unique_ptr<build2::context>
+ pkg_configure_context (
+ const common_options&,
+ strings&& cmd_vars,
+ const function<build2::context::var_override_function>& = nullptr);
+
+ // This is a higher-level version meant for configuring a single package.
+ //
// Note: loads selected packages.
//
void