aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Yong Tang <yong.tang.github@outlook.com> 2017-08-13 09:41:50 -0700
committerGravatar Miek Gieben <miek@miek.nl> 2017-08-13 17:41:50 +0100
commit0c02708d63f62d6bca55effedd9601908311baa9 (patch)
treec83126370d295675b4f848b0fdcee66c40331333 /Makefile
parent8d876c770c586c0714f63227894b10fe0fd54c11 (diff)
downloadcoredns-0c02708d63f62d6bca55effedd9601908311baa9.tar.gz
coredns-0c02708d63f62d6bca55effedd9601908311baa9.tar.zst
coredns-0c02708d63f62d6bca55effedd9601908311baa9.zip
Consolidation of Makefile and Makefile.release (#912)
* Consolidation of Makefile and Makefile.release Several changes: 1. All go specific target like `go generate`, etc. has been moved to Makefile. Now Makefile.release does not repeat go build, etc. related rules. 2. In Makefile.release, the binary build is done through `docker run` and with a fixed specific go version (currently 1.8.3). This will help making sure build process could be reproduced on any dev platform, with no dependency to the golang version installed on the platform. 3. Platform related flags (e.g., "GOOS=darwin") are passed through Makefile (not Makefile.release). Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Update to only use `make` without running inside `docker run` Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b76fba6b4..5e5ec4ffa 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
GITCOMMIT:=$(shell git describe --dirty --always)
+BINARY:=coredns
+SYSTEM:=
all: coredns
@@ -6,7 +8,7 @@ all: coredns
# TODO: Add .go file dependencies.
.PHONY: coredns
coredns: check godeps
- CGO_ENABLED=0 go build -v -ldflags="-s -w -X github.com/coredns/coredns/coremain.gitCommit=$(GITCOMMIT)"
+ CGO_ENABLED=0 $(SYSTEM) go build -v -ldflags="-s -w -X github.com/coredns/coredns/coremain.gitCommit=$(GITCOMMIT)" -o $(BINARY)
.PHONY: check
check: fmt core/zmiddleware.go core/dnsserver/zdirectives.go godeps