From 270041729e2d2f67d15e419e314cda4eba9821f6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 12 Dec 2024 11:02:46 +0200 Subject: Use perform_match() instead of direct match_sync() in configure meta-operation This is similar to dist and makes sure we handle posthoc targets. --- libbuild2/config/operation.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libbuild2/config') diff --git a/libbuild2/config/operation.cxx b/libbuild2/config/operation.cxx index 6e7ef18..77a1294 100644 --- a/libbuild2/config/operation.cxx +++ b/libbuild2/config/operation.cxx @@ -1018,8 +1018,20 @@ namespace build2 if (oif->operation_pre != nullptr) oif->operation_pre (ctx, {}, true /* inner */, location ()); + // Use perform_match() instead of direct match_sync() to handle + // posthoc targets (similar to dist). + // +#if 0 phase_lock pl (ctx, run_phase::match); match_sync (action (configure_id, id), t); +#else + action a (configure_id, id); + action_targets ts {&t}; + perform_match ({}, a, ts, + 1 /* diag (failures only) */, + false /* progress */); + perform_post_operation_callbacks (ctx, a, ts, false /*failed*/); +#endif if (oif->operation_post != nullptr) oif->operation_post (ctx, {}, true /* inner */); -- cgit v1.1