diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-04-28 14:20:28 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-04-28 14:20:28 +0200 |
commit | 6f0f62a865a0bc04233388a049a2273e630bb840 (patch) | |
tree | 3855f07359fa10342f127407a75408e332d48419 /build2/context.hxx | |
parent | 2cfa969de8a275e0e65b095ed79a5f588c513bca (diff) |
Expose meta-operation in build.meta_operation variable
Diffstat (limited to 'build2/context.hxx')
-rw-r--r-- | build2/context.hxx | 11 |
1 files changed, 10 insertions, 1 deletions
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. } |