From ace1743f7f78bb13f99553d6e97ad1beecf1ba99 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 13 Apr 2015 15:50:17 +0200 Subject: Add separate type to represent directory paths --- build/cxx/module.cxx | 4 ++-- build/cxx/rule.cxx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'build/cxx') 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 -- cgit v1.1