diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-11-11 15:03:38 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-11-11 15:03:38 +0200 |
commit | 1b80ce6765eb555f6e9dfcfa995415811640d4be (patch) | |
tree | 3b81e66301ba7965959abf91290b2fcfe1205e7d /libbuild2 | |
parent | a448a249031d207d83535c160eb329d0224ac923 (diff) |
Add context::current_action()
Diffstat (limited to 'libbuild2')
-rw-r--r-- | libbuild2/context.hxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libbuild2/context.hxx b/libbuild2/context.hxx index 0790355..e3ffa3a 100644 --- a/libbuild2/context.hxx +++ b/libbuild2/context.hxx @@ -269,11 +269,19 @@ namespace build2 const operation_info* current_inner_oif; const operation_info* current_outer_oif; + action + current_action () const + { + return action (current_mif->id, + current_inner_oif->id, + current_outer_oif != nullptr ? current_outer_oif->id : 0); + } + // Check whether this is the specified meta-operation during bootstrap // (when current_mif may not be yet known). // bool - bootstrap_meta_operation (const char* mo) + bootstrap_meta_operation (const char* mo) const { return ((current_mname == mo ) || (current_mname.empty () && current_oname == mo)); |