From 587fb4b0959d5e9cbd3423112571ab4ef2a651eb Mon Sep 17 00:00:00 2001 From: Grant Erickson Date: Fri, 24 Mar 2023 14:13:38 -0700 Subject: [PATCH] Respect and use the value for WLAN_ROOT consistently and pervasively. The variable 'WLAN_ROOT' is intended to point at the root of the project source tree and the location of Kbuild, which is what the build Linux expects 'M' to be set to. Consequently, Use the value for WLAN_ROOT consistently and pervasively everywhere 'M' is set and passed to the Linux build. In particular, 'PWD' will be incorrect if make is invoked with '-C' and '$(shell pwd)' may be in conflict with a value of 'WLAN_ROOT' asserted in the environment. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f78d774f5..57eddafa5 100644 --- a/Makefile +++ b/Makefile @@ -19,10 +19,10 @@ KBUILD_OPTIONS += WLAN_OPEN_SOURCE=$(WLAN_OPEN_SOURCE) KBUILD_OPTIONS += $(KBUILD_EXTRA) # Extra config if any all: - $(MAKE) -C $(KERNEL_SRC) M=$(shell pwd) modules $(KBUILD_OPTIONS) + $(MAKE) -C $(KERNEL_SRC) M=$(WLAN_ROOT) modules $(KBUILD_OPTIONS) modules_install: - $(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(shell pwd) modules_install + $(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(WLAN_ROOT) modules_install clean: - $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean + $(MAKE) -C $(KERNEL_SRC) M=$(WLAN_ROOT) clean