Skip to content

Commit

Permalink
ARM: 9084/1: simplify the build rule of mach-types.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Masahiro Yamada authored and Russell King (Oracle) committed Jun 7, 2021
1 parent 4716e2e commit 6073882
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/arm/tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6073882

Please sign in to comment.