Skip to content

Commit 7a02cec

Browse files
committed
kbuild: make distclean remove tag files in sub-directories
'make tags' and friends create tag files in the top directory, but people may manually create tag files in sub-directories. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 19c8d91 commit 7a02cec

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Makefile

+2-7
Original file line numberDiff line numberDiff line change
@@ -1511,9 +1511,6 @@ MRPROPER_FILES += include/config include/generated \
15111511
signing_key.x509.signer vmlinux-gdb.py \
15121512
*.spec
15131513

1514-
# Directories & files removed with 'make distclean'
1515-
DISTCLEAN_FILES += tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
1516-
15171514
# clean - Delete most, but leave enough to build external modules
15181515
#
15191516
clean: rm-files := $(CLEAN_FILES)
@@ -1540,16 +1537,14 @@ mrproper: clean $(mrproper-dirs)
15401537

15411538
# distclean
15421539
#
1543-
distclean: rm-files := $(wildcard $(DISTCLEAN_FILES))
1544-
15451540
PHONY += distclean
15461541

15471542
distclean: mrproper
1548-
$(call cmd,rmfiles)
15491543
@find . $(RCS_FIND_IGNORE) \
15501544
\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
15511545
-o -name '*.bak' -o -name '#*#' -o -name '*%' \
1552-
-o -name 'core' \) \
1546+
-o -name 'core' -o -name tags -o -name TAGS -o -name 'cscope*' \
1547+
-o -name GPATH -o -name GRTAGS -o -name GSYMS -o -name GTAGS \) \
15531548
-type f -print | xargs rm -f
15541549

15551550

0 commit comments

Comments
 (0)