aboutsummaryrefslogtreecommitdiff
path: root/build/install/module.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-12-10 13:54:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-12-10 13:54:59 +0200
commit0d0d9a9c56822919e9794658d31db57f8fc3e2bf (patch)
tree6dcb1649706dc7fc3f02cd5646b4611b3309fbd1 /build/install/module.cxx
parent5f29fc16fb85a934280e00e54bc6307685c4e05d (diff)
Implement two-phase initialization of modules loaded from bootstrap.build
Diffstat (limited to 'build/install/module.cxx')
-rw-r--r--build/install/module.cxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/build/install/module.cxx b/build/install/module.cxx
index f8f7d73..204bddd 100644
--- a/build/install/module.cxx
+++ b/build/install/module.cxx
@@ -99,6 +99,18 @@ namespace build
static alias_rule alias_;
static file_rule file_;
+ extern "C" void
+ install_boot (scope& r, const location&, unique_ptr<module>&)
+ {
+ tracer trace ("install::boot");
+
+ level5 ([&]{trace << "for " << r.out_path ();});
+
+ // Register the install operation.
+ //
+ r.operations.insert (install_id, install);
+ }
+
extern "C" bool
install_init (scope& r,
scope& b,
@@ -109,9 +121,6 @@ namespace build
{
tracer trace ("install::init");
- if (&r != &b)
- fail (l) << "install module must be initialized in bootstrap.build";
-
if (!first)
{
warn (l) << "multiple install module initializations";
@@ -132,10 +141,6 @@ namespace build
v.find ("install", dir_path_type);
}
- // Register the install operation.
- //
- r.operations.insert (install_id, install);
-
// Register our alias and file installer rule.
//
b.rules.insert<alias> (perform_install_id, "install.alias", alias_);