Skip to content

Commit

Permalink
kbuild: rename multi-used-* to multi-obj-*
Browse files Browse the repository at this point in the history
I think multi-obj-* is clearer, and more consistent with real-obj-*.

Rename as follows:

  multi-used-y  ->  multi-obj-y
  multi-used-m  ->  multi-obj-m
  multi-used    ->  multi-obj-ym

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
  • Loading branch information
Masahiro Yamada committed Apr 24, 2021
1 parent 0b956e2 commit a6601e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions scripts/Makefile.build
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,11 @@ quiet_cmd_link_multi-m = LD [M] $@
cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter %.o,$^)
endif

$(multi-used-m): FORCE
$(multi-obj-m): FORCE
$(call if_changed,link_multi-m)
$(call multi_depend, $(multi-used-m), .o, -objs -y -m)
$(call multi_depend, $(multi-obj-m), .o, -objs -y -m)

targets += $(multi-used-m)
targets += $(multi-obj-m)
targets := $(filter-out $(PHONY), $(targets))

# Add intermediate targets:
Expand Down
10 changes: 5 additions & 5 deletions scripts/Makefile.lib
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ endif
suffix-search = $(foreach s,$(2),$($(1:.o=$s)))
# If $(foo-objs), $(foo-y), $(foo-m), or $(foo-) exists, foo.o is a composite object
multi-search = $(sort $(foreach m,$(1), $(if $(strip $(call suffix-search,$(m),$(2) -)), $(m))))
multi-used-y := $(call multi-search,$(obj-y),-objs -y)
multi-used-m := $(call multi-search,$(obj-m),-objs -y -m)
multi-used := $(multi-used-y) $(multi-used-m)
multi-obj-y := $(call multi-search,$(obj-y),-objs -y)
multi-obj-m := $(call multi-search,$(obj-m),-objs -y -m)
multi-obj-ym := $(multi-obj-y) $(multi-obj-m)

# Replace multi-part objects by their individual parts,
# including built-in.a from subdirectories
Expand Down Expand Up @@ -92,12 +92,12 @@ obj-m := $(addprefix $(obj)/,$(obj-m))
lib-y := $(addprefix $(obj)/,$(lib-y))
real-obj-y := $(addprefix $(obj)/,$(real-obj-y))
real-obj-m := $(addprefix $(obj)/,$(real-obj-m))
multi-used-m := $(addprefix $(obj)/,$(multi-used-m))
multi-obj-m := $(addprefix $(obj)/, $(multi-obj-m))
subdir-ym := $(addprefix $(obj)/,$(subdir-ym))

# Finds the multi-part object the current object will be linked into.
# If the object belongs to two or more multi-part objects, list them all.
modname-multi = $(sort $(foreach m,$(multi-used),\
modname-multi = $(sort $(foreach m,$(multi-obj-ym),\
$(if $(filter $*.o, $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$(m:.o=))))

__modname = $(if $(modname-multi),$(modname-multi),$(basetarget))
Expand Down

0 comments on commit a6601e0

Please sign in to comment.