From ffa0839de796fbefc48bacc4777648ff19b3fee6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 8 Sep 2017 16:16:11 +0200 Subject: Add ability to pass scope to buildfile functions, add $install.resolve() --- build2/version/rule.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build2/version') diff --git a/build2/version/rule.cxx b/build2/version/rule.cxx index a9d62ba..ceeb003 100644 --- a/build2/version/rule.cxx +++ b/build2/version/rule.cxx @@ -281,7 +281,7 @@ namespace build2 // Perform substitutions for the project itself (normally the version.* // variables but we allow anything set on the root scope). // - auto subst_self = [&rs] (const location& l, const string& s) + auto subst_self = [&rs, &t] (const location& l, const string& s) { if (lookup x = rs.vars[s]) { @@ -291,7 +291,7 @@ namespace build2 return convert ( functions.call ( - "string", vector_view (&v, 1), l)); + t.base_scope (), "string", vector_view (&v, 1), l)); } else fail (l) << "undefined project variable '" << s << "'" << endf; -- cgit v1.1