From 19aae949c608c8e78475988a8c7b453b8187d865 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Fri, 22 Oct 2021 16:12:10 -0300 Subject: 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 --- include/package-bin.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/package-bin.mk') diff --git a/include/package-bin.mk b/include/package-bin.mk index 192f0726d2..77e603e420 100644 --- a/include/package-bin.mk +++ b/include/package-bin.mk @@ -4,7 +4,8 @@ ifeq ($(DUMP),) define BuildTarget/bin - ifeq ($(if $(VARIANT),$(BUILD_VARIANT)),$(VARIANT)) + TARGET_VARIANT=$(if $(ALL_VARIANTS),$(if $(VARIANT),$(VARIANT),$(firstword $(ALL_VARIANTS)))) + ifeq ($(if $(TARGET_VARIANT),$(BUILD_VARIANT)),$(TARGET_VARIANT)) ifdef Package/$(1)/install ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),) $(_pkg_target)compile: $(PKG_BUILD_DIR)/.pkgdir/$(1).installed -- cgit v1.2.3