diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-12-12 11:00:46 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-12-12 11:00:46 +0200 |
commit | 98b1145e8c58a128766738eab7d0e97087d2d806 (patch) | |
tree | 44cf35f5454faa3a62c26e1deb239d8b6e2beb5e /libbuild2/dist/operation.cxx | |
parent | 442cf4e38a4661f77b413fc2a90646515d2bee2f (diff) |
Diagnose --match-only use with dist meta-operation
Diffstat (limited to 'libbuild2/dist/operation.cxx')
-rw-r--r-- | libbuild2/dist/operation.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libbuild2/dist/operation.cxx b/libbuild2/dist/operation.cxx index 5b00980..0ed02c6 100644 --- a/libbuild2/dist/operation.cxx +++ b/libbuild2/dist/operation.cxx @@ -60,8 +60,13 @@ namespace build2 const path& arc, const dir_path& dir, const string& ext); static operation_id - dist_operation_pre (context&, const values&, operation_id o) + dist_operation_pre (context& ctx, const values&, operation_id o) { + // Note: cannot be --load-only which requires perform(update). + // + if (ctx.match_only) + fail << "--match-only specified for dist meta-operation"; + if (o != default_id) fail << "explicit operation specified for dist meta-operation"; @@ -283,6 +288,8 @@ namespace build2 action_targets ts {tgt}; { + // Signal to the rules we will not be executing. + // auto mog = make_guard ([&ctx] () {ctx.match_only = nullopt;}); ctx.match_only = match_only_level::all; |