Skip to contentSkip to conversation

sh: remove meaningless archclean line

PATCH In review Masahiro Yamada 4 participants 5 messages Oct 13, 2021 – Oct 15, 2021

Subsystems (20)
lore
Share & tools
lore
#1 lore raw

PATCH 2/2 kbuild: use more subdir- for visiting subdirectories while cleaning

In reply to Masahiro Yamada

Documentation/kbuild/makefiles.rst suggests to use "archclean" for cleaning arch/$(SRCARCH)/boot/.

Since commit d92cc4d51643 ("kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild"), we can use the "subdir- += boot" trick for all architectures. This can take advantage of the parallel option (-j) for "make clean".

I also cleaned up the comments. The "archdep" target does not exist.

---

 Documentation/kbuild/makefiles.rst | 17 ++---------------
 arch/alpha/Kbuild                  |  3 +++
 arch/alpha/Makefile                |  3 ---
 arch/arc/Kbuild                    |  3 +++
 arch/arc/Makefile                  |  3 ---
 arch/arm/Kbuild                    |  3 +++
 arch/arm/Makefile                  |  4 ----
 arch/arm64/Kbuild                  |  3 +++
 arch/arm64/Makefile                |  7 -------
 arch/arm64/kernel/Makefile         |  3 +++
 arch/csky/Kbuild                   |  3 +++
 arch/csky/Makefile                 |  3 ---
 arch/h8300/Kbuild                  |  3 +++
 arch/h8300/Makefile                |  3 ---
 arch/ia64/Makefile                 |  2 --
 arch/m68k/Makefile                 |  4 +---
 arch/microblaze/Kbuild             |  3 +++
 arch/microblaze/Makefile           |  3 ---
 arch/mips/Kbuild                   |  3 +++
 arch/mips/Makefile                 |  8 +-------
 arch/mips/boot/Makefile            |  3 +++
 arch/nds32/Kbuild                  |  3 +++
 arch/nds32/Makefile                |  3 ---
 arch/nios2/Kbuild                  |  3 +++
 arch/nios2/Makefile                |  6 +-----
 arch/openrisc/Kbuild               |  3 +++
 arch/openrisc/Makefile             |  7 +------
 arch/parisc/Kbuild                 |  3 +++
 arch/parisc/Makefile               |  7 +------
 arch/powerpc/Kbuild                |  3 +++
 arch/powerpc/Makefile              |  7 +------
 arch/riscv/Kbuild                  |  3 +++
 arch/riscv/Makefile                |  7 +------
 arch/s390/Kbuild                   |  3 +++
 arch/s390/Makefile                 |  8 +-------
 arch/sh/Kbuild                     |  3 +++
 arch/sh/Makefile                   |  3 ---
 arch/sparc/Kbuild                  |  3 +++
 arch/sparc/Makefile                |  3 ---
 arch/x86/Kbuild                    |  3 +++
 arch/x86/Makefile                  |  2 --
 arch/xtensa/Makefile               |  4 +---
 42 files changed, 71 insertions(+), 103 deletions(-)
Documentation/kbuild/makefiles.rst +2 -15
index db3af0b45baf..b008b90b92c9 100644
@@ -1050,22 +1050,9 @@ is not sufficient this sometimes needs to be explicit.
 The above assignment instructs kbuild to descend down in the
 directory compressed/ when "make clean" is executed.
 
-To support the clean infrastructure in the Makefiles that build the
-final bootimage there is an optional target named archclean:
-
-	Example::
-
-		#arch/x86/Makefile
-		archclean:
-			$(Q)$(MAKE) $(clean)=arch/x86/boot
-
-When "make clean" is executed, make will descend down in arch/x86/boot,
-and clean as usual. The Makefile located in arch/x86/boot/ may use
-the subdir- trick to descend further down.
-
 Note 1: arch/$(SRCARCH)/Makefile cannot use "subdir-", because that file is
-included in the top level makefile, and the kbuild infrastructure
-is not operational at that point.
+included in the top level makefile. Instead, arch/$(SRCARCH)/Kbuild can use
+"subdir-".
 
 Note 2: All directories listed in core-y, libs-y, drivers-y and net-y will
 be visited during "make clean".
arch/alpha/Kbuild +3 -0
index c2302017403a..345d79df24bb 100644
@@ -1,3 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-y			+= kernel/ mm/
 obj-$(CONFIG_MATHEMU)	+= math-emu/
+
+# for cleaning
+subdir- += boot
arch/alpha/Makefile +0 -3
index 52529ee42dac..881cb913e23a 100644
@@ -55,9 +55,6 @@ $(boot)/vmlinux.gz: vmlinux
 bootimage bootpfile bootpzfile: vmlinux
 	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
-
 archheaders:
 	$(Q)$(MAKE) $(build)=arch/alpha/kernel/syscalls all
 
arch/arc/Kbuild +3 -0
index 699d8cae9b1f..b94102fff68b 100644
@@ -1,3 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-y += kernel/
 obj-y += mm/
+
+# for cleaning
+subdir- += boot
arch/arc/Makefile +0 -3
index 08995f6c6441..efc54f3e35e0 100644
@@ -112,6 +112,3 @@ uImage: $(uimage-default-y)
 	@$(kecho) '  Image $(boot)/uImage is ready'
 
 CLEAN_FILES += $(boot)/uImage
-
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
arch/arm/Kbuild +3 -0
index 5208f7061524..b506622e7e23 100644
@@ -9,3 +9,6 @@ obj-y				+= kernel/ mm/ common/
 obj-y				+= probes/
 obj-y				+= net/
 obj-y				+= crypto/
+
+# for cleaning
+subdir- += boot
arch/arm/Makefile +0 -4
index 847c31e7c368..07ea71f8665c 100644
@@ -317,10 +317,6 @@ ifeq ($(CONFIG_VDSO),y)
 	$(Q)$(MAKE) $(build)=arch/arm/vdso $@
 endif
 
-# We use MRPROPER_FILES and CLEAN_FILES now
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
-
 # My testing targets (bypasses dependencies)
 bp:;	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage
 
arch/arm64/Kbuild +3 -0
index ea7ab4ca81f9..5bfbf7d79c99 100644
@@ -4,3 +4,6 @@ obj-$(CONFIG_KVM)	+= kvm/
 obj-$(CONFIG_XEN)	+= xen/
 obj-$(subst m,y,$(CONFIG_HYPERV))	+= hyperv/
 obj-$(CONFIG_CRYPTO)	+= crypto/
+
+# for cleaning
+subdir- += boot
arch/arm64/Makefile +0 -7
index c744b1e7b356..e8cfc5868aa8 100644
@@ -182,13 +182,6 @@ ifeq ($(CONFIG_ARM64_USE_LSE_ATOMICS),y)
   endif
 endif
 
-
-# We use MRPROPER_FILES and CLEAN_FILES now
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
-	$(Q)$(MAKE) $(clean)=arch/arm64/kernel/vdso
-	$(Q)$(MAKE) $(clean)=arch/arm64/kernel/vdso32
-
 ifeq ($(KBUILD_EXTMOD),)
 # We need to generate vdso-offsets.h before compiling certain files in kernel/.
 # In order to do that, we should use the archprepare target, but we can't since
arch/arm64/kernel/Makefile +3 -0
index 3f1490bfb938..88b3e2a21408 100644
@@ -81,3 +81,6 @@ extra-y					+= $(head-y) vmlinux.lds
 ifeq ($(CONFIG_DEBUG_EFI),y)
 AFLAGS_head.o += -DVMLINUX_PATH="\"$(realpath $(objtree)/vmlinux)\""
 endif
+
+# for cleaning
+subdir- += vdso vdso32
arch/csky/Kbuild +3 -0
index a4e40e534e6a..4e39f7abdeb6 100644
@@ -1 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
+
+# for cleaning
+subdir- += boot
arch/csky/Makefile +0 -3
index 37f593a4bf53..866805077636 100644
@@ -76,9 +76,6 @@ all: zImage
 zImage Image uImage: vmlinux
 	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
-
 define archhelp
   echo  '* zImage       - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
   echo  '  Image        - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
arch/h8300/Kbuild +3 -0
index b2583e7efbd1..e4703f3534cc 100644
@@ -1,2 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-y	+= kernel/ mm/ boot/dts/
+
+# for cleaning
+subdir- += boot
arch/h8300/Makefile +0 -3
index eb4cb8f6830c..807f41e60ee4 100644
@@ -34,9 +34,6 @@ libs-y	+= arch/$(ARCH)/lib/
 
 boot := arch/h8300/boot
 
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
-
 vmlinux.srec vmlinux.bin zImage uImage.bin: vmlinux
 	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
arch/ia64/Makefile +0 -2
index 7e548c654a29..3b3ac3e1f272 100644
@@ -67,8 +67,6 @@ vmlinux.bin: vmlinux FORCE
 unwcheck: vmlinux
 	-$(Q)READELF=$(READELF) $(PYTHON3) $(srctree)/arch/ia64/scripts/unwcheck.py $<
 
-archclean:
-
 archheaders:
 	$(Q)$(MAKE) $(build)=arch/ia64/kernel/syscalls all
 
arch/m68k/Makefile +1 -3
index dd0c0ec67f67..740fc97b9c0f 100644
@@ -2,9 +2,7 @@
 # m68k/Makefile
 #
 # This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies. Remember to do have actions
-# for "archclean" and "archdep" for cleaning up and making dependencies for
-# this architecture
+# architecture-specific flags and dependencies.
 #
 # This file is subject to the terms and conditions of the GNU General Public
 # License.  See the file "COPYING" in the main directory of this archive
arch/microblaze/Kbuild +3 -0
index a1c597889319..077a0b8e9615 100644
@@ -3,3 +3,6 @@ obj-y			+= kernel/
 obj-y			+= mm/
 obj-$(CONFIG_PCI)	+= pci/
 obj-y			+= boot/dts/
+
+# for cleaning
+subdir- += boot
arch/microblaze/Makefile +0 -3
index 982cd8b876bf..a25e76d89e86 100644
@@ -60,9 +60,6 @@ export DTB
 
 all: linux.bin
 
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
-
 archheaders:
 	$(Q)$(MAKE) $(build)=arch/microblaze/kernel/syscalls all
 
arch/mips/Kbuild +3 -0
index d5d6ef9bb986..9e8071f0e58f 100644
@@ -25,3 +25,6 @@ obj-y += vdso/
 ifdef CONFIG_KVM
 obj-y += kvm/
 endif
+
+# for cleaning
+subdir- += boot
arch/mips/Makefile +1 -7
index ea3cd080a1c7..e036fc025ccc 100644
@@ -8,8 +8,7 @@
 # Copyright (C) 2002, 2003, 2004  Maciej W. Rozycki
 #
 # This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies. Remember to do have actions
-# for "archclean" cleaning up for this architecture.
+# architecture-specific flags and dependencies.
 #
 
 archscripts: scripts_basic
@@ -426,11 +425,6 @@ endif
 	$(Q)install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE)
 	$(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE)
 
-archclean:
-	$(Q)$(MAKE) $(clean)=arch/mips/boot
-	$(Q)$(MAKE) $(clean)=arch/mips/boot/compressed
-	$(Q)$(MAKE) $(clean)=arch/mips/boot/tools
-
 archheaders:
 	$(Q)$(MAKE) $(build)=arch/mips/kernel/syscalls all
 
arch/mips/boot/Makefile +3 -0
index a3da2c5d63c2..196c44fa72d9 100644
@@ -171,3 +171,6 @@ $(obj)/vmlinux.itb: $(obj)/vmlinux.its $(obj)/vmlinux.bin FORCE
 
 $(obj)/vmlinux.%.itb: $(obj)/vmlinux.%.its $(obj)/vmlinux.bin.% FORCE
 	$(call if_changed,itb-image,$<)
+
+# for cleaning
+subdir- += compressed tools
arch/nds32/Kbuild +3 -0
index a4e40e534e6a..4e39f7abdeb6 100644
@@ -1 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
+
+# for cleaning
+subdir- += boot
arch/nds32/Makefile +0 -3
index ee26e4df2fd0..b33d5d81b6ae 100644
@@ -58,9 +58,6 @@ prepare: vdso_prepare
 vdso_prepare: prepare0
 	$(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso include/generated/vdso-offsets.h
 
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
-
 define archhelp
   echo  '  Image         - kernel image (arch/$(ARCH)/boot/Image)'
 endef
arch/nios2/Kbuild +3 -0
index a4e40e534e6a..4e39f7abdeb6 100644
@@ -1 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
+
+# for cleaning
+subdir- += boot
arch/nios2/Makefile +1 -5
index 72e8ff065cf7..02d678559066 100644
@@ -8,8 +8,7 @@
 # Written by Fredrik Markstrom
 #
 # This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies. Remember to do have actions
-# for "archclean" cleaning up for this architecture.
+# architecture-specific flags and dependencies.
 #
 # Nios2 port by Wind River Systems Inc trough:
 #   [email protected] and [email protected]
@@ -53,9 +52,6 @@ core-y	+= $(nios2-boot)/dts/
 
 all: vmImage
 
-archclean:
-	$(Q)$(MAKE) $(clean)=$(nios2-boot)
-
 $(BOOT_TARGETS): vmlinux
 	$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
 
arch/openrisc/Kbuild +3 -0
index 4234b4c03e72..b0b0f2b03f87 100644
@@ -1,3 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-y += lib/ kernel/ mm/
 obj-y += boot/dts/
+
+# for cleaning
+subdir- += boot
arch/openrisc/Makefile +1 -6
index c52de526e518..760b734fb822 100644
@@ -1,9 +1,7 @@
 # BK Id: %F% %I% %G% %U% %#%
 #
 # This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies. Remember to do have actions
-# for "archclean" and "archdep" for cleaning up and making dependencies for
-# this architecture
+# architecture-specific flags and dependencies.
 #
 # This file is subject to the terms and conditions of the GNU General Public
 # License.  See the file "COPYING" in the main directory of this archive
@@ -48,6 +46,3 @@ PHONY += vmlinux.bin
 
 vmlinux.bin: vmlinux
 	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
-
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
arch/parisc/Kbuild +3 -0
index 3c068b700a81..a6d3b280ba0c 100644
@@ -1,2 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-y	+= mm/ kernel/ math-emu/
+
+# for cleaning
+subdir- += boot
arch/parisc/Makefile +1 -6
index fcde3ffa0221..8db4af4879d0 100644
@@ -2,9 +2,7 @@
 # parisc/Makefile
 #
 # This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies. Remember to do have actions
-# for "archclean" and "archdep" for cleaning up and making dependencies for
-# this architecture
+# architecture-specific flags and dependencies.
 #
 # This file is subject to the terms and conditions of the GNU General Public
 # License.  See the file "COPYING" in the main directory of this archive
@@ -181,8 +179,5 @@ define archhelp
 	@echo  '  zinstall	- Install compressed vmlinuz kernel'
 endef
 
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
-
 archheaders:
 	$(Q)$(MAKE) $(build)=arch/parisc/kernel/syscalls all
arch/powerpc/Kbuild +3 -0
index 5e2f9eaa3ee7..22cd0d55a892 100644
@@ -16,3 +16,6 @@ obj-$(CONFIG_KVM)  += kvm/
 obj-$(CONFIG_PERF_EVENTS) += perf/
 obj-$(CONFIG_KEXEC_CORE)  += kexec/
 obj-$(CONFIG_KEXEC_FILE)  += purgatory/
+
+# for cleaning
+subdir- += boot
arch/powerpc/Makefile +1 -6
index aa6808e70647..b61d8be3c226 100644
@@ -1,7 +1,5 @@
 # This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies. Remember to do have actions
-# for "archclean" and "archdep" for cleaning up and making dependencies for
-# this architecture.
+# architecture-specific flags and dependencies.
 #
 # This file is subject to the terms and conditions of the GNU General Public
 # License.  See the file "COPYING" in the main directory of this archive
@@ -411,9 +409,6 @@ install:
 	sh -x $(srctree)/$(boot)/install.sh "$(KERNELRELEASE)" vmlinux \
 	System.map "$(INSTALL_PATH)"
 
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
-
 ifeq ($(KBUILD_EXTMOD),)
 # We need to generate vdso-offsets.h before compiling certain files in kernel/.
 # In order to do that, we should use the archprepare target, but we can't since
arch/riscv/Kbuild +3 -0
index 4614c01ba5b3..fb3397223d52 100644
@@ -2,3 +2,6 @@
 
 obj-y += kernel/ mm/ net/
 obj-$(CONFIG_BUILTIN_DTB) += boot/dts/
+
+# for cleaning
+subdir- += boot
arch/riscv/Makefile +1 -6
index 0eb4568fbd29..753e13f3a9d2 100644
@@ -1,7 +1,5 @@
 # This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies. Remember to do have actions
-# for "archclean" and "archdep" for cleaning up and making dependencies for
-# this architecture
+# architecture-specific flags and dependencies.
 #
 # This file is subject to the terms and conditions of the GNU General Public
 # License.  See the file "COPYING" in the main directory of this archive
@@ -137,6 +135,3 @@ zinstall: install-image = Image.gz
 install zinstall:
 	$(CONFIG_SHELL) $(srctree)/$(boot)/install.sh $(KERNELRELEASE) \
 	$(boot)/$(install-image) System.map "$(INSTALL_PATH)"
-
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
arch/s390/Kbuild +3 -0
index 8b98c501142d..76e362277179 100644
@@ -8,3 +8,6 @@ obj-$(CONFIG_APPLDATA_BASE)	+= appldata/
 obj-y				+= net/
 obj-$(CONFIG_PCI)		+= pci/
 obj-$(CONFIG_ARCH_HAS_KEXEC_PURGATORY) += purgatory/
+
+# for cleaning
+subdir- += boot tools
arch/s390/Makefile +1 -7
index 450b351dfa8e..69c45f600273 100644
@@ -3,9 +3,7 @@
 # s390/Makefile
 #
 # This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies. Remember to do have actions
-# for "archclean" and "archdep" for cleaning up and making dependencies for
-# this architecture
+# architecture-specific flags and dependencies.
 #
 # Copyright (C) 1994 by Linus Torvalds
 #
@@ -147,10 +145,6 @@ zfcpdump:
 vdso_install:
 	$(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso64 $@
 
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
-	$(Q)$(MAKE) $(clean)=$(tools)
-
 archheaders:
 	$(Q)$(MAKE) $(build)=$(syscalls) uapi
 
arch/sh/Kbuild +3 -0
index 48c2a091a072..be171880977e 100644
@@ -2,3 +2,6 @@
 obj-y				+= kernel/ mm/ boards/
 obj-$(CONFIG_SH_FPU_EMU)	+= math-emu/
 obj-$(CONFIG_USE_BUILTIN_DTB)	+= boot/dts/
+
+# for cleaning
+subdir- += boot
arch/sh/Makefile +0 -3
index 781463900621..b39412bf91fb 100644
@@ -198,9 +198,6 @@ compressed: zImage
 archprepare:
 	$(Q)$(MAKE) $(build)=arch/sh/tools include/generated/machtypes.h
 
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
-
 archheaders:
 	$(Q)$(MAKE) $(build)=arch/sh/kernel/syscalls all
 
arch/sparc/Kbuild +3 -0
index c9e574906a9b..71cb3d934bf6 100644
@@ -9,3 +9,6 @@ obj-y += math-emu/
 obj-y += net/
 obj-y += crypto/
 obj-$(CONFIG_SPARC64) += vdso/
+
+# for cleaning
+subdir- += boot
arch/sparc/Makefile +0 -3
index 24fb5a99f439..c7008bbebc4c 100644
@@ -75,9 +75,6 @@ install:
 	sh $(srctree)/$(boot)/install.sh $(KERNELRELEASE) $(KBUILD_IMAGE) \
 		System.map "$(INSTALL_PATH)"
 
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
-
 archheaders:
 	$(Q)$(MAKE) $(build)=arch/sparc/kernel/syscalls all
 
arch/x86/Kbuild +3 -0
index 30dec019756b..f384cb1a4f7a 100644
@@ -25,3 +25,6 @@ obj-y += platform/
 obj-y += net/
 
 obj-$(CONFIG_KEXEC_FILE) += purgatory/
+
+# for cleaning
+subdir- += boot tools
arch/x86/Makefile +0 -2
index 7488cfbbd2f6..67d7c265e0ce 100644
@@ -283,8 +283,6 @@ endif
 archclean:
 	$(Q)rm -rf $(objtree)/arch/i386
 	$(Q)rm -rf $(objtree)/arch/x86_64
-	$(Q)$(MAKE) $(clean)=$(boot)
-	$(Q)$(MAKE) $(clean)=arch/x86/tools
 
 define archhelp
   echo  '* bzImage		- Compressed kernel image (arch/x86/boot/bzImage)'
arch/xtensa/Makefile +1 -3
index 284fd1f592a8..ee2769519eaf 100644
@@ -7,9 +7,7 @@
 # Copyright (C) 2014 Cadence Design Systems Inc.
 #
 # This file is included by the global makefile so that you can add your own
-# architecture-specific flags and dependencies. Remember to do have actions
-# for "archclean" and "archdep" for cleaning up and making dependencies for
-# this architecture
+# architecture-specific flags and dependencies.
 
 # Core configuration.
 # (Use VAR=<xtensa_config> to use another default compiler.)
Signature · 1 line
2.30.2
#0 lore raw

PATCH 1/2 sh: remove meaningless archclean line

The vsyscall directory is cleaned up by the ordinary way via arch/sh/kernel/Makefile:

  obj-$(CONFIG_VSYSCALL)          += vsyscall/

---

 arch/sh/Makefile | 1 -
 1 file changed, 1 deletion(-)
arch/sh/Makefile +0 -1
index 88ddb6f1c75b..781463900621 100644
@@ -200,7 +200,6 @@ archprepare:
 
 archclean:
 	$(Q)$(MAKE) $(clean)=$(boot)
-	$(Q)$(MAKE) $(clean)=arch/sh/kernel/vsyscall
 
 archheaders:
 	$(Q)$(MAKE) $(build)=arch/sh/kernel/syscalls all
Signature · 1 line
2.30.2
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] kbuild: use more subdir- for visiting subdirectories while cleaning

In reply to Masahiro Yamada
Quoted 11 lines · Masahiro Yamada

Documentation/kbuild/makefiles.rst suggests to use "archclean" for cleaning arch/$(SRCARCH)/boot/.

Since commit d92cc4d51643 ("kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild"), we can use the "subdir- += boot" trick for all architectures. This can take advantage of the parallel option (-j) for "make clean".

I also cleaned up the comments. The "archdep" target does not exist.

I like the clean-up!

Signature · 1 line
Kees Cook
maintainer Acked-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] kbuild: use more subdir- for visiting subdirectories while cleaning

In reply to Masahiro Yamada
Quoted 8 lines · Masahiro Yamada

Documentation/kbuild/makefiles.rst suggests to use "archclean" for cleaning arch/$(SRCARCH)/boot/.

Since commit d92cc4d51643 ("kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild"), we can use the "subdir- += boot" trick for all architectures. This can take advantage of the parallel option (-j) for "make clean".

Quoted 5 lines

I also cleaned up the comments. The "archdep" target does not exist.

 arch/m68k/Makefile                 |  4 +---

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
reviewer Acked-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] kbuild: use more subdir- for visiting subdirectories while cleaning

In reply to Masahiro Yamada
Quoted 1 line · Masahiro Yamada

...

Quoted 5 lines
arch/powerpc/Makefile +0 -0
index aa6808e70647..b61d8be3c226 100644

arch/powerpc/Makefile install: · line 414

Quoted 9 lines
arch/powerpc/Makefile +0 -3
@@ -411,9 +409,6 @@ install:
 	sh -x $(srctree)/$(boot)/install.sh "$(KERNELRELEASE)" vmlinux \
 	System.map "$(INSTALL_PATH)"
 
-archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
-
 ifeq ($(KBUILD_EXTMOD),)
 # We need to generate vdso-offsets.h before compiling certain files in kernel/.
 # In order to do that, we should use the archprepare target, but we can't since

Seems to work.

cheers