Allow to override build date

Summary:
Allow to override build date
for distribution packages that use autoreconf
to recreate the configure script

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.

Note: This patch will work with GNU date. If BSD date support is
important, a more complex patch needs to be done.

http://rb.zq1.de/compare.factory-20170713/efl-compare.out
also shows other diffs in .edj files that still remain

@fix

T5495

Reviewers: cedric

Subscribers: stefan_schmidt, jayji, netstar, jpeg

Maniphest Tasks: T5495

Differential Revision: https://phab.enlightenment.org/D5023
This commit is contained in:
Bernhard M. Wiedemann 2017-08-07 14:41:29 +02:00 committed by Stefan Schmidt
parent 4d2117ef2a
commit bc096cddfb
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ m4_define([v_maj], [$1])dnl
m4_define([v_min], [$2])dnl
m4_define([v_mic], [$3])dnl
m4_define([dev_version], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n']))dnl
m4_define([v_time], m4_esyscmd([(git log --format=%ci -1 2>/dev/null || date "+%Y-%m-%d %H:%M:%S %z") | tr -d '\n']))dnl
m4_define([v_time], m4_esyscmd([(git log --format=%ci -1 2>/dev/null || date -u -d@${SOURCE_DATE_EPOCH:-$(date +%s)} "+%Y-%m-%d %H:%M:%S %z") | tr -d '\n']))dnl
m4_define([v_rev], m4_if($4, dev, [dev_version], [0]))dnl
m4_define([v_rel], [])dnl
m4_define([def_build_profile], m4_if($4, dev, [dev], [release]))dnl