aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-09-14 11:37:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-09-14 11:37:21 +0200
commit4e6c213ae904f291d954d430d30238057d7ad4ad (patch)
tree269ba52d469de1a37d91522fee72580bced836e2
parent8014cc11f02e51cb647255931d2212a56d556ee3 (diff)
Fix few issues with new config.install.scope
-rw-r--r--libbuild2/install/init.cxx63
1 files changed, 31 insertions, 32 deletions
diff --git a/libbuild2/install/init.cxx b/libbuild2/install/init.cxx
index 5b5d1e2..185fc0f 100644
--- a/libbuild2/install/init.cxx
+++ b/libbuild2/install/init.cxx
@@ -392,37 +392,6 @@ namespace build2
// Configuration.
//
-
- // config.install.scope
- //
- // We do not install prerequisites (for example, shared libraries) of
- // targets (for example, executables) that belong to projects outside of
- // this scope. Valid values are:
- //
- // project -- project scope
- // strong -- strong amalgamation
- // weak -- weak amalgamation
- // global -- all projects (default)
- //
- // Note: can only be specified as a global override.
- //
- {
- auto& v (vp.insert<string> ("config.install.scope"));
-
- // If specified, verify it is a global override.
- //
- if (lookup l = rs[v])
- {
- if (!l.belongs (rs.global_scope ()))
- fail << "config.install.scope must be a global override" <<
- info << "specify !config.install.scope=...";
- }
-
- config::unsave_variable (rs, v);
- }
-
- // Installation directories.
- //
// Note that we don't use any defaults for root -- the location
// must be explicitly specified or the installer will complain
// if and when we try to install.
@@ -432,7 +401,9 @@ namespace build2
using config::lookup_config;
using config::specified_config;
- bool s (specified_config (rs, "install"));
+ // Note: ignore config.install.scope (see below).
+ //
+ bool s (specified_config (rs, "install", {"scope"}));
// Adjust module priority so that the (numerous) config.install.*
// values are saved at the end of config.build.
@@ -440,6 +411,34 @@ namespace build2
if (s)
config::save_module (rs, "install", INT32_MAX);
+ // config.install.scope
+ //
+ // We do not install prerequisites (for example, shared libraries) of
+ // targets (for example, executables) that belong to projects outside
+ // of this scope. Valid values are:
+ //
+ // project -- project scope
+ // strong -- strong amalgamation
+ // weak -- weak amalgamation
+ // global -- all projects (default)
+ //
+ // Note: can only be specified as a global override.
+ //
+ {
+ auto& v (vp.insert<string> ("config.install.scope"));
+
+ // If specified, verify it is a global override.
+ //
+ if (lookup l = rs[v])
+ {
+ if (!l.belongs (rs.global_scope ()))
+ fail << "config.install.scope must be a global override" <<
+ info << "specify !config.install.scope=...";
+ }
+
+ config::unsave_variable (rs, v);
+ }
+
// Support for private install (aka poor man's Flatpack).
//
const dir_path* p;