aboutsummaryrefslogtreecommitdiff
path: root/build2/dist/operation.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-03-03 14:57:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-03-03 15:25:39 +0200
commitdc74915e47968c40c497fb6d53144bb815ca5cfb (patch)
tree8b7616a62e6e1b5de81fe043043f726e38e24a75 /build2/dist/operation.cxx
parent183329b89ddf810e2df5c250ae5b97d8ebcbba74 (diff)
Fix test and dist for generated input/output
Diffstat (limited to 'build2/dist/operation.cxx')
-rw-r--r--build2/dist/operation.cxx23
1 files changed, 18 insertions, 5 deletions
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);
+ }
}
}