aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 11 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 50fcb87..192c591 100644
--- a/Makefile
+++ b/Makefile
@@ -4,13 +4,17 @@ LECTIO_WEB := lectio-web
PREFIX ?= $(HOME)/.local
BINDIR := $(PREFIX)/bin
-.PHONY: help build install uninstall test vet fmt clean cross check-corpora add-corpus
+.PHONY: help build build-full install uninstall test vet fmt clean cross check-corpora add-corpus
help: ## show this help
@grep -hE '^[a-z-]+:.*##' $(MAKEFILE_LIST) | sed -E 's/:.*## /\t/' | sort
-build: ## build ./lectio, ./lectio-ui and ./lectio-web
+build: ## build all three binaries (embeds only the Vulgate)
go build -o $(LECTIO) ./cmd/lectio
go build -o $(LECTIO_UI) ./cmd/lectio-ui
go build -o $(LECTIO_WEB) ./cmd/lectio-web
+build-full: ## build all three with the optional corpora (wuj, drb, grb) embedded
+ 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)
go build -o $(BINDIR)/$(LECTIO) ./cmd/lectio
@@ -19,8 +23,8 @@ install: ## build and install all three to $(BINDIR)
@echo "installed $(BINDIR)/$(LECTIO), $(BINDIR)/$(LECTIO_UI) and $(BINDIR)/$(LECTIO_WEB)"
uninstall: ## remove installed binaries
rm -f $(BINDIR)/$(LECTIO) $(BINDIR)/$(LECTIO_UI) $(BINDIR)/$(LECTIO_WEB)
-test: check-corpora ## run tests
- go test ./...
+test: check-corpora ## run tests (with all corpora embedded, so corpus tests can resolve text)
+ go test -tags fullbible ./...
vet: ## go vet
go vet ./...
fmt: ## gofmt the tree
@@ -43,12 +47,12 @@ cross: ## cross-compile into dist/
# (…(Theodotion)/(Sinaiticus)/(Vaticanus)) that are not in the 73-key Catholic
# canon and would collide with canonical keys if renamed. --corpus-check grb
# correctly reports these; they are by design, not defects to fix here.
-check-corpora: ## validate all embedded bible corpora (skips grb, see comment)
- @for f in internal/bible/corpora/*.tsv; do \
+check-corpora: ## validate every bundled corpus, core + optional (skips grb, see comment)
+ @for f in internal/bible/corpora/*.tsv internal/bible/corpora_optional/*.tsv; do \
code=$$(basename $$f .tsv); \
[ "$$code" = grb ] && { echo "skipping grb (broader LXX canon)"; continue; }; \
echo "checking $$code"; \
- go run ./cmd/lectio --corpus-check $$code || exit 1; \
+ go run -tags fullbible ./cmd/lectio --corpus-check $$code || exit 1; \
done
# Validate then embed a corpus pair: make add-corpus CORPUS=fr-crampon SRC=/path/to/dir