[latex3-commits] [git/l3build] master: New auxfiles variable (edd62fd)
Joseph Wright
joseph.wright at morningstar2.co.uk
Sun Dec 17 12:59:47 CET 2017
Repository : https://github.com/latex3/l3build
On branch : master
Link : https://github.com/latex3/l3build/commit/edd62fdbee397137c0c3bbb7214784443ce57c2e
>---------------------------------------------------------------
commit edd62fdbee397137c0c3bbb7214784443ce57c2e
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sun Dec 17 11:59:47 2017 +0000
New auxfiles variable
This allows a more 'conservative' approach to moving .aux files, etc.,
when running tests. The need to do that shows up with e.g. beamer, where
the test files might have the same name as some required support files
(in the beamer case, beamer theme files).
>---------------------------------------------------------------
edd62fdbee397137c0c3bbb7214784443ce57c2e
l3build.dtx | 1 +
l3build.lua | 20 +++++++++++---------
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/l3build.dtx b/l3build.dtx
index 2c674d4..b0ba140 100644
--- a/l3build.dtx
+++ b/l3build.dtx
@@ -75,6 +75,7 @@
\luavarset{tdsdir} {distribdir .. "/tds"} {Directory for organised files into TDS structure}
\luavarset{tdsroot}{"latex"}{Root directory of the TDS structure for the bundle/module to be installed into}
\luavarseparator
+\luavarset{auxfiles} {\{"*.aux", "*.lof", "*.lot", "*.toc"\}}{Secondary files to be saved as part of running tests}
\luavarset{bibfiles} {\{"*.bib"\}}{\BibTeX{} database files}
\luavarset{binaryfiles} {\{"*.pdf", "*.zip"\}}{Files to be added in binary mode to zip files}
\luavarset{bstfiles} {\{"*.bst"\}}{\BibTeX{} style files}
diff --git a/l3build.lua b/l3build.lua
index e117923..df8a16e 100644
--- a/l3build.lua
+++ b/l3build.lua
@@ -96,6 +96,7 @@ end
-- File types for various operations
-- Use Unix-style globs
-- All of these may be set earlier, so a initialised conditionally
+auxfiles = auxfiles or {"*.aux", "*.lof", "*.lot", "*.toc"}
bibfiles = bibfiles or {"*.bib"}
binaryfiles = binaryfiles or {"*.pdf", "*.zip"}
bstfiles = bstfiles or {"*.bst"}
@@ -1598,15 +1599,16 @@ function runtest(name, engine, hide, ext, makepdf)
end
formatlog(logfile, newfile, engine, errlevels)
-- Store secondary files for this engine
- for _,i in ipairs(filelist(testdir, name .. ".???")) do
- local ext = match(i, "%....")
- if ext ~= lvtext and ext ~= tlgext and ext ~= lveext and ext ~= logext then
- if not fileexists(testsuppdir .. "/" .. i) then
- ren(
- testdir, i, gsub(
- i, gsub(name, "%-", "%%-"), name .. "." .. engine
- )
- )
+ for _,filetype in pairs(auxfiles) do
+ for _,file in pairs(filelist(testdir, filetype)) do
+ if match(file,"^" .. name) then
+ local ext = match(file, "%.[^.]+$")
+ if ext ~= lvtext and
+ ext ~= tlgext and
+ ext ~= lveext and
+ ext ~= logext then
+ ren(testdir, file, gsub(file, "(%.[^.]+)$", "." .. engine .. "%1"))
+ end
end
end
end
More information about the latex3-commits
mailing list