aboutsummaryrefslogtreecommitdiff
path: root/build2/context.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-08-01 15:29:24 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-08-01 15:29:24 +0200
commitb7b30102882f0a85c169a0eb4944a8f1c344c9e1 (patch)
treef5c66e392bed3e3fcdc06941519ffc0a66b63c82 /build2/context.cxx
parentb810a034499e1cdc27e03714721b4de085da6d3a (diff)
Add version, project.summary, project.url built-in variables
Extract them from manifest in the version module. Use them when generating the pkg-config's .pc files.
Diffstat (limited to 'build2/context.cxx')
-rw-r--r--build2/context.cxx20
1 files changed, 16 insertions, 4 deletions
diff --git a/build2/context.cxx b/build2/context.cxx
index 2464973..d979f92 100644
--- a/build2/context.cxx
+++ b/build2/context.cxx
@@ -184,6 +184,10 @@ namespace build2
const variable* var_project;
const variable* var_amalgamation;
const variable* var_subprojects;
+ const variable* var_version;
+
+ const variable* var_project_url;
+ const variable* var_project_summary;
const variable* var_import_target;
@@ -522,11 +526,19 @@ namespace build2
// Note that subprojects is not typed since the value requires
// pre-processing (see file.cxx).
//
- var_project = &vp.insert<string> ("project");
- var_amalgamation = &vp.insert<dir_path> ("amalgamation");
- var_subprojects = &vp.insert ("subprojects");
+ {
+ auto pv (variable_visibility::project);
+
+ var_project = &vp.insert<string> ("project", pv);
+ var_amalgamation = &vp.insert<dir_path> ("amalgamation", pv);
+ var_subprojects = &vp.insert ("subprojects", pv);
+ var_version = &vp.insert<string> ("version", pv);
- var_import_target = &vp.insert<name> ("import.target");
+ var_project_url = &vp.insert<string> ("project.url", pv);
+ var_project_summary = &vp.insert<string> ("project.summary", pv);
+
+ var_import_target = &vp.insert<name> ("import.target");
+ }
// Register builtin rules.
//