aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 192c591..29b3871 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ LECTIO_UI := lectio-ui
LECTIO_WEB := lectio-web
PREFIX ?= $(HOME)/.local
BINDIR := $(PREFIX)/bin
+MANDIR := $(PREFIX)/share/man/man1
.PHONY: help build build-full install uninstall test vet fmt clean cross check-corpora add-corpus
help: ## show this help
@@ -15,14 +16,16 @@ build-full: ## build all three with the optional corpora (wuj, drb, grb) embedde
go build -tags fullbible -o $(LECTIO) ./cmd/lectio
go build -tags fullbible -o $(LECTIO_UI) ./cmd/lectio-ui
go build -tags fullbible -o $(LECTIO_WEB) ./cmd/lectio-web
-install: ## build and install all three to $(BINDIR)
- @mkdir -p $(BINDIR)
+install: ## build and install the three binaries and man pages
+ @mkdir -p $(BINDIR) $(MANDIR)
go build -o $(BINDIR)/$(LECTIO) ./cmd/lectio
go build -o $(BINDIR)/$(LECTIO_UI) ./cmd/lectio-ui
go build -o $(BINDIR)/$(LECTIO_WEB) ./cmd/lectio-web
- @echo "installed $(BINDIR)/$(LECTIO), $(BINDIR)/$(LECTIO_UI) and $(BINDIR)/$(LECTIO_WEB)"
-uninstall: ## remove installed binaries
+ install -m 644 man/lectio.1 man/lectio-ui.1 man/lectio-web.1 $(MANDIR)
+ @echo "installed binaries to $(BINDIR) and man pages to $(MANDIR)"
+uninstall: ## remove installed binaries and man pages
rm -f $(BINDIR)/$(LECTIO) $(BINDIR)/$(LECTIO_UI) $(BINDIR)/$(LECTIO_WEB)
+ rm -f $(MANDIR)/lectio.1 $(MANDIR)/lectio-ui.1 $(MANDIR)/lectio-web.1
test: check-corpora ## run tests (with all corpora embedded, so corpus tests can resolve text)
go test -tags fullbible ./...
vet: ## go vet