Allow to override build date
in order to make builds reproducible. See https://reproducible-builds.org/ for why this is good and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable. This date call works with GNU and BSD variants of date.
This commit is contained in:
parent
4231370205
commit
b5292709cf
1 changed files with 5 additions and 1 deletions
6
Makefile
6
Makefile
|
|
@ -10,7 +10,11 @@
|
|||
# The version number, for release:
|
||||
|
||||
VER_VERSION:=0.9.23
|
||||
VER_DATE:=$(shell date +"%Y-%m-%d")
|
||||
ifdef SOURCE_DATE_EPOCH
|
||||
VER_DATE=$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d" 2>/dev/null || date -u "+%Y-%m-%d")
|
||||
else
|
||||
VER_DATE=$(shell date "+%Y-%m-%d")
|
||||
endif
|
||||
MAGIC_API_VERSION:=0x00000003
|
||||
|
||||
# Need to know the OS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue