From 183329b89ddf810e2df5c250ae5b97d8ebcbba74 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 3 Mar 2017 14:33:54 +0200 Subject: Fix cli distribution via group --- build2/algorithm.ixx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'build2/algorithm.ixx') diff --git a/build2/algorithm.ixx b/build2/algorithm.ixx index 83aa050..e1f8ddc 100644 --- a/build2/algorithm.ixx +++ b/build2/algorithm.ixx @@ -129,8 +129,8 @@ namespace build2 return r; } - pair>&, action> - match_impl (action, target&, const rule* skip); + pair>*, action> + match_impl (action, target&, const rule* skip, bool fail = true); recipe apply_impl (target&, @@ -220,11 +220,14 @@ namespace build2 } inline pair - match_delegate (action a, target& t, const rule& r) + match_delegate (action a, target& t, const rule& r, bool fail) { assert (phase == run_phase::match); - auto mr (match_impl (a, t, &r)); - return make_pair (apply_impl (t, mr.first, mr.second), mr.second); + auto mr (match_impl (a, t, &r, fail)); + return make_pair (mr.first != nullptr + ? apply_impl (t, *mr.first, mr.second) + : empty_recipe, + mr.second); } group_view -- cgit v1.1