diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-08-20 15:56:26 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-08-20 15:56:26 +0200 |
commit | 5058b155076b004f4abf21be6cf657a3f2cc4d1b (patch) | |
tree | 2a1675598de93c22ef9850996cfd2964fb11480c /build2/version | |
parent | c9c366bc5f77a806384ebf678fe4335c1422884c (diff) |
Add support for not cleaning generated version file
Diffstat (limited to 'build2/version')
-rw-r--r-- | build2/version/rule.cxx | 5 |
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 (); |