From e545fac8d968864a965edb9e50c6f90940b0a6c9 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Sun, 4 Aug 2019 04:45:06 +0800 Subject: build: include BUILD_VARIANT in PKG_BUILD_DIR This changes the default PKG_BUILD_DIR to take BUILD_VARIANT into account (if set), so that packages do not need to manually override PKG_BUILD_DIR just to handle variants. This also updates most base packages with variants to use the updated default PKG_BUILD_DIR. Signed-off-by: Jeffery To --- include/kernel.mk | 2 +- include/package.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/kernel.mk b/include/kernel.mk index 975cf455c4..97d23661c9 100644 --- a/include/kernel.mk +++ b/include/kernel.mk @@ -77,7 +77,7 @@ else TARGET_MODULES_DIR:=$(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) ifneq ($(TARGET_BUILD),1) - PKG_BUILD_DIR ?= $(KERNEL_BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION)) + PKG_BUILD_DIR ?= $(KERNEL_BUILD_DIR)/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION)) endif endif diff --git a/include/package.mk b/include/package.mk index 66137f211b..c541f6edf7 100644 --- a/include/package.mk +++ b/include/package.mk @@ -11,7 +11,7 @@ all: $(if $(DUMP),dumpinfo,$(if $(CHECK),check,compile)) include $(INCLUDE_DIR)/download.mk -PKG_BUILD_DIR ?= $(BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION)) +PKG_BUILD_DIR ?= $(BUILD_DIR)/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION)) PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install PKG_BUILD_PARALLEL ?= PKG_USE_MIPS16 ?= 1 -- cgit v1.2.3