summaryrefslogtreecommitdiff
path: root/include/kernel.mk
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2017-06-13 13:04:35 +0200
committerFelix Fietkau <nbd@nbd.name>2017-06-17 15:09:57 +0200
commite5fc15bf9a5868758e4efc8688b8bf58295fa5e7 (patch)
treeca041ba39678cfa7832ad670adee11c5d4300eea /include/kernel.mk
parent77a64e8bffb7e7cb1ce46424fd188e2b997433fc (diff)
downloadmtk-20170518-e5fc15bf9a5868758e4efc8688b8bf58295fa5e7.zip
mtk-20170518-e5fc15bf9a5868758e4efc8688b8bf58295fa5e7.tar.gz
mtk-20170518-e5fc15bf9a5868758e4efc8688b8bf58295fa5e7.tar.bz2
build: move definition of KBUILD_BUILD_TIMESTAMP to include/kernel.mk
Fixes: 0aed054bec (build: add KERNEL_MAKE and KERNEL_MAKE_FLAGS variables and move to kernel.mk) Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'include/kernel.mk')
-rw-r--r--include/kernel.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/kernel.mk b/include/kernel.mk
index effece2..464c945 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -10,6 +10,12 @@ CHECK:=1
DUMP:=1
endif
+ifneq ($(SOURCE_DATE_EPOCH),)
+ ifndef DUMP
+ KBUILD_BUILD_TIMESTAMP:=$(shell perl -e 'print scalar gmtime($(SOURCE_DATE_EPOCH))')
+ endif
+endif
+
ifeq ($(__target_inc),)
ifndef CHECK
include $(INCLUDE_DIR)/target.mk