From 5d2bd8070ce1b0fd93f95971123d54f143ec48e1 Mon Sep 17 00:00:00 2001 From: Rayan Makhmutov Date: Thu, 12 May 2016 20:41:58 +0500 Subject: [PATCH 1/2] Fix Makefile build on OS X --- Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 26591152..8bd2752e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,13 @@ -.PHONY: vendor docs +.PHONY: vendor docs build PACKAGES = $(shell go list ./... | grep -v /vendor/) +ifneq ($(shell uname), Darwin) + EXTLDFLAGS = -extldflags "-static" # +else + EXTLDFLAGS = +endif + all: gen build deps: @@ -24,10 +30,8 @@ gen_template: gen_migrations: go generate github.com/drone/drone/store/datastore/ddl -build: build_static - -build_static: - cd drone && go build --ldflags '-extldflags "-static" -X github.com/drone/drone/version.VersionDev=$(DRONE_BUILD_NUMBER)' -o drone +build: + cd drone && go build --ldflags '${EXTLDFLAGS}-X github.com/drone/drone/version.VersionDev=$(DRONE_BUILD_NUMBER)' -o drone test: go test -cover $(PACKAGES) From 4eb805b5270ebc33110f7e729eb73232a7b1fedf Mon Sep 17 00:00:00 2001 From: Rayan Makhmutov Date: Fri, 13 May 2016 08:30:02 +0500 Subject: [PATCH 2/2] Use whitespace + $(null) instead of whitespace + # --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8bd2752e..2f5bb5c5 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ PACKAGES = $(shell go list ./... | grep -v /vendor/) ifneq ($(shell uname), Darwin) - EXTLDFLAGS = -extldflags "-static" # + EXTLDFLAGS = -extldflags "-static" $(null) else EXTLDFLAGS = endif