[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#786846: [Reproducible-builds] Bug#786846: alt-ergo: [PATCH] please make the build reproducible - set build date



On Tue, May 26, 2015 at 10:29:12AM +0200, Jérémy Bobbio wrote:
> Juan Picca:
> > --- a/Makefile.users
> > +++ b/Makefile.users
> > @@ -1,4 +1,5 @@
> >  ARCH = $(shell uname -m)
> > +BUILD_DATE = $(shell LANG=en_US; date)
> 
> I would use `?=` instead of `=` here to highlight that it can be preset.

Done

> 
> I'm actually suprised that it works like this, but tests confirmed it.
> But hey, you learn every day:
> https://www.gnu.org/software/make/manual/html_node/Overriding.html
> Thanks Juan. :)
> 
> -- 
> Lunar                                .''`. 
> lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
>                                     `. `'` 
>                                       `-   
Description: Allow set the build date
 This patch moves the date command used for set the build date to a variable,
 allowing set the build date externally.
Author: Juan Picca <jumapico@gmail.com>
Last-Update: 2015-05-25
---
--- a/Makefile.users
+++ b/Makefile.users
@@ -1,4 +1,5 @@
 ARCH = $(shell uname -m)
+BUILD_DATE ?= $(shell LANG=en_US; date)
 
 VERSION=0.99.1
 
@@ -157,7 +158,7 @@ endif
 
 src/util/version.ml: config.status
 	@echo "let version = \""$(VERSION)"\"" >> src/util/version.ml
-	@echo "let date = \""`LANG=en_US; date`"\"" >> src/util/version.ml
+	@echo "let date = \""$(BUILD_DATE)"\"" >> src/util/version.ml
 	@echo "let bindir = \""$(BINDIR)"\"" >> src/util/version.ml
 	@echo "let libdir = \""$(LIBDIR)"\"" >> src/util/version.ml
 	@echo "let pluginsdir = \""$(PLUGINSDIR)"\"" >> src/util/version.ml

Reply to: