diff options
Diffstat (limited to 'libbuild2/rule.hxx')
-rw-r--r-- | libbuild2/rule.hxx | 13 |
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. // |