aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/rule.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-05-19 14:41:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-05-27 08:35:29 +0200
commitaba1015640643a11bbd98d8483805ca5dd8cbd96 (patch)
tree3837dc6bbc119e216cad917af46fe19a0832eebf /libbuild2/rule.hxx
parent19f8e6bd7b301da3ce6e7483f4d06dc2eca3e402 (diff)
Add recipe library target state to cxx_rule
Diffstat (limited to 'libbuild2/rule.hxx')
-rw-r--r--libbuild2/rule.hxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/libbuild2/rule.hxx b/libbuild2/rule.hxx
index a3d54e7..50ed126 100644
--- a/libbuild2/rule.hxx
+++ b/libbuild2/rule.hxx
@@ -199,10 +199,17 @@ namespace build2
class LIBBUILD2_SYMEXPORT cxx_rule: public rule
{
public:
- const location loc; // Buildfile location of the recipe.
- explicit
- cxx_rule (const location& l): loc (l) {}
+ // A robust recipe may want to incorporate the recipe_state into its
+ // up-to-date decision as if the recipe library was a prerequisite (it
+ // cannot be injected as a real prerequisite since it's from a different
+ // build context).
+ //
+ const location recipe_loc; // Buildfile location of the recipe.
+ const target_state recipe_state; // State of recipe library target.
+
+ cxx_rule (const location& l, target_state s)
+ : recipe_loc (l), recipe_state (s) {}
// Return true by default.
//