diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-23 16:27:20 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-23 16:27:20 +0200 |
commit | b85b7ad1e985c14d0420002229665c9edda53ab5 (patch) | |
tree | c92c1de254b3aff6cf4b2b8c3887b0128f67367c /libbuild2/install | |
parent | 3a4d255681a623b60e5219b1de3a48ac5274cbef (diff) |
Functionsctx
Diffstat (limited to 'libbuild2/install')
-rw-r--r-- | libbuild2/install/functions.cxx | 4 | ||||
-rw-r--r-- | libbuild2/install/init.cxx | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/libbuild2/install/functions.cxx b/libbuild2/install/functions.cxx index f067918..6052dd9 100644 --- a/libbuild2/install/functions.cxx +++ b/libbuild2/install/functions.cxx @@ -14,9 +14,9 @@ namespace build2 namespace install { void - functions () + functions (function_map& m) { - function_family f ("install"); + function_family f (m, "install"); // Resolve potentially relative install.* value to an absolute directory // based on (other) install.* values visible from the calling scope. diff --git a/libbuild2/install/init.cxx b/libbuild2/install/init.cxx index dac337f..d2321b5 100644 --- a/libbuild2/install/init.cxx +++ b/libbuild2/install/init.cxx @@ -127,7 +127,7 @@ namespace build2 } void - functions (); // functions.cxx + functions (function_map&); // functions.cxx bool boot (scope& rs, const location&, unique_ptr<module_base>&) @@ -135,11 +135,13 @@ namespace build2 tracer trace ("install::boot"); l5 ([&]{trace << "for " << rs;}); + context& ctx (rs.ctx); + // Register install function family if this is the first instance of the // install modules. // - if (!function_family::defined ("install")) - functions (); + if (!function_family::defined (ctx.functions, "install")) + functions (ctx.functions); // Register our operations. // |