aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/config/operation.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-08-16 16:21:35 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-08-16 16:21:35 +0200
commit534ca7619a62a74bce8e4b30931aaf99f9c3beb6 (patch)
tree2e4ffc0b8aa6651f5003009df0f372529754b1f5 /libbuild2/config/operation.cxx
parentd91e48ea57b83f7018a25d3f54bba96cf889d66d (diff)
Add support for post-configure and pre-disfigure hooks
Diffstat (limited to 'libbuild2/config/operation.cxx')
-rw-r--r--libbuild2/config/operation.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/libbuild2/config/operation.cxx b/libbuild2/config/operation.cxx
index c606d09..b07df42 100644
--- a/libbuild2/config/operation.cxx
+++ b/libbuild2/config/operation.cxx
@@ -590,6 +590,15 @@ namespace build2
fail << "operation-specific configuration not yet supported";
}
+ if (c_s == nullptr)
+ {
+ if (module* m = rs.find_module<module> (module::name))
+ {
+ for (auto hook: m->configure_post_)
+ hook (a, rs);
+ }
+ }
+
// Configure subprojects that have been loaded.
//
if (const subprojects* ps = *rs.root_extra->subprojects)
@@ -892,6 +901,12 @@ namespace build2
}
}
+ if (module* m = rs.find_module<module> (module::name))
+ {
+ for (auto hook: m->disfigure_pre_)
+ r = hook (a, rs) || r;
+ }
+
// We distinguish between a complete disfigure and operation-
// specific.
//
@@ -937,6 +952,7 @@ namespace build2
}
else
{
+ fail << "operation-specific disfiguration not yet supported";
}
return r;