aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-12-01 20:32:38 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-12-05 17:21:48 +0300
commit26bdc152246f6a1caf1f0667b5f04f1804d599fa (patch)
treed65bc32bd9e4673de01708014b9908e5abd1f56e
parent4bad3a3aa3ffc111197f1d5d4b50baa1c4390444 (diff)
Adapt to semantics change of path::normalize()
-rw-r--r--build2/algorithm.cxx2
-rw-r--r--build2/parser.cxx4
-rw-r--r--build2/test/script/parser.cxx4
3 files changed, 7 insertions, 3 deletions
diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx
index 910f073..dbdf81c 100644
--- a/build2/algorithm.cxx
+++ b/build2/algorithm.cxx
@@ -44,7 +44,7 @@ namespace build2
fail << "unknown target type " << n.type << " in name " << n;
if (!n.dir.empty ())
- n.dir.normalize (); //@@ NORM (empty)
+ n.dir.normalize (false, true); // Current dir collapses to an empty one.
// @@ OUT: for now we assume the prerequisite's out is undetermined.
// Would need to pass a pair of names.
diff --git a/build2/parser.cxx b/build2/parser.cxx
index b287550..2776020 100644
--- a/build2/parser.cxx
+++ b/build2/parser.cxx
@@ -659,8 +659,10 @@ namespace build2
if (ti == nullptr)
fail (ploc) << "unknown target type " << pn.type;
+ // Current dir collapses to an empty one.
+ //
if (!pn.dir.empty ())
- pn.dir.normalize (); //@@ NORM (empty)
+ pn.dir.normalize (false, true);
// Find or insert.
//
diff --git a/build2/test/script/parser.cxx b/build2/test/script/parser.cxx
index 6054da9..1c3baea 100644
--- a/build2/test/script/parser.cxx
+++ b/build2/test/script/parser.cxx
@@ -1338,7 +1338,9 @@ namespace build2
if (!p.empty ())
{
- p.normalize (); //@@ NORM
+ // Current dir collapses to an empty one.
+ //
+ p.normalize (false, true);
return p;
}