Skip to content

Commit

Permalink
Merge pull request #99 from bmwiedemann/master
Browse files Browse the repository at this point in the history
Allow to override build date and host
  • Loading branch information
ch4rr0 authored Jul 17, 2020
2 parents af0227f + 68e2264 commit 96dcdd7
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
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

0 comments on commit 96dcdd7

Please sign in to comment.