aboutsummaryrefslogtreecommitdiff
path: root/build/cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-04-13 15:50:17 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-04-13 15:50:17 +0200
commitace1743f7f78bb13f99553d6e97ad1beecf1ba99 (patch)
tree595bc9dad989e44f4be9a67e351219f3248dc5f0 /build/cxx
parent534f9d8db025d58c9ce23f3b81a37e8c34386a27 (diff)
Add separate type to represent directory paths
Diffstat (limited to 'build/cxx')
-rw-r--r--build/cxx/module.cxx4
-rw-r--r--build/cxx/rule.cxx8
2 files changed, 6 insertions, 6 deletions
diff --git a/build/cxx/module.cxx b/build/cxx/module.cxx
index e29d311..3c9a4b6 100644
--- a/build/cxx/module.cxx
+++ b/build/cxx/module.cxx
@@ -33,8 +33,8 @@ namespace build
//@@ TODO: need to register target types, rules here instead of main().
- const path& out_root (root.path ());
- level4 ([&]{trace << "for " << out_root << '/';});
+ const dir_path& out_root (root.path ());
+ level4 ([&]{trace << "for " << out_root;});
// Configure.
//
diff --git a/build/cxx/rule.cxx b/build/cxx/rule.cxx
index b4cfb1c..d8a7190 100644
--- a/build/cxx/rule.cxx
+++ b/build/cxx/rule.cxx
@@ -270,7 +270,7 @@ namespace build
// extension rather than NULL (which would signify that the
// extension needs to be added).
//
- path d (f.directory ());
+ dir_path d (f.directory ());
string n (f.leaf ().base ().string ());
const char* es (f.extension ());
const string* e (&extension_pool.find (es != nullptr ? es : ""));
@@ -471,8 +471,8 @@ namespace build
// We may need the project roots for rule chaining (see below).
// We will resolve them lazily only if needed.
//
- const path* out_root (nullptr);
- const path* src_root (nullptr);
+ const dir_path* out_root (nullptr);
+ const dir_path* src_root (nullptr);
// Process prerequisites: do rule chaining for C and C++ source
// files as well as search and match.
@@ -516,7 +516,7 @@ namespace build
// c(xx){} directory is most likely under src_root, it is also
// possible it is under out_root (e.g., generated source).
//
- path d;
+ dir_path d;
if (cp.dir.relative () || cp.dir.sub (*out_root))
d = cp.dir;
else