From fd689eb883655dcb29e505b041cd02fac01f0bac Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 27 Aug 2015 15:11:40 +0200 Subject: Dist module/meta-operation initial implementation --- build/config/utility | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'build/config/utility') 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 -- cgit v1.1