Skip to content

Commit 125d059

Browse files
committed
kbuild: do not descend to ./Kbuild when cleaning
'make clean' descends into ./Kbuild, but does not clean anything since everything is added to no-clean-files. There is no need to descend to ./Kbuild in the first place. We can drop the no-clean-files assignment. With this, there is no more user of no-clean-files. I will keep it for a while to see whether a new user will appear. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
1 parent d082402 commit 125d059

3 files changed

Lines changed: 1 addition & 10 deletions

File tree

Documentation/kbuild/makefiles.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -787,12 +787,6 @@ This will delete the directory debian in the toplevel directory, including all
787787
subdirectories.
788788

789789
To exclude certain files from make clean, use the $(no-clean-files) variable.
790-
This is only a special case used in the top level Kbuild file:
791-
792-
Example::
793-
794-
#Kbuild
795-
no-clean-files := $(bounds-file) $(offsets-file)
796790

797791
Usually kbuild descends down in subdirectories due to "obj-* := dir/",
798792
but in the architecture makefiles where the kbuild infrastructure

Kbuild

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,3 @@ quiet_cmd_atomics = CALL $<
5757

5858
old-atomics: scripts/atomic/check-atomics.sh FORCE
5959
$(call cmd,atomics)
60-
61-
# Keep these three files during make clean
62-
no-clean-files := $(bounds-file) $(offsets-file) $(timeconst-file)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,7 @@ DISTCLEAN_FILES += tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
13961396
#
13971397
clean: rm-dirs := $(CLEAN_DIRS)
13981398
clean: rm-files := $(CLEAN_FILES)
1399-
clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs))
1399+
clean-dirs := $(addprefix _clean_, $(vmlinux-alldirs))
14001400

14011401
PHONY += $(clean-dirs) clean archclean vmlinuxclean
14021402
$(clean-dirs):

0 commit comments

Comments
 (0)