diff options
Diffstat (limited to 'build2/bin')
-rw-r--r-- | build2/bin/rule.cxx | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/build2/bin/rule.cxx b/build2/bin/rule.cxx index 9adb692..ea84971 100644 --- a/build2/bin/rule.cxx +++ b/build2/bin/rule.cxx @@ -134,21 +134,8 @@ namespace build2 bool a (type == "static" || type == "both"); bool s (type == "shared" || type == "both"); - target* m1 (a ? t.a : nullptr); - target* m2 (s ? t.s : nullptr); - - if (current_mode == execution_mode::last) - swap (m1, m2); - - target_state r (target_state::unchanged); - - if (m1 != nullptr) - r |= execute (act, *m1); - - if (m2 != nullptr) - r |= execute (act, *m2); - - return r; + const target* m[] = {a ? t.a : nullptr, s ? t.s : nullptr}; + return execute_members (act, t, m); } } } |