summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-11-13 11:29:35 +0100
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-11-16 01:07:34 +0100
commit2982c953570b2bced858613d70443c2c6a90587b (patch)
tree95ec17379f0339fff06259c978c287997e0ed890 /scripts
parentkbuild: create directory for make cache only when necessary (diff)
downloadlinux-2982c953570b2bced858613d70443c2c6a90587b.tar.xz
linux-2982c953570b2bced858613d70443c2c6a90587b.zip
kbuild: remove redundant $(wildcard ...) for cmd_files calculation
I do not see any reason why $(wildcard ...) needs to be called twice for computing cmd_files. Remove the first one. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.build3
-rw-r--r--scripts/Makefile.headersinst3
-rw-r--r--scripts/Makefile.modpost3
3 files changed, 3 insertions, 6 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 061d0c3a420a..62d5314c3b71 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -583,8 +583,7 @@ FORCE:
# optimization, we don't need to read them if the target does not
# exist, we will rebuild anyway in that case.
-targets := $(wildcard $(sort $(targets)))
-cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
+cmd_files := $(wildcard $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd))
ifneq ($(cmd_files),)
include $(cmd_files)
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 5692d7a66163..c6fb2b75d813 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -114,9 +114,8 @@ $(check-file): scripts/headers_check.pl $(output-files) FORCE
endif
-targets := $(wildcard $(sort $(targets)))
cmd_files := $(wildcard \
- $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
+ $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd))
ifneq ($(cmd_files),)
include $(cmd_files)
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 16923ba4b5b1..cf125c11ca41 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -143,8 +143,7 @@ FORCE:
# optimization, we don't need to read them if the target does not
# exist, we will rebuild anyway in that case.
-targets := $(wildcard $(sort $(targets)))
-cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
+cmd_files := $(wildcard $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd))
ifneq ($(cmd_files),)
include $(cmd_files)