[PATCH] ARM: simplify the build rule of mach-types.h

Subsystems: arm port, the rest

STALE1931d

3 messages, 2 authors, 2021-05-28 · open the first message on its own page

[PATCH] ARM: simplify the build rule of mach-types.h

From: Masahiro Yamada <masahiroy@kernel.org>
Date: 2021-05-28 03:53:56

The directory of mach-types.h is created a couple of lines above:

  _dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') \

The 'mkdir -p' command is redundant.

scripts/Kbuild.include defines real-prereqs as a shorthand for
$(filter-out $(PHONY),$^). Let's use it to simplify the code.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

KernelVersion: v5.13-rc1

 arch/arm/tools/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile
index 87de1f63f649..057639019059 100644
--- a/arch/arm/tools/Makefile
+++ b/arch/arm/tools/Makefile
@@ -33,8 +33,7 @@ _dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') \
           $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)')
 
 quiet_cmd_gen_mach = GEN     $@
-      cmd_gen_mach = mkdir -p $(dir $@) && \
-		     $(AWK) -f $(filter-out $(PHONY),$^) > $@
+      cmd_gen_mach = $(AWK) -f $(real-prereqs) > $@
 
 $(kapi)/mach-types.h: $(src)/gen-mach-types $(src)/mach-types FORCE
 	$(call if_changed,gen_mach)
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH] ARM: simplify the build rule of mach-types.h

From: Linus Walleij <hidden>
Date: 2021-05-28 08:24:24

On Fri, May 28, 2021 at 5:52 AM Masahiro Yamada [off-list ref] wrote:
The directory of mach-types.h is created a couple of lines above:

  _dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') \

The 'mkdir -p' command is redundant.

scripts/Kbuild.include defines real-prereqs as a shorthand for
$(filter-out $(PHONY),$^). Let's use it to simplify the code.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Linus Walleij <redacted>

Can you put this into Russell's patch tracker or shall I sign
it off and put it there?

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH] ARM: simplify the build rule of mach-types.h

From: Masahiro Yamada <masahiroy@kernel.org>
Date: 2021-05-28 09:16:13

On Fri, May 28, 2021 at 5:24 PM Linus Walleij [off-list ref] wrote:
On Fri, May 28, 2021 at 5:52 AM Masahiro Yamada [off-list ref] wrote:
quoted
The directory of mach-types.h is created a couple of lines above:

  _dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') \

The 'mkdir -p' command is redundant.

scripts/Kbuild.include defines real-prereqs as a shorthand for
$(filter-out $(PHONY),$^). Let's use it to simplify the code.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Linus Walleij <redacted>

Can you put this into Russell's patch tracker or shall I sign
it off and put it there?

I sent this to patches@arm.linux.org.uk

It is already there.
https://www.arm.linux.org.uk/developer/patches/section.php?section=0



-- 
Best Regards
Masahiro Yamada

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help