3 VERSION = $(shell git describe --tags --abbrev=0)
4 HASH = $(shell git rev-parse --short HEAD)
5 DATE = $(shell go run tools/build-date.go)
7 # Builds micro after checking dependencies but without updating the runtime
9 go build -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(DATE)'" ./cmd/micro
11 # Builds micro after building the runtime and checking dependencies
12 build-all: runtime build
14 # Builds micro without checking for dependencies
16 go build -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(DATE)'" ./cmd/micro
18 # Same as 'build' but installs to $GOPATH/bin afterward
20 mkdir -p $(GOPATH)/bin
21 mv micro $(GOPATH)/bin
23 # Same as 'build-all' but installs to $GOPATH/bin afterward
24 install-all: runtime install
26 # Same as 'build-quick' but installs to $GOPATH/bin afterward
27 install-quick: build-quick
28 mkdir -p $(GOPATH)/bin
29 mv micro $(GOPATH)/bin
33 git -C $(GOPATH)/src/github.com/zyedidia/tcell pull
35 # Checks for dependencies
41 go get -u github.com/jteeuwen/go-bindata/...
42 $(GOPATH)/bin/go-bindata -nometadata -o runtime.go runtime/...
43 mv runtime.go cmd/micro