aboutsummaryrefslogtreecommitdiff
path: root/build2/operation.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-01-20 13:46:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-02-03 14:35:45 +0200
commit934f2a9a90c5cad3cdc8a66b50c17827a3ddbcee (patch)
treef35f106e5369e98350327c79080c571195234c0b /build2/operation.cxx
parent280f4a5bf787587227ca193cd59c6bd74091db70 (diff)
Get rid of action rule override semantics
Instead we now have two more or less separate match states for outer and inner parts of an action.
Diffstat (limited to 'build2/operation.cxx')
-rw-r--r--build2/operation.cxx19
1 files changed, 4 insertions, 15 deletions
diff --git a/build2/operation.cxx b/build2/operation.cxx
index 698edbb..a43e20a 100644
--- a/build2/operation.cxx
+++ b/build2/operation.cxx
@@ -191,20 +191,9 @@ namespace build2
action_target& at (ts[j]);
const target& t (at.as_target ());
- // Finish matching targets that we have started. Note that we use the
- // state for the "final" action that will be executed and not our
- // action. Failed that, we may fail to find a match for a "stronger"
- // action but will still get unchanged for the original one.
- //
- target_state s;
- if (j < i)
- {
- match (a, t, false);
- s = t.serial_state (false);
- }
- else
- s = target_state::postponed;
-
+ target_state s (j < i
+ ? match (a, t, false)
+ : target_state::postponed);
switch (s)
{
case target_state::postponed:
@@ -369,7 +358,7 @@ namespace build2
{
const target& t (at.as_target ());
- switch ((at.state = t.executed_state (false)))
+ switch ((at.state = t.executed_state (a, false)))
{
case target_state::unknown:
{