When building packages within the SDK, there is no Git revision history
available so prepopulate SOURCE_DATE_EPOCH in version.mk, similar to
how we handle REVISION already.
Acked-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
include $(TOPDIR)/include/version.mk
else
REVISION:=$(shell $(TOPDIR)/scripts/getver.sh)
+ SOURCE_DATE_EPOCH:=$(shell $(TOPDIR)/scripts/get_source_date_epoch.sh)
endif
HOSTCC ?= $(CC)
export REVISION
+export SOURCE_DATE_EPOCH
export GIT_CONFIG_PARAMETERS='core.autocrlf=false'
export MAKE_JOBSERVER=$(filter --jobserver%,$(MAKEFLAGS))
-export SOURCE_DATE_EPOCH:=$(shell $(TOPDIR)/scripts/get_source_date_epoch.sh)
# prevent perforce from messing with the patch utility
unexport P4PORT P4USER P4CONFIG P4CLIENT
# Substituted by SDK, do not remove
# REVISION:=x
+# SOURCE_DATE_EPOCH:=x
RELEASE:=Reboot
cat $(TOPDIR)/feeds.conf.default >> $(SDK_BUILD_DIR)/feeds.conf.default; \
fi
$(SED) 's,^# REVISION:=.*,REVISION:=$(REVISION),g' $(SDK_BUILD_DIR)/include/version.mk
+ $(SED) 's,^# SOURCE_DATE_EPOCH:=.*,SOURCE_DATE_EPOCH:=$(SOURCE_DATE_EPOCH),g' $(SDK_BUILD_DIR)/include/version.mk
$(SED) '/LINUX_VERMAGIC:=/ { s,unknown,$(LINUX_VERMAGIC),g }' $(SDK_BUILD_DIR)/include/kernel.mk
find $(SDK_BUILD_DIR) -name .git | $(XARGS) rm -rf
find $(SDK_BUILD_DIR) -name .svn | $(XARGS) rm -rf