diff options
author | Eneas U de Queiroz <cotequeiroz@gmail.com> | 2021-10-22 16:12:10 -0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-11-01 20:18:55 +0100 |
commit | 19aae949c608c8e78475988a8c7b453b8187d865 (patch) | |
tree | 7de52b940b0c3ee7d085e50706e435ccf7574d4c /include/package-ipkg.mk | |
parent | 6b8b5e7248fd8562e8cdd5ef6f3d52f51418fc3b (diff) | |
download | openwrt-19aae949c608c8e78475988a8c7b453b8187d865.tar.gz openwrt-19aae949c608c8e78475988a8c7b453b8187d865.tar.bz2 openwrt-19aae949c608c8e78475988a8c7b453b8187d865.zip |
build: avoid rebuilds of unset VARIANT packages
If a Makefile defines some packages with VARIANT set, and others without
it, the latter will be built once for every different VARIANT set, each
build trumping the previous one.
Avoid rebuilds by only building unnamed variant packages when the first
variant is built.
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Diffstat (limited to 'include/package-ipkg.mk')
-rw-r--r-- | include/package-ipkg.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index 19f09c2311..bd50edb75f 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -105,7 +105,8 @@ ifeq ($(DUMP),) IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1) KEEP_$(1):=$(strip $(call Package/$(1)/conffiles)) - ifeq ($(BUILD_VARIANT),$$(if $$(VARIANT),$$(VARIANT),$(BUILD_VARIANT))) + TARGET_VARIANT:=$$(if $(ALL_VARIANTS),$$(if $$(VARIANT),$$(VARIANT),$(firstword $(ALL_VARIANTS)))) + ifeq ($(BUILD_VARIANT),$$(if $$(TARGET_VARIANT),$$(TARGET_VARIANT),$(BUILD_VARIANT))) do_install= ifdef Package/$(1)/install do_install=yes |