From 8212f8986d311ccf6a72305e6bdbd814691701d6 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 13 Oct 2021 15:36:22 +0900 Subject: kbuild: use more subdir- for visiting subdirectories while cleaning Documentation/kbuild/makefiles.rst suggests to use "archclean" for cleaning arch/$(SRCARCH)/boot/, but it is not a hard requirement. 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 in arch/$(SRCARCH)/Makefile. The "archdep" target no longer exists. Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook Acked-by: Geert Uytterhoeven Acked-by: Michael Ellerman (powerpc) --- Documentation/kbuild/makefiles.rst | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'Documentation') diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst index db3af0b45baf..b008b90b92c9 100644 --- a/Documentation/kbuild/makefiles.rst +++ b/Documentation/kbuild/makefiles.rst @@ -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". -- cgit v1.2.3-70-g09d2