aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/target.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-03-20 05:46:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-03-20 05:46:06 +0200
commita00647acd3b1c08c61234af994c2c29735a9b3ce (patch)
tree7d4825e084f0bb0914193d337d31907e07b0aaa1 /libbuild2/target.hxx
parentcbcb0b03501ce346ca3778624dcf908e851e6e2e (diff)
Add ability to query whether target has been matched for action
Diffstat (limited to 'libbuild2/target.hxx')
-rw-r--r--libbuild2/target.hxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/libbuild2/target.hxx b/libbuild2/target.hxx
index 1abda2d..ea72925 100644
--- a/libbuild2/target.hxx
+++ b/libbuild2/target.hxx
@@ -592,7 +592,13 @@ namespace build2
opstate& operator[] (action a) {return state[a];}
const opstate& operator[] (action a) const {return state[a];}
- // This function should only be called during match if we have observed
+ // Return true if the target has been matched for the specified action.
+ // This function can only be called during execution.
+ //
+ bool
+ matched (action) const;
+
+ // This function can only be called during match if we have observed
// (synchronization-wise) that this target has been matched (i.e., the
// rule has been applied) for this action.
//
@@ -610,8 +616,8 @@ namespace build2
bool
unchanged (action) const;
- // This function should only be called during execution if we have
- // observed (synchronization-wise) that this target has been executed.
+ // This function can only be called during execution if we have observed
+ // (synchronization-wise) that this target has been executed.
//
target_state
executed_state (action, bool fail = true) const;