summaryrefslogtreecommitdiffstats
path: root/src/graph.cc
diff options
context:
space:
mode:
authorTomasz Śniatowski <tsniatowski@opera.com>2016-10-12 12:09:28 (GMT)
committerTomasz Śniatowski <tsniatowski@opera.com>2016-10-12 12:09:28 (GMT)
commit46d9a958fa11b6b5f4f6a106f28898eac54ca842 (patch)
treef1e0d446405be29df8c14c7efddb246391ba3f05 /src/graph.cc
parent6a2b876d3ab210c0c4e61c6f60d34304e024b54d (diff)
downloadNinja-46d9a958fa11b6b5f4f6a106f28898eac54ca842.zip
Ninja-46d9a958fa11b6b5f4f6a106f28898eac54ca842.tar.gz
Ninja-46d9a958fa11b6b5f4f6a106f28898eac54ca842.tar.bz2
Improve error message when a depfile contains a bad path
Debugging "ninja: error: empty path" is not fun, so make the error message mention the depfile name.
Diffstat (limited to 'src/graph.cc')
-rw-r--r--src/graph.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/graph.cc b/src/graph.cc
index f1d9ca2..136ca04 100644
--- a/src/graph.cc
+++ b/src/graph.cc
@@ -422,8 +422,10 @@ bool ImplicitDepLoader::LoadDepFile(Edge* edge, const string& path,
unsigned int unused;
if (!CanonicalizePath(const_cast<char*>(depfile.out_.str_),
- &depfile.out_.len_, &unused, err))
+ &depfile.out_.len_, &unused, err)) {
+ *err = path + ": " + *err;
return false;
+ }
// Check that this depfile matches the edge's output, if not return false to
// mark the edge as dirty.