* [PATCH 1/3] kbuild: make distclean work against $(objtree) instead of $(srctree)
@ 2021-05-04 10:10 Masahiro Yamada
2021-05-04 10:10 ` [PATCH 2/3] kbuild: make distclean remove tag files in sub-directories Masahiro Yamada
2021-05-04 10:10 ` [PATCH 3/3] kbuild: remove the unneeded comments for external module builds Masahiro Yamada
0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2021-05-04 10:10 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel
This reverts the old commit [1], which seems questionable to me.
It claimed 'make distclean' could not remove editor backup files,
but I believe KBUILD_OUTPUT or O= was set.
When O= is given, Kbuild should always work against $(objtree).
If O= is not given, $(objtree) and $(srctree) are the same, therefore
$(srctree) is cleaned up.
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=dd47df980c02eb33833b2690b033c34fba2fa80d
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index cbf4b18cf51c..560408808c33 100644
--- a/Makefile
+++ b/Makefile
@@ -1546,7 +1546,7 @@ PHONY += distclean
distclean: mrproper
$(call cmd,rmfiles)
- @find $(srctree) $(RCS_FIND_IGNORE) \
+ @find . $(RCS_FIND_IGNORE) \
\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
-o -name '*.bak' -o -name '#*#' -o -name '*%' \
-o -name 'core' \) \
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/3] kbuild: make distclean remove tag files in sub-directories
2021-05-04 10:10 [PATCH 1/3] kbuild: make distclean work against $(objtree) instead of $(srctree) Masahiro Yamada
@ 2021-05-04 10:10 ` Masahiro Yamada
2021-05-04 10:10 ` [PATCH 3/3] kbuild: remove the unneeded comments for external module builds Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2021-05-04 10:10 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel
'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 <masahiroy@kernel.org>
---
Makefile | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index 560408808c33..2cbf68dc40b7 100644
--- a/Makefile
+++ b/Makefile
@@ -1511,9 +1511,6 @@ MRPROPER_FILES += include/config include/generated \
signing_key.x509.signer vmlinux-gdb.py \
*.spec
-# Directories & files removed with 'make distclean'
-DISTCLEAN_FILES += tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
-
# clean - Delete most, but leave enough to build external modules
#
clean: rm-files := $(CLEAN_FILES)
@@ -1540,16 +1537,14 @@ mrproper: clean $(mrproper-dirs)
# distclean
#
-distclean: rm-files := $(wildcard $(DISTCLEAN_FILES))
-
PHONY += distclean
distclean: mrproper
- $(call cmd,rmfiles)
@find . $(RCS_FIND_IGNORE) \
\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
-o -name '*.bak' -o -name '#*#' -o -name '*%' \
- -o -name 'core' \) \
+ -o -name 'core' -o -name tags -o -name TAGS -o -name 'cscope*' \
+ -o -name GPATH -o -name GRTAGS -o -name GSYMS -o -name GTAGS \) \
-type f -print | xargs rm -f
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] kbuild: remove the unneeded comments for external module builds
2021-05-04 10:10 [PATCH 1/3] kbuild: make distclean work against $(objtree) instead of $(srctree) Masahiro Yamada
2021-05-04 10:10 ` [PATCH 2/3] kbuild: make distclean remove tag files in sub-directories Masahiro Yamada
@ 2021-05-04 10:10 ` Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2021-05-04 10:10 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel
The supported targets for external modules are listed in the help target
a few lines below. Let's not have duplicated information in two places.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Makefile | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
index 2cbf68dc40b7..9b9a003bd88f 100644
--- a/Makefile
+++ b/Makefile
@@ -1711,17 +1711,7 @@ else # KBUILD_EXTMOD
# When building external modules the kernel used as basis is considered
# read-only, and no consistency checks are made and the make
# system is not used on the basis kernel. If updates are required
-# in the basis kernel ordinary make commands (without M=...) must
-# be used.
-#
-# The following are the only valid targets when building external
-# modules.
-# make M=dir clean Delete all automatically generated files
-# make M=dir modules Make all modules in specified dir
-# make M=dir Same as 'make M=dir modules'
-# make M=dir modules_install
-# Install the modules built in the module directory
-# Assumes install directory is already created
+# in the basis kernel ordinary make commands (without M=...) must be used.
# We are always building only modules.
KBUILD_BUILTIN :=
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-04 10:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 10:10 [PATCH 1/3] kbuild: make distclean work against $(objtree) instead of $(srctree) Masahiro Yamada
2021-05-04 10:10 ` [PATCH 2/3] kbuild: make distclean remove tag files in sub-directories Masahiro Yamada
2021-05-04 10:10 ` [PATCH 3/3] kbuild: remove the unneeded comments for external module builds Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).