aboutsummaryrefslogtreecommitdiffstats
path: root/client/go/Makefile
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2021-09-07 14:55:32 +0200
committerMartin Polden <mpolden@mpolden.no>2021-09-07 15:02:18 +0200
commit86cae20741ae578af3f4f8920b43a7064a7bb800 (patch)
tree4056afc26dcb343468a95084fba5d8ef0c8fa7a8 /client/go/Makefile
parenta364de5217b3ff3028dd833ba99374e893bc037f (diff)
Add target for generating man pages
Diffstat (limited to 'client/go/Makefile')
-rw-r--r--client/go/Makefile15
1 files changed, 12 insertions, 3 deletions
diff --git a/client/go/Makefile b/client/go/Makefile
index 40f0a4aaf0e..3297b628cb2 100644
--- a/client/go/Makefile
+++ b/client/go/Makefile
@@ -1,15 +1,24 @@
# Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-all: test checkfmt install
-
+BIN ?= $(CURDIR)/bin
+SHARE ?= $(CURDIR)/share
# When building a new release the build system should set the VERSION
# environment variable to version being built
VERSION ?= $(shell echo "0.0.0-`git rev-parse --short HEAD`")
+all: test checkfmt install
+
install:
- env GOBIN=$(CURDIR)/bin \
+ env GOBIN=$(BIN) \
go install -ldflags "-X github.com/vespa-engine/vespa/client/go/build.Version=$(VERSION)" ./...
+manpages: install
+ mkdir -p $(SHARE)/man/man1
+ $(BIN)/vespa man $(SHARE)/man/man1
+
+clean:
+ rm -rf $(BIN) $(SHARE)
+
test:
go test ./...