]> git.lizzy.rs Git - micro.git/blobdiff - Makefile
Add autoretab
[micro.git] / Makefile
index 927eed7a74340beec28f851242fb0804273f3ea8..fc9601aa5c4de5d24a00a15d6c7e643deac6c77d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: runtime
+.PHONY: runtime build generate build-quick
 
 VERSION = $(shell GOOS=$(shell go env GOHOSTOS) GOARCH=$(shell go env GOHOSTARCH) \
        go run tools/build-version.go)
@@ -7,33 +7,35 @@ DATE = $(shell GOOS=$(shell go env GOHOSTOS) GOARCH=$(shell go env GOHOSTARCH) \
        go run tools/build-date.go)
 ADDITIONAL_GO_LINKER_FLAGS = $(shell GOOS=$(shell go env GOHOSTOS) \
        GOARCH=$(shell go env GOHOSTARCH) \
-       go run tools/info-plist.go "$(VERSION)")
+       go run tools/info-plist.go "$(shell go env GOOS)" "$(VERSION)")
 GOBIN ?= $(shell go env GOPATH)/bin
 GOVARS = -X github.com/zyedidia/micro/v2/internal/util.Version=$(VERSION) -X github.com/zyedidia/micro/v2/internal/util.CommitHash=$(HASH) -X 'github.com/zyedidia/micro/v2/internal/util.CompileDate=$(DATE)'
 DEBUGVAR = -X github.com/zyedidia/micro/v2/internal/util.Debug=ON
 VSCODE_TESTS_BASE_URL = 'https://raw.githubusercontent.com/microsoft/vscode/e6a45f4242ebddb7aa9a229f85555e8a3bd987e2/src/vs/editor/test/common/model/'
 
-fetch-tags:
-       git fetch --tags
+build: generate build-quick
 
-generate:
-       go generate ./runtime
-
-build:
+build-quick:
        go build -trimpath -ldflags "-s -w $(GOVARS) $(ADDITIONAL_GO_LINKER_FLAGS)" ./cmd/micro
 
 build-dbg:
        go build -trimpath -ldflags "-s -w $(ADDITIONAL_GO_LINKER_FLAGS) $(DEBUGVAR)" ./cmd/micro
 
-build-tags: fetch-tags
+build-tags: fetch-tags generate
        go build -trimpath -ldflags "-s -w $(GOVARS) $(ADDITIONAL_GO_LINKER_FLAGS)" ./cmd/micro
 
-build-all: generate build
+build-all: build
 
-install:
+install: generate
        go install -ldflags "-s -w $(GOVARS) $(ADDITIONAL_GO_LINKER_FLAGS)" ./cmd/micro
 
-install-all: generate install
+install-all: install
+
+fetch-tags:
+       git fetch --tags
+
+generate:
+       GOOS=$(shell go env GOHOSTOS) GOARCH=$(shell go env GOHOSTARCH) go generate ./runtime
 
 testgen:
        mkdir -p tools/vscode-tests