qcacld-3.0: Kbuild: Refine add-wlan-objs

The current implementation of add-wlan-objs does not work correctly
with GNU Make 3.81 which is widely in use. So refine the function in a
manner that works with 3.81 as well as newer versions of Make.

Change-Id: Ic689367cccc16cf6ab23eeeb58665d84c5db3a26
CRs-Fixed: 2903606
This commit is contained in:
Paul Zhang 2021-04-02 15:17:20 +08:00 committed by snandini
parent 95f8f86e54
commit eca38e5722

18
Kbuild
View File

@ -51,17 +51,19 @@ OBJS :=
OBJS_DIRS := OBJS_DIRS :=
define add-wlan-objs define add-wlan-objs
$(eval $(eval $(_add-wlan-objs))
ifneq ($$(2),) endef
ifeq ($$(KERNEL_SUPPORTS_NESTED_COMPOSITES),y)
OBJS_DIRS += $$(dir $$(2)) define _add-wlan-objs
OBJS += $$(1).o ifneq ($(2),)
$$(1)-y := $$(2) ifeq ($(KERNEL_SUPPORTS_NESTED_COMPOSITES),y)
OBJS_DIRS += $(dir $(2))
OBJS += $(1).o
$(1)-y := $(2)
else else
OBJS += $$(2) OBJS += $(2)
endif endif
endif endif
)
endef endef
############ UAPI ############ ############ UAPI ############