diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-20 09:38:38 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-20 09:38:38 +0200 |
commit | 90ae462a44a1478e1c4be1568997b6873f6e688d (patch) | |
tree | 26af054dea912de192b243c174da23061c57c444 /build | |
parent | c23346c4cda9e0c2318c302dc6014d3fef53a6d3 (diff) |
Rename 'directory' to 'dir' in target, prerequisite
Diffstat (limited to 'build')
-rw-r--r-- | build/algorithm.cxx | 6 | ||||
-rw-r--r-- | build/cxx/rule.cxx | 12 | ||||
-rw-r--r-- | build/prerequisite | 4 | ||||
-rw-r--r-- | build/prerequisite.cxx | 12 | ||||
-rw-r--r-- | build/rule.cxx | 2 | ||||
-rw-r--r-- | build/target | 8 | ||||
-rw-r--r-- | build/target.cxx | 4 |
7 files changed, 23 insertions, 25 deletions
diff --git a/build/algorithm.cxx b/build/algorithm.cxx index 616d21e..9d1a6fa 100644 --- a/build/algorithm.cxx +++ b/build/algorithm.cxx @@ -30,11 +30,11 @@ namespace build //@@ TODO for now we just default to the directory scope. // path d; - if (p.directory.absolute ()) - d = p.directory; // Already normalized. + if (p.dir.absolute ()) + d = p.dir; // Already normalized. else { - d = p.scope.path () / p.directory; + d = p.scope.path () / p.dir; d.normalize (); } diff --git a/build/cxx/rule.cxx b/build/cxx/rule.cxx index 26ad213..1c7d992 100644 --- a/build/cxx/rule.cxx +++ b/build/cxx/rule.cxx @@ -68,7 +68,7 @@ namespace build obj& o (dynamic_cast<obj&> (t)); if (o.path ().empty ()) - o.path (o.directory / path (o.name + ".o")); + o.path (o.dir / path (o.name + ".o")); // Resolve prerequisite to target and match it to a rule. We need // this in order to get the source file path for prerequisite @@ -418,7 +418,7 @@ namespace build exe& e (dynamic_cast<exe&> (t)); if (e.path ().empty ()) - e.path (e.directory / path (e.name)); + e.path (e.dir / path (e.name)); // Do rule chaining for C and C++ source files. // @@ -439,17 +439,17 @@ namespace build // possible it is under out_root (e.g., generated source). // path d; - if (cp.directory.relative () || cp.directory.sub (out_root)) - d = cp.directory; + if (cp.dir.relative () || cp.dir.sub (out_root)) + d = cp.dir; else { - if (!cp.directory.sub (src_root)) + if (!cp.dir.sub (src_root)) { fail << "out of project prerequisite " << cp << info << "specify corresponding obj{} target explicitly"; } - d = out_root / cp.directory.leaf (src_root); + d = out_root / cp.dir.leaf (src_root); } prerequisite& op ( diff --git a/build/prerequisite b/build/prerequisite index da90df4..d57f811 100644 --- a/build/prerequisite +++ b/build/prerequisite @@ -33,12 +33,12 @@ namespace build std::string n, const std::string* e, scope_type& s) - : type (t), directory (std::move (d)), name (std::move (n)), ext (e), + : type (t), dir (std::move (d)), name (std::move (n)), ext (e), scope (s), target (0) {} public: const target_type_type& type; - const path directory; // Normalized absolute or relative (to scope). + const path dir; // Normalized absolute or relative (to scope). const std::string name; const std::string* ext; // NULL if unspecified. scope_type& scope; diff --git a/build/prerequisite.cxx b/build/prerequisite.cxx index 71bde5f..84fb869 100644 --- a/build/prerequisite.cxx +++ b/build/prerequisite.cxx @@ -26,7 +26,7 @@ namespace build // Print scope unless the directory is absolute. // - if (!p.directory.absolute ()) + if (!p.dir.absolute ()) { string s (diagnostic_string (p.scope.path ())); @@ -36,9 +36,9 @@ namespace build // Print directory. // - if (!p.directory.empty ()) + if (!p.dir.empty ()) { - string s (diagnostic_string (p.directory)); + string s (diagnostic_string (p.dir)); if (!s.empty ()) os << s << path::traits::directory_separator; @@ -67,10 +67,8 @@ namespace build return (x.type.id < y.type.id) || (x.type.id == y.type.id && x.name < y.name) || - (x.type.id == y.type.id && x.name == y.name && - x.directory < y.directory) || - (x.type.id == y.type.id && x.name == y.name && - x.directory == y.directory && + (x.type.id == y.type.id && x.name == y.name && x.dir < y.dir) || + (x.type.id == y.type.id && x.name == y.name && x.dir == y.dir && x.ext != nullptr && y.ext != nullptr && x.ext < y.ext); } diff --git a/build/rule.cxx b/build/rule.cxx index e145ea8..b00901e 100644 --- a/build/rule.cxx +++ b/build/rule.cxx @@ -33,7 +33,7 @@ namespace build if (pt.path ().empty ()) { - path p (t.directory / path (pt.name)); + path p (t.dir / path (pt.name)); // @@ TMP: derive file name by appending target name as an extension? // diff --git a/build/target b/build/target index b84931c..be85a41 100644 --- a/build/target +++ b/build/target @@ -46,9 +46,9 @@ namespace build { public: target (path d, std::string n, const std::string* e) - : directory (std::move (d)), name (std::move (n)), ext (e) {} + : dir (std::move (d)), name (std::move (n)), ext (e) {} - const path directory; // Absolute and normalized. + const path dir; // Absolute and normalized. const std::string name; const std::string* ext; // Extension, NULL means unspecified. @@ -105,8 +105,8 @@ namespace build return (tx < ty) || (tx == ty && x.name < y.name) || - (tx == ty && x.name == y.name && x.directory < y.directory) || - (tx == ty && x.name == y.name && x.directory == y.directory && + (tx == ty && x.name == y.name && x.dir < y.dir) || + (tx == ty && x.name == y.name && x.dir == y.dir && x.ext != nullptr && y.ext != nullptr && x.ext < y.ext); } diff --git a/build/target.cxx b/build/target.cxx index 7a40c61..582ae4a 100644 --- a/build/target.cxx +++ b/build/target.cxx @@ -23,9 +23,9 @@ namespace build { os << t.type ().name << '{'; - if (!t.directory.empty ()) + if (!t.dir.empty ()) { - string s (diagnostic_string (t.directory)); + string s (diagnostic_string (t.dir)); if (!s.empty ()) { |