From eca38e5722e007bb41327595e0c1fb4e48c6568b Mon Sep 17 00:00:00 2001 From: Paul Zhang Date: Fri, 2 Apr 2021 15:17:20 +0800 Subject: [PATCH] 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 --- Kbuild | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Kbuild b/Kbuild index 1082fd1a9a04..ce8d1e938ddf 100644 --- a/Kbuild +++ b/Kbuild @@ -51,17 +51,19 @@ OBJS := OBJS_DIRS := define add-wlan-objs -$(eval - ifneq ($$(2),) - ifeq ($$(KERNEL_SUPPORTS_NESTED_COMPOSITES),y) - OBJS_DIRS += $$(dir $$(2)) - OBJS += $$(1).o - $$(1)-y := $$(2) +$(eval $(_add-wlan-objs)) +endef + +define _add-wlan-objs + ifneq ($(2),) + ifeq ($(KERNEL_SUPPORTS_NESTED_COMPOSITES),y) + OBJS_DIRS += $(dir $(2)) + OBJS += $(1).o + $(1)-y := $(2) else - OBJS += $$(2) + OBJS += $(2) endif endif -) endef ############ UAPI ############