From dc74915e47968c40c497fb6d53144bb815ca5cfb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 3 Mar 2017 14:57:29 +0200 Subject: Fix test and dist for generated input/output --- build2/dist/operation.cxx | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'build2/dist') diff --git a/build2/dist/operation.cxx b/build2/dist/operation.cxx index 027452f..5c08c50 100644 --- a/build2/dist/operation.cxx +++ b/build2/dist/operation.cxx @@ -112,20 +112,33 @@ namespace build2 // Match a rule for every operation supported by this project. Skip // default_id. // + // Note that we are not calling operation_pre/post() callbacks here + // since the meta operation is dist and we know what we are doing. + // for (operations::size_type id (default_id + 1); id < rs->operations.size (); ++id) { if (const operation_info* oif = rs->operations[id]) { - // Note that we are not calling operation_pre/post() callbacks here - // since the meta operation is dist and we know what we are doing. - // - set_current_oif (*oif); - // Use standard (perform) match. // + if (oif->pre != nullptr) + { + const operation_info* poif (rs->operations[oif->pre (dist_id)]); + set_current_oif (*poif, oif); + match (action (dist_id, poif->id, oif->id), ts); + } + + set_current_oif (*oif); match (action (dist_id, oif->id), ts); + + if (oif->post != nullptr) + { + const operation_info* poif (rs->operations[oif->post (dist_id)]); + set_current_oif (*poif, oif); + match (action (dist_id, poif->id, oif->id), ts); + } } } -- cgit v1.1