diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-10-17 15:01:53 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-11-01 10:25:35 +0200 |
commit | c5d8a9cf5137c3272cab4981eeff97c16304de95 (patch) | |
tree | fb28084f9b022cda996c7c16d4b1370d019619a0 /libbuild2/operation.cxx | |
parent | d3b4636ca3f4c3ad98c8096326c5b1460d05691d (diff) |
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.
Diffstat (limited to 'libbuild2/operation.cxx')
-rw-r--r-- | libbuild2/operation.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libbuild2/operation.cxx b/libbuild2/operation.cxx index 4af03fe..7b6dc3c 100644 --- a/libbuild2/operation.cxx +++ b/libbuild2/operation.cxx @@ -330,7 +330,10 @@ namespace build2 const target& t (ts[i].as<target> ()); l5 ([&]{trace << diag_doing (a, t);}); - target_state s (match_async (a, t, 0, task_count, false)); + target_state s (match_async (a, t, + 0, task_count, + match_extra::all_options, + false /* fail */)); // Bail out if the target has failed and we weren't instructed to // keep going. @@ -382,7 +385,9 @@ namespace build2 // for (const target* pt: p.prerequisite_targets) { - target_state s (match_direct_sync (a, *pt, false /* fail */)); + target_state s (match_direct_sync (a, *pt, + match_extra::all_options, + false /* fail */)); if (s == target_state::failed) { @@ -419,7 +424,7 @@ namespace build2 target_state s; if (j < i) { - s = match_complete (a, t, false); + s = match_complete (a, t, match_extra::all_options, false /* fail */); if (posthoc_fail) s = /*t.state[a].state =*/ target_state::failed; |