]> git.lizzy.rs Git - micro.git/blob - Makefile
Add "bubblegum" light colorscheme
[micro.git] / Makefile
1 .PHONY: runtime
2
3 VERSION = $(shell git describe --tags --abbrev=0)
4 HASH = $(shell git rev-parse --short HEAD)
5
6 # Builds micro after checking dependencies but without updating the runtime
7 build: deps tcell
8         go build -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(shell date -u '+%B %d, %Y')'" -o micro ./cmd/micro
9
10 # Builds micro after building the runtiem and checking dependencies
11 build-all: runtime build
12
13 # Builds micro without checking for dependencies
14 build-quick:
15         go build -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(shell date -u '+%B %d, %Y')'" -o micro ./cmd/micro
16
17 # Same as 'build' but installs to $GOPATH/bin afterward
18 install: build
19         mv micro $(GOPATH)/bin
20
21 # Same as 'build-all' but installs to $GOPATH/bin afterward
22 install-all: runtime install
23
24 # Same as 'build-quick' but installs to $GOPATH/bin afterward
25 install-quick: build-quick
26         mv micro $(GOPATH)/bin
27
28 # Updates tcell
29 tcell:
30         git -C $(GOPATH)/src/github.com/zyedidia/tcell pull
31
32 # Checks for dependencies
33 deps:
34         go get -d ./cmd/micro
35
36 # Builds the runtime
37 runtime:
38         go get -u github.com/jteeuwen/go-bindata/...
39         $(GOPATH)/bin/go-bindata -nometadata -o runtime.go runtime/...
40         mv runtime.go cmd/micro
41
42 test:
43         go get -d ./cmd/micro
44         go test ./cmd/micro
45
46 clean:
47         rm -f micro