aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/config/module.hxx
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/module.hxx
parentd91e48ea57b83f7018a25d3f54bba96cf889d66d (diff)
Add support for post-configure and pre-disfigure hooks
Diffstat (limited to 'libbuild2/config/module.hxx')
-rw-r--r--libbuild2/config/module.hxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/libbuild2/config/module.hxx b/libbuild2/config/module.hxx
index 5cb4faa..96220ac 100644
--- a/libbuild2/config/module.hxx
+++ b/libbuild2/config/module.hxx
@@ -15,6 +15,8 @@
#include <libbuild2/module.hxx>
#include <libbuild2/variable.hxx>
+#include <libbuild2/config/utility.hxx>
+
namespace build2
{
namespace config
@@ -94,6 +96,17 @@ namespace build2
i->second.find (var) != i->second.end ();
}
+ // Configure/disfigure hooks.
+ //
+ static bool
+ configure_post (scope&, configure_post_hook*);
+
+ static bool
+ disfigure_pre (scope&, disfigure_pre_hook*);
+
+ small_vector<configure_post_hook*, 1> configure_post_;
+ small_vector<disfigure_pre_hook*, 1> disfigure_pre_;
+
// Cached (during init) config.config.persist value, if defined.
//
const vector<pair<string, string>>* persist = nullptr;