summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJérémy Bobbio <lunar@debian.org>2015-04-29 09:12:29 +0200
committerDidier Raboud <odyx@debian.org>2015-04-29 09:12:29 +0200
commit6291a6ff60468446ee84574b4c47c54150102065 (patch)
treeabfd921b7c06de28e648895f48d8d25cc406562e /Makefile
parent76f67c7fa663bc58abde4853fec64c84172724b8 (diff)
Reproducible build: Allow to set build date externally
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 67bfe87..02e490a 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,8 @@ export SHELL := bash
PACKAGE := win32-loader
VERSION := $(shell head -n 1 debian/changelog | sed -e "s/^$(PACKAGE) (\(.*\)).*/\1/g")
+BUILD_DATE ?= $(shell LC_ALL=C date +'%a, %d %b %Y %T %z')
+FOUR_DIGITS_DATE := $(shell date -u +'%Y.%m.%d.%H%M' --date="$(BUILD_DATE)")
NSIS_CC := i686-w64-mingw32-gcc -Os -Xlinker --no-insert-timestamp
NSIS_STRIP := i686-w64-mingw32-strip
@@ -23,7 +25,7 @@ endif
MAKENSIS := makensis -V3
# Add to it some version'ing and date
-MAKENSIS += -DVERSION=$(VERSION) -D4DIGITS_DATE=`date +%Y.%m.%d.%H%M`
+MAKENSIS += -DVERSION=$(VERSION) -D4DIGITS_DATE=$(FOUR_DIGITS_DATE)
ifdef OUTFILE_NAME
MAKENSIS += -D_OUTFILE_NAME=$(OUTFILE_NAME)