aboutsummaryrefslogtreecommitdiff
path: root/build/rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-08-03 17:58:46 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-08-03 17:58:46 +0200
commit467d700c66582471013a07384318d0142d2f3de2 (patch)
tree3b702d291f50f6ec9989e72edc567cd0befd0998 /build/rule.cxx
parentabb7bf1045fde14f6ef87c8941ee22af233af397 (diff)
Fix few bugs
Diffstat (limited to 'build/rule.cxx')
-rw-r--r--build/rule.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/build/rule.cxx b/build/rule.cxx
index 9f17a2c..97cd20f 100644
--- a/build/rule.cxx
+++ b/build/rule.cxx
@@ -242,8 +242,13 @@ namespace build
//
switch (rs)
{
- case rmdir_status::success: ts |= target_state::changed;
- case rmdir_status::not_empty: ts |= target_state::postponed;
+ case rmdir_status::success: ts |= target_state::changed; break;
+ case rmdir_status::not_empty:
+ {
+ if (!work.sub (t.dir)) // No use postponing removing working directory.
+ ts |= target_state::postponed;
+ break;
+ }
default: break;
}