From: Felix Fietkau Date: Tue, 6 Oct 2020 11:39:58 +0000 (+0200) Subject: build: prevent excessive re-evaluation of PKG_VERSION X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=14bad2001f3f205af6d029ee8b55a0f6c4f0f4d0;p=openwrt%2Fstaging%2Fblogic.git build: prevent excessive re-evaluation of PKG_VERSION version_abbrev uses $(shell) and the ?= is causing make to run the command over and over again, causing a significant build slowdown Signed-off-by: Felix Fietkau --- diff --git a/include/download.mk b/include/download.mk index 9c8ada052b04..d393bf390716 100644 --- a/include/download.mk +++ b/include/download.mk @@ -12,9 +12,11 @@ OPENWRT_GIT = $(PROJECT_GIT) LEDE_GIT = $(PROJECT_GIT) ifdef PKG_SOURCE_VERSION -PKG_VERSION ?= $(if $(PKG_SOURCE_DATE),$(PKG_SOURCE_DATE)-)$(call version_abbrev,$(PKG_SOURCE_VERSION)) -PKG_SOURCE_SUBDIR ?= $(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE ?= $(PKG_SOURCE_SUBDIR).tar.xz + ifndef PKG_VERSION + PKG_VERSION := $(if $(PKG_SOURCE_DATE),$(PKG_SOURCE_DATE)-)$(call version_abbrev,$(PKG_SOURCE_VERSION)) + endif + PKG_SOURCE_SUBDIR ?= $(PKG_NAME)-$(PKG_VERSION) + PKG_SOURCE ?= $(PKG_SOURCE_SUBDIR).tar.xz endif DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED)