From fdb050b4b1b966683ff00dd14b268fe395492358 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 24 Feb 2015 08:27:04 +0200 Subject: Use prefix_map for scopes, establish root scope --- build/b.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'build/b.cxx') 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 for details. + // +#ifdef _WIN32 + root_scope = &scopes[path ()]; +#else + root_scope = &scopes[path ("/")]; +#endif + // Parse buildfile. // path bf ("buildfile"); -- cgit v1.1