kernel: check SOURCE_DATE_EPOCH before setting KBUILD_BUILD_TIMESTAMP
authorJonas Gorski <jonas.gorski@gmail.com>
Sat, 13 Aug 2016 13:47:48 +0000 (15:47 +0200)
committerJonas Gorski <jonas.gorski@gmail.com>
Sat, 13 Aug 2016 13:49:26 +0000 (15:49 +0200)
Make sure SOURCE_DATE_EPOCH actually contains something.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
include/kernel-defaults.mk

index 534699b79ccc55fe48f29bdfa9cbc06e3a7723db..53e733adc0c24cd32f25b21d602565188f8545d2 100644 (file)
@@ -12,7 +12,7 @@ KERNEL_MAKEOPTS := -C $(LINUX_DIR) \
        KBUILD_HAVE_NLS=no \
        KBUILD_BUILD_USER="$(call qstrip,$(CONFIG_KERNEL_BUILD_USER))" \
        KBUILD_BUILD_HOST="$(call qstrip,$(CONFIG_KERNEL_BUILD_DOMAIN))" \
-       KBUILD_BUILD_TIMESTAMP="$(shell date -u --date="@$(SOURCE_DATE_EPOCH)")" \
+       $(if $(SOURCE_DATE_EPOCH),KBUILD_BUILD_TIMESTAMP="$(shell date -u --date="@$(SOURCE_DATE_EPOCH)")") \
        KBUILD_BUILD_VERSION="0" \
        CONFIG_SHELL="$(BASH)" \
        $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \