Skip to content

Commit 6ba3bcb

Browse files
committed
kbuild: move subdir-obj-y to scripts/Makefile.build
Save $(addprefix ...) for subdir-obj-y. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent b480fec commit 6ba3bcb

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

‎scripts/Makefile.build‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ endif
6969

7070
# ===========================================================================
7171

72+
subdir-obj-y := $(filter %/built-in.a, $(real-obj-y))
73+
7274
ifneq ($(strip $(lib-y) $(lib-m) $(lib-)),)
7375
lib-target := $(obj)/lib.a
7476
endif

‎scripts/Makefile.lib‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m
6262
multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)) $($(m:.o=-))), $(m))))
6363
multi-used := $(multi-used-y) $(multi-used-m)
6464

65-
# $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to
66-
# tell kbuild to descend
67-
subdir-obj-y := $(filter %/built-in.a, $(obj-y))
68-
6965
# Replace multi-part objects by their individual parts,
7066
# including built-in.a from subdirectories
7167
real-obj-y := $(foreach m, $(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m)))
@@ -91,7 +87,6 @@ targets := $(addprefix $(obj)/,$(targets))
9187
modorder := $(addprefix $(obj)/,$(modorder))
9288
obj-m := $(addprefix $(obj)/,$(obj-m))
9389
lib-y := $(addprefix $(obj)/,$(lib-y))
94-
subdir-obj-y := $(addprefix $(obj)/,$(subdir-obj-y))
9590
real-obj-y := $(addprefix $(obj)/,$(real-obj-y))
9691
real-obj-m := $(addprefix $(obj)/,$(real-obj-m))
9792
multi-used-m := $(addprefix $(obj)/,$(multi-used-m))

0 commit comments

Comments
 (0)