On 09/23/2014 06:34 PM, Daniel Kahn Gillmor wrote:
> * configure.ac: add --enable-build-timestamp

apologies for the multiple versions here.  Please disregard v2.

The v3 patch (as seen below) is the right one to use, as it handles
--disable-build-timestamp appropriately.

I find that trying to get it to pass "[none]" through all the autotools
business ends up turning into "none", so i went with "<none>" instead,
which shouldn't be mistaken for an ISO-8601 date format.

        --dkg

>  configure.ac | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index b32b751..c0435b0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -484,7 +484,13 @@ changequote([,])dnl
>  BUILD_FILEVERSION="${BUILD_FILEVERSION}0,mym4_revision_dec"
>  AC_SUBST(BUILD_FILEVERSION)
>  
> -BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
> +
> +AC_ARG_ENABLE([build-timestamp],
> +              AC_HELP_STRING([--enable-build-timestamp],
> +                             [set an explicit build timestamp for 
> reproducibility.
> +                              (default is the current time in ISO-8601 
> format)]),
> +              [if test "$enableval" = "no"; then BUILD_TIMESTAMP="<none>"; 
> else BUILD_TIMESTAMP="$enableval"; fi],
> +              [BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || 
> date`] )
>  AC_SUBST(BUILD_TIMESTAMP)
>  AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP",
>                     [The time this package was configured for a build])
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to