diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-05 23:16:29 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-05 23:16:29 +0200 |
commit | 8f1dde5021d9623a951d1ccbc78cf1b1a55ccd7a (patch) | |
tree | 1a2a9aee6f224db95e60a7ba401b2087cdbdb661 /src/auto | |
parent | 002bc79991286934a9593b80635c27d4238cdfc4 (diff) |
patch 8.2.0910: Vim is not reproducibly buildablev8.2.0910
Problem: Vim is not reproducibly buildable.
Solution: Use the $SOURCE_DATE_EPOCH environment variable in configure.
(James McCoy, closes #513) Give a warning about using it.
Diffstat (limited to 'src/auto')
-rwxr-xr-x | src/auto/configure | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/auto/configure b/src/auto/configure index 516e45ceea..4c3ff325d0 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -721,6 +721,7 @@ OS_EXTRA_SRC XCODE_SELECT CPP_MM CROSS_COMPILING +BUILD_DATE_MSG STRIP AWK FGREP @@ -4455,6 +4456,17 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi +if test -n "$SOURCE_DATE_EPOCH"; then + DATE_FMT="%b %d %Y %H:%M:%S" + BUILD_DATE=$(LC_ALL=C date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || LC_ALL=C date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || LC_ALL=C date -u "+$DATE_FMT") + cat >>confdefs.h <<_ACEOF +#define BUILD_DATE "$BUILD_DATE" +_ACEOF + + BUILD_DATE_MSG=-"echo -e '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nNOTE: build date/time is fixed: $BUILD_DATE\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='" + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5 $as_echo_n "checking --enable-fail-if-missing argument... " >&6; } |