* [PATCH] kbuild: drop $(objtree)/ prefix support for clean-files
@ 2022-04-30 11:04 ` Masahiro Yamada
0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2022-04-30 11:04 UTC (permalink / raw)
To: linux-kbuild
Cc: linux-kernel, Masahiro Yamada, Benjamin Herrenschmidt,
Cédric Le Goater, Joel Stanley, Michael Ellerman,
Michal Marek, Nicholas Piggin, Nick Desaulniers, Paul Gortmaker,
Paul Mackerras, linuxppc-dev
I think this hack is a bad idea. arch/powerpc/boot/Makefile is the
only user. Let's stop doing this.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/powerpc/boot/Makefile | 4 ++--
scripts/Makefile.clean | 8 +-------
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 4b4827c475c6..008bf0bff186 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -453,8 +453,8 @@ clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
clean-kernel-base := vmlinux.strip vmlinux.bin
clean-kernel := $(addsuffix .gz,$(clean-kernel-base))
clean-kernel += $(addsuffix .xz,$(clean-kernel-base))
-# If not absolute clean-files are relative to $(obj).
-clean-files += $(addprefix $(objtree)/, $(clean-kernel))
+# clean-files are relative to $(obj).
+clean-files += $(addprefix ../../../, $(clean-kernel))
WRAPPER_OBJDIR := /usr/lib/kernel-wrapper
WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
index 74cb1c5c3658..878cec648959 100644
--- a/scripts/Makefile.clean
+++ b/scripts/Makefile.clean
@@ -36,13 +36,7 @@ __clean-files := \
__clean-files := $(filter-out $(no-clean-files), $(__clean-files))
-# clean-files is given relative to the current directory, unless it
-# starts with $(objtree)/ (which means "./", so do not add "./" unless
-# you want to delete a file from the toplevel object directory).
-
-__clean-files := $(wildcard \
- $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(__clean-files))) \
- $(filter $(objtree)/%, $(__clean-files)))
+__clean-files := $(wildcard $(addprefix $(obj)/, $(__clean-files)))
# ==========================================================================
--
2.32.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] kbuild: drop $(objtree)/ prefix support for clean-files
@ 2022-04-30 11:04 ` Masahiro Yamada
0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2022-04-30 11:04 UTC (permalink / raw)
To: linux-kbuild
Cc: Michal Marek, Masahiro Yamada, Nick Desaulniers, linux-kernel,
Nicholas Piggin, Paul Gortmaker, Paul Mackerras, Joel Stanley,
linuxppc-dev, Cédric Le Goater
I think this hack is a bad idea. arch/powerpc/boot/Makefile is the
only user. Let's stop doing this.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/powerpc/boot/Makefile | 4 ++--
scripts/Makefile.clean | 8 +-------
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 4b4827c475c6..008bf0bff186 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -453,8 +453,8 @@ clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
clean-kernel-base := vmlinux.strip vmlinux.bin
clean-kernel := $(addsuffix .gz,$(clean-kernel-base))
clean-kernel += $(addsuffix .xz,$(clean-kernel-base))
-# If not absolute clean-files are relative to $(obj).
-clean-files += $(addprefix $(objtree)/, $(clean-kernel))
+# clean-files are relative to $(obj).
+clean-files += $(addprefix ../../../, $(clean-kernel))
WRAPPER_OBJDIR := /usr/lib/kernel-wrapper
WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
index 74cb1c5c3658..878cec648959 100644
--- a/scripts/Makefile.clean
+++ b/scripts/Makefile.clean
@@ -36,13 +36,7 @@ __clean-files := \
__clean-files := $(filter-out $(no-clean-files), $(__clean-files))
-# clean-files is given relative to the current directory, unless it
-# starts with $(objtree)/ (which means "./", so do not add "./" unless
-# you want to delete a file from the toplevel object directory).
-
-__clean-files := $(wildcard \
- $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(__clean-files))) \
- $(filter $(objtree)/%, $(__clean-files)))
+__clean-files := $(wildcard $(addprefix $(obj)/, $(__clean-files)))
# ==========================================================================
--
2.32.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] kbuild: drop $(objtree)/ prefix support for clean-files
2022-04-30 11:04 ` Masahiro Yamada
@ 2022-05-01 11:57 ` Michael Ellerman
-1 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2022-05-01 11:57 UTC (permalink / raw)
To: Masahiro Yamada, linux-kbuild
Cc: linux-kernel, Masahiro Yamada, Benjamin Herrenschmidt,
Cédric Le Goater, Joel Stanley, Michal Marek,
Nicholas Piggin, Nick Desaulniers, Paul Gortmaker,
Paul Mackerras, linuxppc-dev
Masahiro Yamada <masahiroy@kernel.org> writes:
> I think this hack is a bad idea. arch/powerpc/boot/Makefile is the
> only user. Let's stop doing this.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> arch/powerpc/boot/Makefile | 4 ++--
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
cheers
> scripts/Makefile.clean | 8 +-------
> 2 files changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> index 4b4827c475c6..008bf0bff186 100644
> --- a/arch/powerpc/boot/Makefile
> +++ b/arch/powerpc/boot/Makefile
> @@ -453,8 +453,8 @@ clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
> clean-kernel-base := vmlinux.strip vmlinux.bin
> clean-kernel := $(addsuffix .gz,$(clean-kernel-base))
> clean-kernel += $(addsuffix .xz,$(clean-kernel-base))
> -# If not absolute clean-files are relative to $(obj).
> -clean-files += $(addprefix $(objtree)/, $(clean-kernel))
> +# clean-files are relative to $(obj).
> +clean-files += $(addprefix ../../../, $(clean-kernel))
>
> WRAPPER_OBJDIR := /usr/lib/kernel-wrapper
> WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
> diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
> index 74cb1c5c3658..878cec648959 100644
> --- a/scripts/Makefile.clean
> +++ b/scripts/Makefile.clean
> @@ -36,13 +36,7 @@ __clean-files := \
>
> __clean-files := $(filter-out $(no-clean-files), $(__clean-files))
>
> -# clean-files is given relative to the current directory, unless it
> -# starts with $(objtree)/ (which means "./", so do not add "./" unless
> -# you want to delete a file from the toplevel object directory).
> -
> -__clean-files := $(wildcard \
> - $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(__clean-files))) \
> - $(filter $(objtree)/%, $(__clean-files)))
> +__clean-files := $(wildcard $(addprefix $(obj)/, $(__clean-files)))
>
> # ==========================================================================
>
> --
> 2.32.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kbuild: drop $(objtree)/ prefix support for clean-files
@ 2022-05-01 11:57 ` Michael Ellerman
0 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2022-05-01 11:57 UTC (permalink / raw)
To: Masahiro Yamada, linux-kbuild
Cc: Michal Marek, Masahiro Yamada, Nick Desaulniers, linux-kernel,
Nicholas Piggin, Paul Gortmaker, Paul Mackerras, Joel Stanley,
linuxppc-dev, Cédric Le Goater
Masahiro Yamada <masahiroy@kernel.org> writes:
> I think this hack is a bad idea. arch/powerpc/boot/Makefile is the
> only user. Let's stop doing this.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> arch/powerpc/boot/Makefile | 4 ++--
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
cheers
> scripts/Makefile.clean | 8 +-------
> 2 files changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> index 4b4827c475c6..008bf0bff186 100644
> --- a/arch/powerpc/boot/Makefile
> +++ b/arch/powerpc/boot/Makefile
> @@ -453,8 +453,8 @@ clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
> clean-kernel-base := vmlinux.strip vmlinux.bin
> clean-kernel := $(addsuffix .gz,$(clean-kernel-base))
> clean-kernel += $(addsuffix .xz,$(clean-kernel-base))
> -# If not absolute clean-files are relative to $(obj).
> -clean-files += $(addprefix $(objtree)/, $(clean-kernel))
> +# clean-files are relative to $(obj).
> +clean-files += $(addprefix ../../../, $(clean-kernel))
>
> WRAPPER_OBJDIR := /usr/lib/kernel-wrapper
> WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
> diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
> index 74cb1c5c3658..878cec648959 100644
> --- a/scripts/Makefile.clean
> +++ b/scripts/Makefile.clean
> @@ -36,13 +36,7 @@ __clean-files := \
>
> __clean-files := $(filter-out $(no-clean-files), $(__clean-files))
>
> -# clean-files is given relative to the current directory, unless it
> -# starts with $(objtree)/ (which means "./", so do not add "./" unless
> -# you want to delete a file from the toplevel object directory).
> -
> -__clean-files := $(wildcard \
> - $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(__clean-files))) \
> - $(filter $(objtree)/%, $(__clean-files)))
> +__clean-files := $(wildcard $(addprefix $(obj)/, $(__clean-files)))
>
> # ==========================================================================
>
> --
> 2.32.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kbuild: drop $(objtree)/ prefix support for clean-files
2022-05-01 11:57 ` Michael Ellerman
@ 2022-05-03 2:01 ` Masahiro Yamada
-1 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2022-05-03 2:01 UTC (permalink / raw)
To: Michael Ellerman
Cc: Linux Kbuild mailing list, Linux Kernel Mailing List,
Benjamin Herrenschmidt, Cédric Le Goater, Joel Stanley,
Michal Marek, Nicholas Piggin, Nick Desaulniers, Paul Gortmaker,
Paul Mackerras, linuxppc-dev
On Sun, May 1, 2022 at 8:57 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Masahiro Yamada <masahiroy@kernel.org> writes:
> > I think this hack is a bad idea. arch/powerpc/boot/Makefile is the
> > only user. Let's stop doing this.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> > arch/powerpc/boot/Makefile | 4 ++--
>
> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
>
> cheers
>
Applied to linux-kbuild.
> > scripts/Makefile.clean | 8 +-------
> > 2 files changed, 3 insertions(+), 9 deletions(-)
> >
> > diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> > index 4b4827c475c6..008bf0bff186 100644
> > --- a/arch/powerpc/boot/Makefile
> > +++ b/arch/powerpc/boot/Makefile
> > @@ -453,8 +453,8 @@ clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
> > clean-kernel-base := vmlinux.strip vmlinux.bin
> > clean-kernel := $(addsuffix .gz,$(clean-kernel-base))
> > clean-kernel += $(addsuffix .xz,$(clean-kernel-base))
> > -# If not absolute clean-files are relative to $(obj).
> > -clean-files += $(addprefix $(objtree)/, $(clean-kernel))
> > +# clean-files are relative to $(obj).
> > +clean-files += $(addprefix ../../../, $(clean-kernel))
> >
> > WRAPPER_OBJDIR := /usr/lib/kernel-wrapper
> > WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
> > diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
> > index 74cb1c5c3658..878cec648959 100644
> > --- a/scripts/Makefile.clean
> > +++ b/scripts/Makefile.clean
> > @@ -36,13 +36,7 @@ __clean-files := \
> >
> > __clean-files := $(filter-out $(no-clean-files), $(__clean-files))
> >
> > -# clean-files is given relative to the current directory, unless it
> > -# starts with $(objtree)/ (which means "./", so do not add "./" unless
> > -# you want to delete a file from the toplevel object directory).
> > -
> > -__clean-files := $(wildcard \
> > - $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(__clean-files))) \
> > - $(filter $(objtree)/%, $(__clean-files)))
> > +__clean-files := $(wildcard $(addprefix $(obj)/, $(__clean-files)))
> >
> > # ==========================================================================
> >
> > --
> > 2.32.0
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kbuild: drop $(objtree)/ prefix support for clean-files
@ 2022-05-03 2:01 ` Masahiro Yamada
0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2022-05-03 2:01 UTC (permalink / raw)
To: Michael Ellerman
Cc: Michal Marek, Linux Kbuild mailing list, Nick Desaulniers,
Linux Kernel Mailing List, Nicholas Piggin, Paul Gortmaker,
Paul Mackerras, Cédric Le Goater, linuxppc-dev,
Joel Stanley
On Sun, May 1, 2022 at 8:57 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Masahiro Yamada <masahiroy@kernel.org> writes:
> > I think this hack is a bad idea. arch/powerpc/boot/Makefile is the
> > only user. Let's stop doing this.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> > arch/powerpc/boot/Makefile | 4 ++--
>
> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
>
> cheers
>
Applied to linux-kbuild.
> > scripts/Makefile.clean | 8 +-------
> > 2 files changed, 3 insertions(+), 9 deletions(-)
> >
> > diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> > index 4b4827c475c6..008bf0bff186 100644
> > --- a/arch/powerpc/boot/Makefile
> > +++ b/arch/powerpc/boot/Makefile
> > @@ -453,8 +453,8 @@ clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
> > clean-kernel-base := vmlinux.strip vmlinux.bin
> > clean-kernel := $(addsuffix .gz,$(clean-kernel-base))
> > clean-kernel += $(addsuffix .xz,$(clean-kernel-base))
> > -# If not absolute clean-files are relative to $(obj).
> > -clean-files += $(addprefix $(objtree)/, $(clean-kernel))
> > +# clean-files are relative to $(obj).
> > +clean-files += $(addprefix ../../../, $(clean-kernel))
> >
> > WRAPPER_OBJDIR := /usr/lib/kernel-wrapper
> > WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
> > diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
> > index 74cb1c5c3658..878cec648959 100644
> > --- a/scripts/Makefile.clean
> > +++ b/scripts/Makefile.clean
> > @@ -36,13 +36,7 @@ __clean-files := \
> >
> > __clean-files := $(filter-out $(no-clean-files), $(__clean-files))
> >
> > -# clean-files is given relative to the current directory, unless it
> > -# starts with $(objtree)/ (which means "./", so do not add "./" unless
> > -# you want to delete a file from the toplevel object directory).
> > -
> > -__clean-files := $(wildcard \
> > - $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(__clean-files))) \
> > - $(filter $(objtree)/%, $(__clean-files)))
> > +__clean-files := $(wildcard $(addprefix $(obj)/, $(__clean-files)))
> >
> > # ==========================================================================
> >
> > --
> > 2.32.0
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-05-03 2:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-30 11:04 [PATCH] kbuild: drop $(objtree)/ prefix support for clean-files Masahiro Yamada
2022-04-30 11:04 ` Masahiro Yamada
2022-05-01 11:57 ` Michael Ellerman
2022-05-01 11:57 ` Michael Ellerman
2022-05-03 2:01 ` Masahiro Yamada
2022-05-03 2:01 ` Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.