From 5058b155076b004f4abf21be6cf657a3f2cc4d1b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 20 Aug 2017 15:56:26 +0200 Subject: Add support for not cleaning generated version file --- build2/version/rule.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'build2/version/rule.cxx') 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 (xt)); + // If this is clean check if we were asked not to remove it. + // + if (a == perform_clean_id && !cast_true (t[var_clean])) + return noop_recipe; + // Derive the file name. // t.derive_path (); -- cgit v1.1