From c5d8a9cf5137c3272cab4981eeff97c16304de95 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 17 Oct 2023 15:01:53 +0200 Subject: Add notion of match options Now, when matching a rule, the caller may request a subset of the full functionality of performing an operation on a target. This is achieved with match options. --- libbuild2/adhoc-rule-cxx.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'libbuild2/adhoc-rule-cxx.cxx') diff --git a/libbuild2/adhoc-rule-cxx.cxx b/libbuild2/adhoc-rule-cxx.cxx index e3dfe92..637f9af 100644 --- a/libbuild2/adhoc-rule-cxx.cxx +++ b/libbuild2/adhoc-rule-cxx.cxx @@ -691,10 +691,20 @@ namespace build2 ? t.group->is_a () : nullptr)) { - match_sync (a, *g); + // @@ Hm, this looks very similar to how we handle ad hoc group members. + // Shouldn't impl be given a chance to translate options or some + // such? + // + match_sync (a, *g, 0 /* options */); return group_recipe; // Execute the group's recipe. } return impl.load (memory_order_relaxed)->apply (a, t, me); } + + void adhoc_cxx_rule:: + reapply (action a, target& t, match_extra& me) const + { + return impl.load (memory_order_relaxed)->reapply (a, t, me); + } } -- cgit v1.1