summaryrefslogtreecommitdiffstats
path: root/src/build.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/build.cc')
-rw-r--r--src/build.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/build.cc b/src/build.cc
index f648584..0d819b2 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -879,6 +879,8 @@ bool Builder::ExtractDeps(CommandRunner::Result* result,
string content = disk_interface_->ReadFile(depfile, err);
if (!err->empty())
return false;
+ if (content.empty())
+ return true;
DepfileParser deps;
if (!deps.Parse(&content, err))
@@ -893,12 +895,10 @@ bool Builder::ExtractDeps(CommandRunner::Result* result,
deps_nodes->push_back(state_->GetNode(*i));
}
- /* TODO: unlink the file via diskinterface.
- if (unlink(depfile.c_str()) < 0) {
- *err = string("unlink: ")) + strerror(errno);
+ if (disk_interface_->RemoveFile(depfile) < 0) {
+ *err = string("deleting depfile: ") + strerror(errno);
return false;
}
- */
#endif
return true;