Skip to content

Commit 2982c95

Browse files
committed
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 <[email protected]>
1 parent 9a234a2 commit 2982c95

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,8 +1693,7 @@ cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR) \
16931693

16941694
# read all saved command lines
16951695

1696-
targets := $(wildcard $(sort $(targets)))
1697-
cmd_files := $(wildcard .*.cmd $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
1696+
cmd_files := $(wildcard .*.cmd $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd))
16981697

16991698
ifneq ($(cmd_files),)
17001699
$(cmd_files): ; # Do not try to update included dependency files

scripts/Makefile.build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,7 @@ FORCE:
583583
# optimization, we don't need to read them if the target does not
584584
# exist, we will rebuild anyway in that case.
585585

586-
targets := $(wildcard $(sort $(targets)))
587-
cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
586+
cmd_files := $(wildcard $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd))
588587

589588
ifneq ($(cmd_files),)
590589
include $(cmd_files)

scripts/Makefile.headersinst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,8 @@ $(check-file): scripts/headers_check.pl $(output-files) FORCE
114114

115115
endif
116116

117-
targets := $(wildcard $(sort $(targets)))
118117
cmd_files := $(wildcard \
119-
$(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
118+
$(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd))
120119

121120
ifneq ($(cmd_files),)
122121
include $(cmd_files)

scripts/Makefile.modpost

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ FORCE:
143143
# optimization, we don't need to read them if the target does not
144144
# exist, we will rebuild anyway in that case.
145145

146-
targets := $(wildcard $(sort $(targets)))
147-
cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
146+
cmd_files := $(wildcard $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd))
148147

149148
ifneq ($(cmd_files),)
150149
include $(cmd_files)

0 commit comments

Comments
 (0)