When you run "make clean" for arm, it never visits mach-* directories
because machine-y is just empty. With this files generated with extra-y
like the .k3cfg files are not cleaned.

When cleaning, all machine directories are accumulated to machine-, so
let's pass them to common- to clean up those directories.

Signed-off-by: Sascha Hauer <s.ha...@pengutronix.de>
---
 arch/arm/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 
e4041cf715c4b7f7c62e86941c94b9cd549573b7..eb71c84f587a583eb306483d3aa554273e827ddd
 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -99,7 +99,6 @@ machine-$(CONFIG_ARCH_MVEBU)          += mvebu
 machine-$(CONFIG_ARCH_OMAP)            += omap
 machine-$(CONFIG_ARCH_PXA)             += pxa
 machine-$(CONFIG_ARCH_ROCKCHIP)                += rockchip
-machine-$(CONFIG_ARCH_SAMSUNG)         += samsung
 machine-$(CONFIG_ARCH_SOCFPGA)         += socfpga
 machine-$(CONFIG_ARCH_STM32MP)         += stm32mp
 machine-$(CONFIG_ARCH_SUNXI)           += sunxi
@@ -139,6 +138,9 @@ common-y += arch/arm/boards/ $(MACH)
 common-y += arch/arm/cpu/
 common-y += arch/arm/crypto/
 
+# For cleaning
+common- += $(patsubst %,arch/arm/mach-%/,$(machine-))
+
 ifeq ($(CONFIG_CPU_64), y)
 common-y += arch/arm/lib64/
 else

-- 
2.39.5


Reply via email to