aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-11-11 15:03:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-11-11 15:03:38 +0200
commit1b80ce6765eb555f6e9dfcfa995415811640d4be (patch)
tree3b81e66301ba7965959abf91290b2fcfe1205e7d /libbuild2
parenta448a249031d207d83535c160eb329d0224ac923 (diff)
Add context::current_action()
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/context.hxx10
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));