forked from aniani/vim
patch 8.2.0910: Vim is not reproducibly buildable
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.
This commit is contained in:
@@ -62,6 +62,18 @@ if test x"$ac_cv_prog_cc_c99" != xno; then
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl If $SOURCE_DATE_EPOCH is present in the environment, use that as the
|
||||
dnl "compiled" timestamp in :version's output. Attempt to get the formatted
|
||||
dnl date using GNU date syntax, BSD date syntax, and finally falling back to
|
||||
dnl just using the current time.
|
||||
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")
|
||||
AC_DEFINE_UNQUOTED(BUILD_DATE, ["$BUILD_DATE"])
|
||||
BUILD_DATE_MSG=-"echo -e '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nNOTE: build date/time is fixed: $BUILD_DATE\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='"
|
||||
AC_SUBST(BUILD_DATE_MSG)
|
||||
fi
|
||||
|
||||
dnl Check for the flag that fails if stuff are missing.
|
||||
|
||||
AC_MSG_CHECKING(--enable-fail-if-missing argument)
|
||||
|
Reference in New Issue
Block a user