summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/go/Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/client/go/Makefile b/client/go/Makefile
index b088612abb2..8bcb4cba376 100644
--- a/client/go/Makefile
+++ b/client/go/Makefile
@@ -8,7 +8,8 @@ ifeq ($(VERSION),)
VERSION = $(DEVEL_VERSION)
endif
-PREFIX ?= $(CURDIR)
+BIN ?= $(CURDIR)/bin
+SHARE ?= $(CURDIR)/share
DIST ?= $(CURDIR)/dist
GO_FLAGS := -ldflags "-X github.com/vespa-engine/vespa/client/go/build.Version=$(VERSION)"
@@ -109,16 +110,17 @@ ifdef CI
endif
install: ci
- env GOBIN=$(PREFIX)/bin go install $(GO_FLAGS) ./...
+ env GOBIN=$(BIN) go install $(GO_FLAGS) ./...
manpages: install
- mkdir -p $(PREFIX)/share/man/man1
- $(PREFIX)/bin/vespa man $(PREFIX)/share/man/man1
+ mkdir -p $(SHARE)/man/man1
+ $(BIN)/vespa man $(SHARE)/man/man1
clean:
rm -rf $(DIST)
- 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
+ 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
test: ci
go test ./...