aboutsummaryrefslogtreecommitdiff
path: root/build2/parser.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-12-07 01:24:49 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-12-07 10:30:25 +0300
commit1a9d610051cd48c98fb71a570a0871b4e073cec9 (patch)
tree7fc859248b3f23520745514f29b647e0b2941c13 /build2/parser.cxx
parent8e258e150743f9d71a7bbd9f70af78a05d354456 (diff)
Make use of butl::path::current(), butl::path::parent()
Diffstat (limited to 'build2/parser.cxx')
-rw-r--r--build2/parser.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/build2/parser.cxx b/build2/parser.cxx
index c47cc8b..6b5708e 100644
--- a/build2/parser.cxx
+++ b/build2/parser.cxx
@@ -40,7 +40,7 @@ namespace build2
{
// Relative scopes are opened relative to out, not src.
//
- if (d.simple () && d.string () != "." && d.string () != "..")
+ if (d.simple () && !d.current () && !d.parent ())
{
d = dir_path (p.scope_->out_path ()) /= d.string ();
n = false;
@@ -1797,7 +1797,7 @@ namespace build2
{
q = pp ? true : convert<bool> (move (lhs));
}
- catch (const invalid_argument& e) { fail (l) << e.what (); }
+ catch (const invalid_argument& e) { fail (l) << e.what () << endf; }
if (!pp)
pre_parse_ = !q; // Short-circuit middle?