summaryrefslogtreecommitdiffstats
path: root/src/graph.h
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-03-07 17:56:18 (GMT)
committerEvan Martin <martine@danga.com>2011-03-07 17:56:18 (GMT)
commita5980c6bb2d6ccb6ffed2d92304c55ba94622963 (patch)
tree76f248bf8fcddadd9cb89d95ea0a9db54ac4cf11 /src/graph.h
parentad0b24ea377c447b1b282be986cdfc1343c387ff (diff)
downloadNinja-a5980c6bb2d6ccb6ffed2d92304c55ba94622963.zip
Ninja-a5980c6bb2d6ccb6ffed2d92304c55ba94622963.tar.gz
Ninja-a5980c6bb2d6ccb6ffed2d92304c55ba94622963.tar.bz2
canonicalize paths loaded from depfiles
If a C file #includes "../foo.cc", then gcc will emit paths like "bar/../foo.cc" into the dependency file; canonicalize these when we load the file. Add a test module for testing the graph dirty recomputation directly, without all the build classes around it.
Diffstat (limited to 'src/graph.h')
-rw-r--r--src/graph.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/graph.h b/src/graph.h
index f3cfa97..ecf9e54 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -119,4 +119,7 @@ struct Edge {
bool is_phony() const;
};
+// Exposed for testing.
+bool CanonicalizePath(string* path, string* err);
+
#endif // NINJA_GRAPH_H_