diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-27 16:57:34 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-27 16:57:34 +0200 |
commit | 4372f041bb7401c3adc2d5710566b13f64722102 (patch) | |
tree | 5f37f6e69e5529d3628b7611bb642dba15d885c0 /build/prerequisite.cxx | |
parent | e1d2e3b63934c1e193429f1d6c4e04abc0e85d56 (diff) |
Variable assignment, appending support
Diffstat (limited to 'build/prerequisite.cxx')
-rw-r--r-- | build/prerequisite.cxx | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/build/prerequisite.cxx b/build/prerequisite.cxx index f2c72e5..feb6381 100644 --- a/build/prerequisite.cxx +++ b/build/prerequisite.cxx @@ -30,8 +30,15 @@ namespace build { string s (diag_relative_work (p.scope.path ())); - if (!s.empty () && s.back () != path::traits::directory_separator) - os << s << path::traits::directory_separator << ": "; + if (s != ".") + { + os << s; + + if (s.back () != path::traits::directory_separator) + os << path::traits::directory_separator; + + os << ": "; + } } // Print directory. @@ -40,8 +47,14 @@ namespace build { string s (diag_relative_work (p.dir)); - if (!s.empty () && s.back () != path::traits::directory_separator) - os << s << path::traits::directory_separator; + if (s != ".") + { + os << s; + + if (!p.name.empty () && + s.back () != path::traits::directory_separator) + os << path::traits::directory_separator; + } } os << p.name; |