diff --git a/Makefile b/Makefile index e73c18fe7..ecbc2219b 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,9 @@ advice: binary: build go build -o prometheus $(BUILDFLAGS) . +race_condition_binary: build + CGO_CFLAGS="-I$(PWD)/build/root/include" CGO_LDFLAGS="-L$(PWD)/build/root/lib" go build -race -o prometheus $(BUILDFLAGS) . + build: preparation config model tools web clean: @@ -79,4 +82,4 @@ tools: web: preparation config model $(MAKE) -C web -.PHONY: advice binary build clean config documentation format model package preparation run search_index source_path test tools +.PHONY: advice binary build clean config documentation format model package preparation race_condition_binary run search_index source_path test tools diff --git a/Makefile.INCLUDE b/Makefile.INCLUDE index 58062e8b0..c0d174730 100644 --- a/Makefile.INCLUDE +++ b/Makefile.INCLUDE @@ -55,7 +55,9 @@ APT_GET_INSTALL := sudo apt-get install -y BREW_INSTALL := brew install # By default, wget sets the creation time to match the server's, which throws # off Make. :-( -WGET := wget --no-use-server-timestamps -c +# +# Set WGET_OPTIONS to include ``--no-use-server-timestamps`` to alleviate this. +WGET := wget $(WGET_OPTIONS) -c REV := $(shell git rev-parse --short HEAD) BRANCH := $(shell git rev-parse --abbrev-ref HEAD)