]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ARM: 9084/1: simplify the build rule of mach-types.h
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 28 May 2021 03:52:09 +0000 (04:52 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 7 Jun 2021 11:56:21 +0000 (12:56 +0100)
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>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/tools/Makefile

index 87de1f63f649643645d0a33c8d85474c6aa28f2d..057639019059e0f0a799c1b04776db641b9b9902 100644 (file)
@@ -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)