aboutsummaryrefslogtreecommitdiff
path: root/build/config/utility
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-08-27 15:11:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-08-27 15:11:40 +0200
commitfd689eb883655dcb29e505b041cd02fac01f0bac (patch)
tree0d85ec32d95a1c96eaa7eff28734b900c44dd3ca /build/config/utility
parent7f2d06258d57e39940e8fa959336da0ea66fe37f (diff)
Dist module/meta-operation initial implementation
Diffstat (limited to 'build/config/utility')
-rw-r--r--build/config/utility19
1 files changed, 16 insertions, 3 deletions
diff --git a/build/config/utility b/build/config/utility
index 82f71fe..406c271 100644
--- a/build/config/utility
+++ b/build/config/utility
@@ -49,12 +49,25 @@ namespace build
// Return the value, which can be NULL.
//
const value&
- optional (scope& root, const variable& var);
+ optional (scope& root, const variable&);
inline const value&
- optional (scope& root, const std::string& name)
+ optional (scope& root, const std::string& var)
{
- return optional (root, variable_pool.find (name));
+ return optional (root, variable_pool.find (var));
+ }
+
+ // As above but assumes the value is dir_path and makes it
+ // absolute if the value specified on the command line is
+ // relative.
+ //
+ const value&
+ optional_absolute (scope& root, const variable&);
+
+ inline const value&
+ optional_absolute (scope& root, const std::string& var)
+ {
+ return optional_absolute (root, variable_pool.find (var));
}
// Check whether there are any variables specified from the