diff options
author | Martin Polden <mpolden@mpolden.no> | 2021-09-07 14:55:32 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2021-09-07 15:02:18 +0200 |
commit | 86cae20741ae578af3f4f8920b43a7064a7bb800 (patch) | |
tree | 4056afc26dcb343468a95084fba5d8ef0c8fa7a8 /client/go | |
parent | a364de5217b3ff3028dd833ba99374e893bc037f (diff) |
Add target for generating man pages
Diffstat (limited to 'client/go')
-rw-r--r-- | client/go/.gitignore | 1 | ||||
-rw-r--r-- | client/go/Makefile | 15 |
2 files changed, 13 insertions, 3 deletions
diff --git a/client/go/.gitignore b/client/go/.gitignore index 46feae8d00e..b35a2cef362 100644 --- a/client/go/.gitignore +++ b/client/go/.gitignore @@ -1,4 +1,5 @@ bin/ +share/ !Makefile !build/ !target/ 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 ./... |