From 6f0f62a865a0bc04233388a049a2273e630bb840 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 28 Apr 2018 14:20:28 +0200 Subject: Expose meta-operation in build.meta_operation variable --- build2/context.hxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'build2/context.hxx') diff --git a/build2/context.hxx b/build2/context.hxx index 378c6c0..68faa9b 100644 --- a/build2/context.hxx +++ b/build2/context.hxx @@ -281,6 +281,10 @@ namespace build2 extern const char var_extension[10]; // "extension" + // The build.* namespace. + // + extern const variable* var_build_meta_operation; // .meta_operation + // Current action (meta/operation). // // The names unlike info are available during boot but may not yet be @@ -324,7 +328,12 @@ namespace build2 inline void set_current_mif (const meta_operation_info& mif) { - current_mname = mif.name; + if (current_mname != mif.name) + { + current_mname = mif.name; + global_scope->rw ().assign (var_build_meta_operation) = mif.name; + } + current_mif = &mif; current_on = 0; // Reset. } -- cgit v1.1