diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-10-06 13:39:58 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-10-16 21:39:10 +0200 |
commit | 14bad2001f3f205af6d029ee8b55a0f6c4f0f4d0 (patch) | |
tree | 524d991036ecefdb614995c1577eec03c1e5d0d6 /include | |
parent | ef7c34c1d1beac6bca4a683a3a161dd12a81f7e8 (diff) | |
download | upstream-14bad2001f3f205af6d029ee8b55a0f6c4f0f4d0.tar.gz upstream-14bad2001f3f205af6d029ee8b55a0f6c4f0f4d0.tar.bz2 upstream-14bad2001f3f205af6d029ee8b55a0f6c4f0f4d0.zip |
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 <nbd@nbd.name>
Diffstat (limited to 'include')
-rw-r--r-- | include/download.mk | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/download.mk b/include/download.mk index 9c8ada052b..d393bf3907 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) |