diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-28 18:01:33 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-28 18:01:33 +0200 |
| commit | 5e1664b8008675177a551aff1de371f54d4e20e4 (patch) | |
| tree | ffe405e1e2767890e473f75f474d2781af683f1b /Makefile | |
| parent | f7344bb3de2885323a785bdc8d087bc034407fc4 (diff) | |
| download | lectio-5e1664b8008675177a551aff1de371f54d4e20e4.tar.gz lectio-5e1664b8008675177a551aff1de371f54d4e20e4.zip | |
bible: embed only the Vulgate by default; other corpora opt-in
Split the bundled corpora so the default binary carries only the
public-domain Latin Vulgate. wuj/drb/grb move to corpora_optional/ and are
compiled in only with `-tags fullbible`, or dropped into the user corpora
dir at runtime. This keeps the distributed AGPL binary free of third-party
scripture text -- bible corpora are not covered by lectio's licence.
- bible: read corpus files/metadata from core + optional embed FS
(embReadCorpus/embCorpusFiles); optionalFS is set only under the tag.
- config: default `versions` now reflects corpora actually available in the
build (Vulgate first), so a vul-only binary offers no absent versions.
- Makefile: `make build` = vul only; `make build-full` embeds the rest;
`make test` runs with -tags fullbible; check-corpora validates both dirs.
- tests: corpusmeta asserts on vul (the always-embedded corpus); the
versions-default expectation follows availableVersions().
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -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 |
