From c285dafe9e2b7e4bba3fddad3fa254e4bdbb02d3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 9 Feb 2022 10:11:18 +0200 Subject: Don't use fallback file_rule to clean real targets --- libbuild2/rule.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libbuild2/rule.cxx') diff --git a/libbuild2/rule.cxx b/libbuild2/rule.cxx index 6dad685..c573339 100644 --- a/libbuild2/rule.cxx +++ b/libbuild2/rule.cxx @@ -56,10 +56,13 @@ namespace build2 // are not doing anything for this action so not checking if the file // exists seems harmless. // + // But we also don't want to match real targets and not cleaning their + // output files. + // switch (a) { case perform_clean_id: - return true; + return t.decl != target_decl::real; default: { // While normally we shouldn't do any of this in match(), no other -- cgit v1.1