[PATCH v2 07/33] ARM: Makefile: descend into mach-* for cleaning
Sascha Hauer
s.hauer at pengutronix.de
Thu Jun 5 05:42:32 PDT 2025
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.hauer at 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
More information about the barebox
mailing list