From f0cfe78cb306532518d42e3d2b8e59405d006717 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 12 Feb 2024 05:59:39 +0200 Subject: Allow overriding apply(match_extra) version in cxx_rule_v1 --- libbuild2/adhoc-rule-cxx.hxx | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'libbuild2/adhoc-rule-cxx.hxx') diff --git a/libbuild2/adhoc-rule-cxx.hxx b/libbuild2/adhoc-rule-cxx.hxx index 89bc05f..2ac2281 100644 --- a/libbuild2/adhoc-rule-cxx.hxx +++ b/libbuild2/adhoc-rule-cxx.hxx @@ -36,11 +36,6 @@ namespace build2 // cannot be injected as a real prerequisite since it's from a different // build context). // - // If pattern is not NULL then this recipe belongs to an ad hoc pattern - // rule and apply() may need to call the pattern's apply_*() functions if - // the pattern has any ad hoc group member substitutions or prerequisite - // substitutions/non-patterns, respectively. - // const location recipe_loc; // Buildfile location of the recipe. const target_state recipe_state; // State of recipe library target. const adhoc_rule_pattern* pattern; // Ad hoc pattern rule of recipe. @@ -57,6 +52,21 @@ namespace build2 // virtual bool match (action, target&) const override; + + using simple_rule::match; // Unhide the match_extra version. + + // Either this version or the one with match_extra must be overridden. + // + // If the pattern member above is not NULL then this recipe belongs to an + // ad hoc pattern rule and the implementation may need to call the + // pattern's apply_*() functions if the pattern has any ad hoc group + // member substitutions or prerequisite substitutions/non-patterns, + // respectively. + // + virtual recipe + apply (action, target&) const override; + + using simple_rule::apply; // Unhide the match_extra version. }; // Note: not exported. -- cgit v1.1