summaryrefslogtreecommitdiffstats
path: root/src/clean.cc
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2014-05-21 22:07:47 (GMT)
committerNico Weber <thakis@chromium.org>2014-05-21 22:18:01 (GMT)
commitbc239cca4f3f0757ba34d0306fbc2a2b75d067a2 (patch)
treee01abd5130c1e0f7ecca0dc0f0a24e8b9113dc0f /src/clean.cc
parent7103c32646df958b0287c65b1c660bf528a191d6 (diff)
downloadNinja-bc239cca4f3f0757ba34d0306fbc2a2b75d067a2.zip
Ninja-bc239cca4f3f0757ba34d0306fbc2a2b75d067a2.tar.gz
Ninja-bc239cca4f3f0757ba34d0306fbc2a2b75d067a2.tar.bz2
Make "depfile=$out.d" work if $out contains escaped characters, rspfile too.
Fixes #730. This has always been broken, but due to #690 more paths are now escaped (e.g. paths containing + characters, like file.c++). Also see discussion in #689. The approach is to give EdgeEnv an enum deciding on whether or not to escape file names, and provide functions that evaluate depfile and rspfile with that set that to kNoEscape. (depfile=$out.d doesn't make sense on edges with multiple outputs.) This should be relatively safe, as $in and $out can't be used on edges, only on rules (#687).
Diffstat (limited to 'src/clean.cc')
-rw-r--r--src/clean.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/clean.cc b/src/clean.cc
index 5d1974e..98c638c 100644
--- a/src/clean.cc
+++ b/src/clean.cc
@@ -80,11 +80,11 @@ bool Cleaner::IsAlreadyRemoved(const string& path) {
}
void Cleaner::RemoveEdgeFiles(Edge* edge) {
- string depfile = edge->GetBinding("depfile");
+ string depfile = edge->GetUnescapedDepfile();
if (!depfile.empty())
Remove(depfile);
- string rspfile = edge->GetBinding("rspfile");
+ string rspfile = edge->GetUnescapedRspfile();
if (!rspfile.empty())
Remove(rspfile);
}