aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-02-09 10:11:18 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-02-09 10:19:46 +0200
commitc285dafe9e2b7e4bba3fddad3fa254e4bdbb02d3 (patch)
treef17edc9cc380e983b7a23409db3899dc998ded9b /libbuild2/rule.cxx
parent50de0d1dbdccf95722e229dd1728a00ee661412b (diff)
Don't use fallback file_rule to clean real targets
Diffstat (limited to 'libbuild2/rule.cxx')
-rw-r--r--libbuild2/rule.cxx5
1 files changed, 4 insertions, 1 deletions
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