aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-12-12 11:02:46 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-12-12 11:02:46 +0200
commit270041729e2d2f67d15e419e314cda4eba9821f6 (patch)
tree2a1d7f5fbc076a100f3e6fa8ff21415ac38681b6
parent4d30d9688bb5bebbf799dad38495940bbdf5aa20 (diff)
Use perform_match() instead of direct match_sync() in configure meta-operation
This is similar to dist and makes sure we handle posthoc targets.
-rw-r--r--libbuild2/config/operation.cxx12
1 files changed, 12 insertions, 0 deletions
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 */);