Makefile: Include some custom LaTeX setup.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 18 May 2023 21:54:33 +0000 (22:54 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 18 May 2023 21:54:33 +0000 (22:54 +0100)
And use it to show more error context.

Makefile

index 50a450e..3742eb7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -98,6 +98,9 @@ $$(wordlist 2,$$(words $$($3_OUT)),$$($3_OUT)): \
        $$(firstword $$($3_OUT))
 endef
 
+## LaTeX configuration.
+LATEX_INITCMDS          = \errorcontextlines=\maxdimen
+
 ###--------------------------------------------------------------------------
 ### Project specific definitions.
 
@@ -143,10 +146,10 @@ REALCLEANFILES            += $(OUT)
 define run-latex
 rm -rf t.$@/ && mkdir t.$@/ && cd t.$@/ && \
 TEXINPUTS=..:$$TEXINPUTS && export TEXINPUTS && \
-$1 "\def\indexing{n} \nonstopmode \input $<" $(v_null) && \
-$1 "\def\indexing{y} \nonstopmode \input $<" $(v_null) && \
+$1 "\def\indexing{n} \nonstopmode $(LATEX_INITCMDS) \input $<" $(v_null) && \
+$1 "\def\indexing{y} \nonstopmode $(LATEX_INITCMDS) \input $<" $(v_null) && \
 makeindex $(v_quiet) -s gind.ist $*.idx $(v_null) && \
-$1 "\def\indexing{n} \nonstopmode \input $<" $(v_null) && \
+$1 "\def\indexing{n} \nonstopmode $(LATEX_INITCMDS) \input $<" $(v_null) && \
 mv $@ $*.log ../ && cd ../ && rm -rf t.$@/
 endef
 CLEANFILES             += *.log