[openwrt/openwrt] mac80211: build each variant in its own dir

LEDE Commits lede-commits at lists.infradead.org
Fri Feb 23 05:02:57 PST 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4390ea484d7d9159a0a41f0cb71840346a7e3b4f

commit 4390ea484d7d9159a0a41f0cb71840346a7e3b4f
Author: Eneas U de Queiroz <cotequeiroz at gmail.com>
AuthorDate: Tue Oct 10 15:58:01 2023 -0300

    mac80211: build each variant in its own dir
    
    Having different build directories is the default when the package
    Makefile defines more than one variant.
    
    Mac80211 overrides PKG_BUILD_DIR, not taking different variants in
    consideration, which causes clobbering the directories when both
    variants are built.
    
    When compiled with AUTOREMOVE=y, the effect is that the package is
    unnecessarily rebuilt when the package is compiled again.
    
    Wihout AUTOREMOVE, the problem is worse: the second variant will not be
    rebuilt, and you end up with the smallbuffers variant being a copy of
    the regular one.
    
    Signed-off-by: Eneas U de Queiroz <cotequeiroz at gmail.com>
---
 package/kernel/mac80211/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 8d9dc4efa9..b9c82c51cc 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
 PKG_HASH:=3bbc461121134fda9089c084a5eed577d05e7837a157edf9a3797937172a3ece
 
 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
-PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)backports-$(PKG_VERSION)
 PKG_BUILD_PARALLEL:=1
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>




More information about the lede-commits mailing list