[latex3-commits] [git/LaTeX3-latex3-l3build] master: New texmfdir variable (324f05e)
Joseph Wright
joseph.wright at morningstar2.co.uk
Wed Sep 25 12:36:46 CEST 2019
Repository : https://github.com/latex3/l3build
On branch : master
Link : https://github.com/latex3/l3build/commit/324f05e7b3ce1ca819a98e90a09a6383ea96a1ee
>---------------------------------------------------------------
commit 324f05e7b3ce1ca819a98e90a09a6383ea96a1ee
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Sep 25 11:36:46 2019 +0100
New texmfdir variable
>---------------------------------------------------------------
324f05e7b3ce1ca819a98e90a09a6383ea96a1ee
CHANGELOG.md | 4 ++++
l3build-check.lua | 11 +++++++++--
l3build-typesetting.lua | 5 +++++
l3build-variables.lua | 1 +
l3build.dtx | 3 +++
5 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a39e6a7..6a170fd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Added
+
+- New `texmfdir` variable for more complex local additions
+
### Fixed
- Clean out all configuration test dirs (see #98)
diff --git a/l3build-check.lua b/l3build-check.lua
index 8d1d58a..731d428 100644
--- a/l3build-check.lua
+++ b/l3build-check.lua
@@ -721,14 +721,21 @@ function runtest(name, engine, hide, ext, pdfmode, breakout)
-- Ensure there is no stray .log file
rm(testdir,name .. logext)
local errlevels = {}
+ local localtexmf = ""
+ if texmfdir and texmfdir ~= "" then
+ localtexmf = os_pathsep .. abspath(texmfdir) .. "//"
+ end
+ local texmfdir = abspath(texmfdir) .. "//"
for i = 1, checkruns do
errlevels[i] = run(
testdir,
-- No use of localdir here as the files get copied to testdir:
-- avoids any paths in the logs
- os_setenv .. " TEXINPUTS=." .. (checksearch and os_pathsep or "")
+ os_setenv .. " TEXINPUTS=." .. localtexmf
+ .. (checksearch and os_pathsep or "")
.. os_concat ..
- os_setenv .. " LUAINPUTS=." .. (checksearch and os_pathsep or "")
+ os_setenv .. " LUAINPUTS=." .. localtexmf
+ .. (checksearch and os_pathsep or "")
.. os_concat ..
-- Avoid spurious output from (u)pTeX
os_setenv .. " GUESS_INPUT_KANJI_ENCODING=0"
diff --git a/l3build-typesetting.lua b/l3build-typesetting.lua
index eb2974c..8e5b17b 100644
--- a/l3build-typesetting.lua
+++ b/l3build-typesetting.lua
@@ -63,7 +63,12 @@ function runcmd(cmd,dir,vars)
local vars = vars or {}
-- Allow for local texmf files
local env = os_setenv .. " TEXMFCNF=." .. os_pathsep
+ local localtexmf = ""
+ if texmfdir and texmfdir ~= "" then
+ localtexmf = os_pathsep .. abspath(texmfdir) .. "//"
+ end
local envpaths = "." .. os_pathsep
+ .. localtexmf
.. abspath(localdir) .. os_pathsep
.. dir .. (typesetsearch and os_pathsep or "")
-- Deal with spaces in paths
diff --git a/l3build-variables.lua b/l3build-variables.lua
index 6eb0f37..11186c0 100644
--- a/l3build-variables.lua
+++ b/l3build-variables.lua
@@ -46,6 +46,7 @@ sourcefiledir = sourcefiledir or currentdir
supportdir = supportdir or maindir .. "/support"
testfiledir = testfiledir or currentdir .. "/testfiles"
testsuppdir = testsuppdir or testfiledir .. "/support"
+texmfdir = texmfdir or maindir .. "/texmf"
-- Structure within a development area
builddir = builddir or maindir .. "/build"
diff --git a/l3build.dtx b/l3build.dtx
index a7e04a1..75f4244 100644
--- a/l3build.dtx
+++ b/l3build.dtx
@@ -63,6 +63,7 @@
\luavarset{supportdir} {maindir .. "/support"} {Directory containing general support files}
\luavarset{testfiledir}{"./testfiles"} {Directory containing test files}
\luavarset{testsuppdir}{testfiledir .. "/support"}{Directory containing test-specific support files}
+\luavarset{texmfdir}{maindir .. "/texmf"}{Directory containing support files in tree form}
\luavarseparator
\luavarset{builddir} {maindir .. "/build"} {Directory for building and testing}
\luavarset{distribdir}{builddir .. "/distrib"}{Directory for generating distribution structure}
@@ -387,6 +388,8 @@
% \item any files in the directory \var{testsuppdir};
% \item any files that match \var{checksuppfiles} in the \var{supportdir}.
% \end{itemize}
+% The \var{texmfdir} is also made available to the tests (if defined and
+% non-empty).
% This range of possibilities allow sensible defaults but significant flexibility for defining your own test setups.
%
% Checking can be performed with any or all of the `engines' \texttt{pdftex}, \texttt{xetex}, and \texttt{luatex}.
More information about the latex3-commits
mailing list