aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 32 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index d9377df..3f534c3 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@ MAN5DIR := $(PREFIX)/share/man/man5
# over documenting the dune commands.
DUNE := opam exec --
-.PHONY: help build test check check-schema check-templates install uninstall reinstall clean fmt man doc release
+.PHONY: help build test check check-schema check-templates check-citations install uninstall reinstall clean fmt man doc release
help: ## show this help
@grep -hE '^[a-z-]+:.*##' $(MAKEFILE_LIST) | sed -E 's/:.*## /\t/' | sort
@@ -58,8 +58,10 @@ check-templates: build ## typeset every shipped template (needs pdflatex/groff;
if command -v pdflatex >/dev/null 2>&1; then \
for t in ordo grid; do \
opam exec -- dune exec colitur -- table --year 2027 --template templates/ef/$$t.tex > /tmp/$$t.tex && \
- (cd /tmp && pdflatex -halt-on-error -interaction=nonstopmode $$t.tex >/dev/null) && \
- echo "pdflatex: $$t.tex OK" || { echo "pdflatex: $$t.tex FAILED"; ok=0; }; \
+ (cd /tmp && pdflatex -halt-on-error -interaction=nonstopmode $$t.tex >/dev/null && \
+ pdflatex -halt-on-error -interaction=nonstopmode $$t.tex >/dev/null) && \
+ echo "pdflatex: $$t.tex OK (two passes, so a TOC's own \\pageref settles)" || \
+ { echo "pdflatex: $$t.tex FAILED"; ok=0; }; \
done; \
else echo "SKIPPED: pdflatex not installed -- LaTeX templates render but are NOT typeset"; fi; \
if command -v groff >/dev/null 2>&1; then \
@@ -84,6 +86,33 @@ check-templates: build ## typeset every shipped template (needs pdflatex/groff;
else echo "SKIPPED: groff not installed -- groff templates render but are NOT typeset"; fi; \
test $$ok -eq 1
+# lang/la.ini's own discipline: every celebration/season/rank name cites the
+# docs/research/LT.txt line it was transcribed from, so a claim can be
+# checked, not just trusted. tools/check_citations.py re-derives that check
+# mechanically: for every "LT.txt:<n>" citation outside a PATTERN-marked
+# block, it confirms the EXACT cited line (or an explicit "n-m" range, for
+# a heading that genuinely wraps -- no automatic +-2-line tolerance any
+# more, see the script's own docstring for why) contains the Latin text the
+# citation claims, scoped to that citation's own entry only, never to
+# prose quoted elsewhere in the surrounding comment. A citation whose pool
+# of candidate words is too thin to discriminate a right line from a wrong
+# nearby one (a heuristic, not a proof) is reported CANNOT VERIFY, not
+# silently passed, and fails the target exactly like a genuine mismatch --
+# a human adjudicates it. The script has its own self-test
+# (tools/test_check_citations.py, wired into `dune test`/`make test` as
+# well as this target) after an earlier version of this exact check was
+# found to be self-poisoning: see either docstring for the full account.
+# docs/ is gitignored, so a fresh clone has no docs/research/LT.txt at
+# all: the same "SKIPPED, loudly, exit 0" discipline check-schema/
+# check-templates already use above -- a silent skip reads as a pass,
+# which this project has hit the cost of before.
+check-citations: ## verify lang/la.ini's LT.txt:<n> citations (needs docs/research/LT.txt, gitignored; SKIPPED if absent)
+ @if command -v python3 >/dev/null 2>&1; then \
+ python3 tools/check_citations.py; \
+ else \
+ echo "SKIPPED: python3 not installed -- citations NOT verified this run"; \
+ fi
+
install: build ## install binary, calendar data, templates, schema and man pages into PREFIX (default ~/.local)
$(DUNE) dune install --prefix $(PREFIX)
@mkdir -p $(MANDIR)