]> gitweb.michael.orlitzky.com - mjotex.git/commitdiff
GNUmakefile.mjo: allow SRCS to be prepopulated
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 28 Feb 2026 03:45:09 +0000 (22:45 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 28 Feb 2026 03:45:09 +0000 (22:45 -0500)
We don't want to kpsewhich everything. Often, there are additional
fixed files that should go in SRCS, and that don't need to be found at
build time. By using "+=" the first time we modify SRCS, we make it
possible for consumers to supply their own SRCS.

GNUmakefile.mjo

index 72fbb03ad0a3c72a5fe1a7c8c837405b1bc0fad0..3aaf3237c86d3be096246c518f5b971e11502892 100644 (file)
@@ -66,7 +66,11 @@ endif
 # Use kpsewhich (from the kpathsea suite) to find the absolute paths
 # of the bibtex/mjotex files listed in in $(BIBS)/$(MJOTEX). The SRCS
 # variable should contain all (Bib)TeX source files for the document.
-SRCS = $(PN).tex
+# We append to $(SRCS) here, even though it will typically be empty,
+# to allow projects to pre-populate it. (In many cases, there will
+# be extra tikz images or whatever that qualify as source files,
+# should trigger a rebuild, and do not need to be kpsewhich'd).
+SRCS += $(PN).tex
 ifdef BIBS
 BIBPATHS = $(shell kpsewhich $(BIBS))
 SRCS += $(BIBPATHS)