configure: 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 commit is contained in:
parent
f6539449c5
commit
6f54210db2
1 changed files with 5 additions and 1 deletions
6
configure
vendored
6
configure
vendored
|
@ -550,7 +550,11 @@ then
|
||||||
split_seconds=$ntp_era_split
|
split_seconds=$ntp_era_split
|
||||||
split_days=0
|
split_days=0
|
||||||
else
|
else
|
||||||
split_seconds=`date '+%s'`
|
if [ "x$SOURCE_DATE_EPOCH" != "x" ]; then
|
||||||
|
split_seconds=$SOURCE_DATE_EPOCH
|
||||||
|
else
|
||||||
|
split_seconds=`date '+%s'`
|
||||||
|
fi
|
||||||
if [ "x$split_seconds" = "x" ]; then
|
if [ "x$split_seconds" = "x" ]; then
|
||||||
echo "error: could not get current time, --with-ntp-era option is needed"
|
echo "error: could not get current time, --with-ntp-era option is needed"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue