summaryrefslogtreecommitdiffstats
path: root/src/graph.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/graph.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/graph.cc')
-rw-r--r--src/graph.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/graph.cc b/src/graph.cc
index 13927fe..0f687ea 100644
--- a/src/graph.cc
+++ b/src/graph.cc
@@ -161,8 +161,7 @@ bool Edge::LoadDepFile(State* state, DiskInterface* disk_interface,
// Add all its in-edges.
for (vector<string>::iterator i = makefile.ins_.begin();
i != makefile.ins_.end(); ++i) {
- if (!CanonicalizePath(&*i, err))
- return false;
+ CanonicalizePath(&*i);
Node* node = state->GetNode(*i);
inputs_.insert(inputs_.end() - order_only_deps_, node);