[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210504101058.96498-1-masahiroy@kernel.org>
Date: Tue, 4 May 2021 19:10:56 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: linux-kbuild@...r.kernel.org
Cc: Masahiro Yamada <masahiroy@...nel.org>,
Michal Marek <michal.lkml@...kovi.net>,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/3] kbuild: make distclean work against $(objtree) instead of $(srctree)
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@...nel.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
Powered by blists - more mailing lists