aboutsummaryrefslogtreecommitdiff
path: root/build/rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-07-24 16:39:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-07-24 16:39:55 +0200
commit1d6e68fda762535fa8508f94ca254a79f293edb2 (patch)
tree7b97edd9f1786cd610c1f41e720d2b105dd87cbc /build/rule.cxx
parentbb4f9e6498ba715911f83e0dc221a5b1b86baf51 (diff)
Add support for generated test input/output
Diffstat (limited to 'build/rule.cxx')
-rw-r--r--build/rule.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/build/rule.cxx b/build/rule.cxx
index f9b9a3c..82ce993 100644
--- a/build/rule.cxx
+++ b/build/rule.cxx
@@ -213,7 +213,7 @@ namespace build
fail << "unable to create directory " << d << ": " << e.what ();
}
- ts = target_state::changed;
+ ts |= target_state::changed;
}
return ts;
@@ -229,22 +229,19 @@ namespace build
target_state ts (target_state::unchanged);
if (t.has_prerequisites ())
- {
ts = reverse_execute_prerequisites (a, t);
- if (ts == target_state::postponed)
- return ts;
- }
-
// If we couldn't remove the directory, return postponed meaning
// that the operation could not be performed at this time.
//
switch (rs)
{
- case rmdir_status::success: return target_state::changed;
- case rmdir_status::not_empty: return target_state::postponed;
- default: return ts;
+ case rmdir_status::success: ts |= target_state::changed;
+ case rmdir_status::not_empty: ts |= target_state::postponed;
+ default: break;
}
+
+ return ts;
}
fsdir_rule fsdir_rule::instance;