aboutsummaryrefslogtreecommitdiff
path: root/build2/version/rule.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/version/rule.cxx')
-rw-r--r--build2/version/rule.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/build2/version/rule.cxx b/build2/version/rule.cxx
index a9d62ba..3c9723e 100644
--- a/build2/version/rule.cxx
+++ b/build2/version/rule.cxx
@@ -81,6 +81,11 @@ namespace build2
{
doc& t (static_cast<doc&> (xt));
+ // If this is clean check if we were asked not to remove it.
+ //
+ if (a == perform_clean_id && !cast_true<bool> (t[var_clean]))
+ return noop_recipe;
+
// Derive the file name.
//
t.derive_path ();