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
Showing the changes to scripts (2 of 2 files). Show all
Unified · Split
| @@ -445,11 +445,11 @@ quiet_cmd_link_multi-m = LD [M] $@ · 444 unmodified lines | |||
| 445 | cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter %.o,$^) | 445 | cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter %.o,$^) |
| 446 | endif | 446 | endif |
| 447 | 447 | ||
| 448 | $(multi-used-m): FORCE | 448 | $(multi-obj-m): FORCE |
| 449 | $(call if_changed,link_multi-m) | 449 | $(call if_changed,link_multi-m) |
| 450 | $(call multi_depend, $(multi-used-m), .o, -objs -y -m) | 450 | $(call multi_depend, $(multi-obj-m), .o, -objs -y -m) |
| 451 | 451 | ||
| 452 | targets += $(multi-used-m) | 452 | targets += $(multi-obj-m) |
| 453 | targets := $(filter-out $(PHONY), $(targets)) | 453 | targets := $(filter-out $(PHONY), $(targets)) |
| 454 | 454 | ||
| 455 | # Add intermediate targets: | 455 | # Add intermediate targets: |
| @@ -48,9 +48,9 @@ endif · 47 unmodified lines | |||
| 48 | suffix-search = $(foreach s,$(2),$($(1:.o=$s))) | 48 | suffix-search = $(foreach s,$(2),$($(1:.o=$s))) |
| 49 | # If $(foo-objs), $(foo-y), $(foo-m), or $(foo-) exists, foo.o is a composite object | 49 | # If $(foo-objs), $(foo-y), $(foo-m), or $(foo-) exists, foo.o is a composite object |
| 50 | multi-search = $(sort $(foreach m,$(1), $(if $(strip $(call suffix-search,$(m),$(2) -)), $(m)))) | 50 | multi-search = $(sort $(foreach m,$(1), $(if $(strip $(call suffix-search,$(m),$(2) -)), $(m)))) |
| 51 | multi-used-y := $(call multi-search,$(obj-y),-objs -y) | 51 | multi-obj-y := $(call multi-search,$(obj-y),-objs -y) |
| 52 | multi-used-m := $(call multi-search,$(obj-m),-objs -y -m) | 52 | multi-obj-m := $(call multi-search,$(obj-m),-objs -y -m) |
| 53 | multi-used := $(multi-used-y) $(multi-used-m) | 53 | multi-obj-ym := $(multi-obj-y) $(multi-obj-m) |
| 54 | 54 | ||
| 55 | # Replace multi-part objects by their individual parts, | 55 | # Replace multi-part objects by their individual parts, |
| 56 | # including built-in.a from subdirectories | 56 | # including built-in.a from subdirectories |
| @@ -92,12 +92,12 @@ obj-m := $(addprefix $(obj)/,$(obj-m)) · 35 unmodified lines | |||
| 92 | lib-y := $(addprefix $(obj)/,$(lib-y)) | 92 | lib-y := $(addprefix $(obj)/,$(lib-y)) |
| 93 | real-obj-y := $(addprefix $(obj)/,$(real-obj-y)) | 93 | real-obj-y := $(addprefix $(obj)/,$(real-obj-y)) |
| 94 | real-obj-m := $(addprefix $(obj)/,$(real-obj-m)) | 94 | real-obj-m := $(addprefix $(obj)/,$(real-obj-m)) |
| 95 | multi-used-m := $(addprefix $(obj)/,$(multi-used-m)) | 95 | multi-obj-m := $(addprefix $(obj)/, $(multi-obj-m)) |
| 96 | subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) | 96 | subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) |
| 97 | 97 | ||
| 98 | # Finds the multi-part object the current object will be linked into. | 98 | # Finds the multi-part object the current object will be linked into. |
| 99 | # If the object belongs to two or more multi-part objects, list them all. | 99 | # If the object belongs to two or more multi-part objects, list them all. |
| 100 | modname-multi = $(sort $(foreach m,$(multi-used),\ | 100 | modname-multi = $(sort $(foreach m,$(multi-obj-ym),\ |
| 101 | $(if $(filter $*.o, $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$(m:.o=)))) | 101 | $(if $(filter $*.o, $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$(m:.o=)))) |
| 102 | 102 | ||
| 103 | __modname = $(if $(modname-multi),$(modname-multi),$(basetarget)) | 103 | __modname = $(if $(modname-multi),$(modname-multi),$(basetarget)) |