summaryrefslogtreecommitdiffstats
path: root/src/parsers.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-08-24 22:49:41 (GMT)
committerEvan Martin <martine@danga.com>2011-08-24 22:52:22 (GMT)
commit210ca80b06c57994851fcfdebf7f3d767c41427b (patch)
treecb0f93fd7136f00133aa6140c4c782ad64a9dd60 /src/parsers.cc
parentb0dac493c41b228f0f725faf65590a1595e2245c (diff)
downloadNinja-210ca80b06c57994851fcfdebf7f3d767c41427b.zip
Ninja-210ca80b06c57994851fcfdebf7f3d767c41427b.tar.gz
Ninja-210ca80b06c57994851fcfdebf7f3d767c41427b.tar.bz2
semantic change: allow reaching into parent directories in paths
This allows generating build files in a subdirectory of your source tree. - Change CanonicalizePath to accept this. - CanonicalizePath no longer has an error condition, so change it to a void function. I profiled the result against Chrome and it might be ~100ms slower, but that might just be Chrome's size working against me. In any case I think there are lower-hanging performance fruit elsewhere.
Diffstat (limited to 'src/parsers.cc')
-rw-r--r--src/parsers.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/parsers.cc b/src/parsers.cc
index 7c08179..2235ba2 100644
--- a/src/parsers.cc
+++ b/src/parsers.cc
@@ -516,8 +516,7 @@ bool ManifestParser::ParseEdge(string* err) {
if (!eval.Parse(*i, &eval_err))
return tokenizer_.Error(eval_err, err);
string path = eval.Evaluate(env);
- if (!CanonicalizePath(&path, err))
- return false;
+ CanonicalizePath(&path);
*i = path;
}
}