diff options
author | Martin Polden <mpolden@mpolden.no> | 2022-03-14 14:43:41 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2022-03-16 15:16:59 +0100 |
commit | da742fc1e74c0ce8a8724794f42a885bad63f092 (patch) | |
tree | 8b5057bcd1a01a6ec7f82bdbe3f28fd8eba4744b /client/go/Makefile | |
parent | 200855753d77a95129f249c187b58e73423ed597 (diff) |
Use a single variable for install prefix
Diffstat (limited to 'client/go/Makefile')
-rw-r--r-- | client/go/Makefile | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/client/go/Makefile b/client/go/Makefile index 8bcb4cba376..b088612abb2 100644 --- a/client/go/Makefile +++ b/client/go/Makefile @@ -8,8 +8,7 @@ ifeq ($(VERSION),) VERSION = $(DEVEL_VERSION) endif -BIN ?= $(CURDIR)/bin -SHARE ?= $(CURDIR)/share +PREFIX ?= $(CURDIR) DIST ?= $(CURDIR)/dist GO_FLAGS := -ldflags "-X github.com/vespa-engine/vespa/client/go/build.Version=$(VERSION)" @@ -110,17 +109,16 @@ ifdef CI endif install: ci - env GOBIN=$(BIN) go install $(GO_FLAGS) ./... + env GOBIN=$(PREFIX)/bin go install $(GO_FLAGS) ./... manpages: install - mkdir -p $(SHARE)/man/man1 - $(BIN)/vespa man $(SHARE)/man/man1 + mkdir -p $(PREFIX)/share/man/man1 + $(PREFIX)/bin/vespa man $(PREFIX)/share/man/man1 clean: rm -rf $(DIST) - rm -f $(BIN)/vespa $(SHARE)/man/man1/vespa.1 $(SHARE)/man/man1/vespa-*.1 - rmdir -p $(BIN) &> /dev/null || true - rmdir -p $(SHARE)/man/man1 &> /dev/null || true + rm -f $(PREFIX)/bin/vespa $(PREFIX)/share/man/man1/vespa.1 $(PREFIX)/share/man/man1/vespa-*.1 + rmdir -p $(PREFIX)/bin $(PREFIX)/share/man/man1 &> /dev/null || true test: ci go test ./... |