aboutsummaryrefslogtreecommitdiff
path: root/build/b.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-02-24 08:27:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-02-24 08:27:04 +0200
commitfdb050b4b1b966683ff00dd14b268fe395492358 (patch)
treeb4da8e293eef9d8682c14cf64f2ed25cc1cc75ab /build/b.cxx
parent52925684387496e83425c79f74b29a91943466a7 (diff)
Use prefix_map for scopes, establish root scope
Diffstat (limited to 'build/b.cxx')
-rw-r--r--build/b.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/build/b.cxx b/build/b.cxx
index 05dac4c..492fdea 100644
--- a/build/b.cxx
+++ b/build/b.cxx
@@ -152,6 +152,16 @@ main (int argc, char* argv[])
trace << "src_root: " << src_root.string ();
}
+ // Create root scope. For Win32 we use the empty path since there
+ // is no such "real" root path. On POSIX, however, this is a real
+ // path. See the comment in <build/path-map> for details.
+ //
+#ifdef _WIN32
+ root_scope = &scopes[path ()];
+#else
+ root_scope = &scopes[path ("/")];
+#endif
+
// Parse buildfile.
//
path bf ("buildfile");