Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to override build date and host #99

Merged
merged 1 commit into from Jul 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 11 additions & 2 deletions Makefile
Expand Up @@ -241,10 +241,19 @@ all: $(BIN_LIST)

allall: $(BIN_LIST) $(BIN_LIST_AUX)


DATE_FMT = %Y-%m-%dT%H:%M:%S
ifdef SOURCE_DATE_EPOCH
BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u "+$(DATE_FMT)")
BUILD_HOST := reproduciblebuild
else
BUILD_DATE ?= $(shell date "+$(DATE_FMT)")
BUILD_HOST ?= `hostname`
endif
DEFS=-fno-strict-aliasing \
-DBOWTIE_VERSION="\"`cat VERSION`\"" \
-DBUILD_HOST="\"`hostname`\"" \
-DBUILD_TIME="\"`date`\"" \
-DBUILD_HOST="\"$(BUILD_HOST)\"" \
-DBUILD_TIME="\"$(BUILD_DATE)\"" \
-DCOMPILER_VERSION="\"`$(CXX) -v 2>&1 | tail -1`\"" \
$(FILE_FLAGS) \
$(PTHREAD_DEF) \
Expand Down