Skip to contentSkip to conversation

MIPS: Repair Kbuild make clean breakage.

PATCH New David Daney 1 participant 1 message Oct 19, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Repair Kbuild make clean breakage.

When running make clean, Kbuild doesn't process the .config file, so nothing generates a platform-y variable. We can get it to descend into the platform directories by setting $(obj-).

The dec Platform file was unconditionally setting platform-, obliterating its previous contents and preventing some directories from being cleaned. This is change to an append operation '+=' to allow cavium-octeon to be cleaned.

---
 arch/mips/Kbuild       |    4 ++++
 arch/mips/dec/Platform |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)
arch/mips/Kbuild +4 -0
index e322d65..7dd65cf 100644
@@ -7,6 +7,10 @@ subdir-ccflags-y := -Werror
 include arch/mips/Kbuild.platforms
 obj-y := $(platform-y)
 
+# make clean traverses $(obj-) without having included .config, so
+# everything ends up here
+obj- := $(platform-)
+
 # mips object files
 # The object files are linked as core-y files would be linked
 
arch/mips/dec/Platform +1 -1
index 3adbcbd..cf55a6f 100644
@@ -1,7 +1,7 @@
 #
 # DECstation family
 #
-platform-$(CONFIG_MACH_DECSTATION)	= dec/
+platform-$(CONFIG_MACH_DECSTATION)	+= dec/
 cflags-$(CONFIG_MACH_DECSTATION)	+= \
 			-I$(srctree)/arch/mips/include/asm/mach-dec
 libs-$(CONFIG_MACH_DECSTATION)		+= arch/mips/dec/prom/
Signature · 1 line
1.7.2.3