aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/rule.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-08-04 06:45:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-08-04 06:45:02 +0200
commitea57c514dc169afb3ece21ff2e4c1d2ab0c47d6a (patch)
treee71ca9c5adf25aabb7ddb6a5e887415ecbfb36c0 /libbuild2/rule.hxx
parente767684a3462059852f7067a2297b1e18fdb3137 (diff)
Take into account file-base'ness in ad hoc buildscript recipes
Diffstat (limited to 'libbuild2/rule.hxx')
-rw-r--r--libbuild2/rule.hxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/libbuild2/rule.hxx b/libbuild2/rule.hxx
index ad6b51c..3eb7775 100644
--- a/libbuild2/rule.hxx
+++ b/libbuild2/rule.hxx
@@ -173,13 +173,20 @@ namespace build2
// Set the rule text, handle any recipe-specific attributes, and return
// true if the recipe builds anything in the build/recipes/ directory and
- // therefore requires cleanup. Scope is the scope of the recipe.
+ // therefore requires cleanup.
+ //
+ // Scope is the scope of the recipe and target type is the type of the
+ // first target (for ad hoc recipe) or primary group member type (for ad
+ // hoc pattern rule). The idea is that an implementation may make certain
+ // assumptions based on the first target type (e.g., file vs non-file
+ // based) in which case it should also enforce (e.g., in match()) that any
+ // other targets that share this recipe are also of suitable type.
//
// Note also that this function is called after the actions member has
// been populated.
//
virtual bool
- recipe_text (const scope&, string&&, attributes&) = 0;
+ recipe_text (const scope&, const target_type&, string&&, attributes&) = 0;
public:
// Some of the operations come in compensating pairs, such as update and