diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-03-25 14:48:36 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-03-25 14:48:36 +0200 |
commit | cd75e06a87aa74aa6968113107afa53d401d20bc (patch) | |
tree | 1e104829d10f375a783d6efbbf7eef3e2c6d2ef5 /build/config/module.cxx | |
parent | a94dcda7f00b10cb22b5f2138b1c29bcfbe7de37 (diff) |
Configure/disfigure src_root saving/removing support; fsdir{} injection
We can now build out-of-tree.
Diffstat (limited to 'build/config/module.cxx')
-rw-r--r-- | build/config/module.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/build/config/module.cxx b/build/config/module.cxx index dca6ede..41c2526 100644 --- a/build/config/module.cxx +++ b/build/config/module.cxx @@ -28,15 +28,17 @@ namespace build void init (scope& root, scope& base, const location& l) { - tracer trace ("config::init"); - //@@ TODO: avoid multiple inits (generally, for modules). // - level4 ([&]{trace << "for " << root.path () << '/';}); + + tracer trace ("config::init"); if (&root != &base) fail (l) << "config module must be initialized in project root scope"; + const path& out_root (root.path ()); + level4 ([&]{trace << "for " << out_root << '/';}); + // Register meta-operations. // if (root.meta_operations.insert (configure) != configure_id || @@ -45,7 +47,7 @@ namespace build // Register the build/config.build sourcing trigger. // - root.triggers[path ("build/config.build")] = &trigger; + root.triggers[out_root / path ("build/config.build")] = &trigger; } } } |