aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-12-13 13:07:01 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-12-13 13:07:01 +0000
commit64f0b22052dbbbfa7a66cd3a13f17fccf155795d (patch)
tree3f99cc2fb24a53564879327ee50510348b364f58
parent71712ec5225172192aac8157ab1911f23494810c (diff)
downloadupstream-64f0b22052dbbbfa7a66cd3a13f17fccf155795d.tar.gz
upstream-64f0b22052dbbbfa7a66cd3a13f17fccf155795d.tar.bz2
upstream-64f0b22052dbbbfa7a66cd3a13f17fccf155795d.zip
build: only install packages for selected variants, fixes building multiple variant selections in one tree
SVN-Revision: 34656
-rw-r--r--package/Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/package/Makefile b/package/Makefile
index e88efdfe9f..df7cf79f2e 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -70,8 +70,19 @@ OPKG:= \
--add-arch all:100 \
--add-arch $(if $(ARCH_PACKAGES),$(ARCH_PACKAGES),$(BOARD)):200
-PACKAGE_INSTALL:=$(sort $(foreach pkg,$(package-y),$(lastword $(subst /,$(space),$(pkg)))))
-PACKAGE_INSTALL_FILES:=$(patsubst %,$(PKG_INFO_DIR)/%.*.install,$(PACKAGE_INSTALL))
+PACKAGE_INSTALL_FILES:= \
+ $(foreach pkg,$(sort $(package-y)), \
+ $(foreach variant, \
+ $(if $(package/$(pkg)/variants), \
+ $(package/$(pkg)/variants), \
+ $(if $(package/$(pkg)/default-variant), \
+ $(package/$(pkg)/default-variant), \
+ default \
+ ) \
+ ), \
+ $(PKG_INFO_DIR)/$(lastword $(subst /,$(space),$(pkg))).$(variant).install \
+ ) \
+ )
$(curdir)/cleanup: $(TMP_DIR)/.build
rm -rf $(STAGING_DIR_ROOT)