diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-09-05 11:19:11 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-09-05 11:26:57 +0200 |
commit | 7716a4309207addc5f359a4b5ab22f0104996028 (patch) | |
tree | 63d9f20acdb45a4a7932a0420436bd2f041b03c2 /include/package.mk | |
parent | 920d975cab67dff2f7720c4af24fe7e03ff9019a (diff) | |
download | upstream-7716a4309207addc5f359a4b5ab22f0104996028.tar.gz upstream-7716a4309207addc5f359a4b5ab22f0104996028.tar.bz2 upstream-7716a4309207addc5f359a4b5ab22f0104996028.zip |
build: fix extreme build system slowdown caused by SOURCE_DATE_EPOCH changes
Adding inline shell invocations in per-target variables causes them to be
executed over and over again, which causes a significant slowdown.
Fix this by evaluating it only once per package directory
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'include/package.mk')
-rw-r--r-- | include/package.mk | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/package.mk b/include/package.mk index a93d6b78f3..50bd838180 100644 --- a/include/package.mk +++ b/include/package.mk @@ -19,6 +19,8 @@ PKG_IREMAP ?= 1 MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) $(if $(filter 3.% 4.0 4.1,$(MAKE_VERSION)),-j)) +PKG_SOURCE_DATE_EPOCH:=$(if $(DUMP),,$(shell $(TOPDIR)/scripts/get_source_date_epoch.sh $(CURDIR))) + ifeq ($(strip $(PKG_BUILD_PARALLEL)),0) PKG_JOBS?=-j1 else |