From: Manuel Mendez Date: Sat, 16 Jan 2021 02:29:27 +0000 (-0500) Subject: [build] Use SOURCE_DATE_EPOCH if it exists X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d000c9fd7e65a24467098e766e76282c4f4ec6d;p=thirdparty%2Fipxe.git [build] Use SOURCE_DATE_EPOCH if it exists See https://reproducible-builds.org/docs/source-date-epoch/ for rationale. Modified-by: Michael Brown Signed-off-by: Michael Brown --- diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index d760f5524..fc0850b1d 100644 --- a/src/Makefile.housekeeping +++ b/src/Makefile.housekeeping @@ -1167,7 +1167,19 @@ BUILD_ID_CMD := perl -e 'printf "0x%08x", int ( rand ( 0xffffffff ) );' # Build timestamp # +# Used as a means to automatically select the newest version of iPXE +# if multiple iPXE drivers are loaded concurrently in a UEFI system. +# +# It gets rounded down to the nearest minute when used for this +# purpose. +# +ifdef SOURCE_DATE_EPOCH +BUILD_TIMESTAMP := $(SOURCE_DATE_EPOCH) +else ifdef GITVERSION +BUILD_TIMESTAMP := $(shell git log -1 --pretty=%ct) +else BUILD_TIMESTAMP := $(shell date +%s) +endif # Build version #