From ea57c514dc169afb3ece21ff2e4c1d2ab0c47d6a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 4 Aug 2021 06:45:02 +0200 Subject: Take into account file-base'ness in ad hoc buildscript recipes --- libbuild2/rule.hxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'libbuild2/rule.hxx') 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 -- cgit v1.1