Use a single variable for install prefix
@@ -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 ./...
