ARM: visit mach-* and plat-* directories when cleaning
diff mbox series

Message ID 20190718163523.18842-1-yamada.masahiro@socionext.com
State Mainlined
Commit 2a58e142a67411f51830028f7f07c69e619dec5e
Headers show
Series
  • ARM: visit mach-* and plat-* directories when cleaning
Related show

Commit Message

Masahiro Yamada July 18, 2019, 4:35 p.m. UTC
When you run "make clean" for arm, it never visits mach-* or plat-*
directories because machine-y and plat-y are just empty.

When cleaning, all machine, plat directories are accumulated to
machine-, plat-, respectively. So, let's pass them to core- to
clean up those directories.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

KernelVersion: v5.3-rc1

 arch/arm/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Russell King - ARM Linux admin July 25, 2019, 4:46 p.m. UTC | #1
On Fri, Jul 19, 2019 at 01:35:23AM +0900, Masahiro Yamada wrote:
> When you run "make clean" for arm, it never visits mach-* or plat-*
> directories because machine-y and plat-y are just empty.
> 
> When cleaning, all machine, plat directories are accumulated to
> machine-, plat-, respectively. So, let's pass them to core- to
> clean up those directories.

You don't say what actual, real-life issue this patch is solving.
Which files are left behind by a "make clean" ?

From what I can see, this only matters if there are extra files that
are generated (and have set extra-* or clean-*).  Everything else is
cleaned up via the big find command in the top level makefile.

Or is this a "it would be nice if..." patch?

> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> 
> KernelVersion: v5.3-rc1
> 
>  arch/arm/Makefile | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 792f7fa16a24..c3eb0d9a2fdd 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -286,6 +286,10 @@ core-y				+= arch/arm/net/
>  core-y				+= arch/arm/crypto/
>  core-y				+= $(machdirs) $(platdirs)
>  
> +# For cleaning
> +core-				+= $(patsubst %,arch/arm/mach-%/, $(machine-))
> +core-				+= $(patsubst %,arch/arm/plat-%/, $(plat-))
> +
>  drivers-$(CONFIG_OPROFILE)      += arch/arm/oprofile/
>  
>  libs-y				:= arch/arm/lib/ $(libs-y)
> -- 
> 2.17.1
> 
>
Masahiro Yamada July 26, 2019, 12:20 a.m. UTC | #2
On Fri, Jul 26, 2019 at 1:46 AM Russell King - ARM Linux admin
<linux@armlinux.org.uk> wrote:
>
> On Fri, Jul 19, 2019 at 01:35:23AM +0900, Masahiro Yamada wrote:
> > When you run "make clean" for arm, it never visits mach-* or plat-*
> > directories because machine-y and plat-y are just empty.
> >
> > When cleaning, all machine, plat directories are accumulated to
> > machine-, plat-, respectively. So, let's pass them to core- to
> > clean up those directories.
>
> You don't say what actual, real-life issue this patch is solving.
> Which files are left behind by a "make clean" ?
>
> From what I can see, this only matters if there are extra files that
> are generated (and have set extra-* or clean-*).  Everything else is
> cleaned up via the big find command in the top level makefile.
>
> Or is this a "it would be nice if..." patch?
>

This is a prerequisite for the following:

https://lore.kernel.org/patchwork/patch/1059150/
https://lore.kernel.org/patchwork/patch/1059149/

If this patch lands in upstream, I will resend them.


The motivation of the two is to avoid unneeded
re-compilation of kernel/kheaders_data.tar.xz

This is a race condition between
scripts/gen_kheaders.sh and arch/arm/mach-{at91,omap2}/Makefile

Patch
diff mbox series

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 792f7fa16a24..c3eb0d9a2fdd 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -286,6 +286,10 @@  core-y				+= arch/arm/net/
 core-y				+= arch/arm/crypto/
 core-y				+= $(machdirs) $(platdirs)
 
+# For cleaning
+core-				+= $(patsubst %,arch/arm/mach-%/, $(machine-))
+core-				+= $(patsubst %,arch/arm/plat-%/, $(plat-))
+
 drivers-$(CONFIG_OPROFILE)      += arch/arm/oprofile/
 
 libs-y				:= arch/arm/lib/ $(libs-y)