diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/l3build/CHANGELOG.md | 15 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/l3build/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/l3build/l3build.pdf | bin | 740850 -> 741184 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/l3build.1 | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/l3build.man1.pdf | bin | 15602 -> 15602 bytes | |||
-rw-r--r-- | Master/texmf-dist/scripts/l3build/l3build-aux.lua | 13 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/l3build/l3build-check.lua | 15 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/l3build/l3build-ctan.lua | 20 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/l3build/l3build-install.lua | 38 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/l3build/l3build-typesetting.lua | 6 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/l3build/l3build-variables.lua | 1 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/l3build/l3build.lua | 13 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3build/l3build.dtx | 22 |
13 files changed, 122 insertions, 25 deletions
diff --git a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md index b12a3671e1d..07631b0dd91 100644 --- a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md @@ -7,6 +7,16 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2021-12-09] + +### Added +- Support for pre-constructed TDS-style sources (variable `tdsdirs`) +- Support for injection of tokens using `specialformats` + +### Changed +- If multiple configurations are present, let `l3build clean` run + on all of them by default. (issue #214) + ## [2021-12-06] ### Fixed @@ -18,7 +28,7 @@ this project uses date-based 'snapshot' version identifiers. - Documentation improvements - Use `checkengines[1]` as the default for `stdengine` - Add sanity check for `TEXMFHOME` value -- Double \ when writing the curl options, so that \ +- Double \ when writing the curl options, so that \ does not need to be doubled in note and announcement texts. ### Fixed @@ -543,7 +553,8 @@ this project uses date-based 'snapshot' version identifiers. - Rationalise short option names: removed `-d`, `-E`, `-r` - Target `cmdcheck`: specific to LaTeX kernel work -[Unreleased]: https://github.com/latex3/l3build/compare/2021-12-06...HEAD +[Unreleased]: https://github.com/latex3/l3build/compare/2021-12-09...HEAD +[2021-12-09]: https://github.com/latex3/l3build/compare/2021-12-06...2021-12-09 [2021-12-06]: https://github.com/latex3/l3build/compare/2021-11-29...2021-12-06 [2021-11-29]: https://github.com/latex3/l3build/compare/2021-11-24...2021-11-29 [2021-11-24]: https://github.com/latex3/l3build/compare/2021-11-12...2021-11-24 diff --git a/Master/texmf-dist/doc/latex/l3build/README.md b/Master/texmf-dist/doc/latex/l3build/README.md index 4dc3b68984e..2c5e33a0324 100644 --- a/Master/texmf-dist/doc/latex/l3build/README.md +++ b/Master/texmf-dist/doc/latex/l3build/README.md @@ -1,7 +1,7 @@ l3build: a testing and building system for LaTeX ================================================= -Release 2021-12-06 +Release 2021-12-09 Overview -------- diff --git a/Master/texmf-dist/doc/latex/l3build/l3build.pdf b/Master/texmf-dist/doc/latex/l3build/l3build.pdf Binary files differindex cf3bc28d554..43000ca1331 100644 --- a/Master/texmf-dist/doc/latex/l3build/l3build.pdf +++ b/Master/texmf-dist/doc/latex/l3build/l3build.pdf diff --git a/Master/texmf-dist/doc/man/man1/l3build.1 b/Master/texmf-dist/doc/man/man1/l3build.1 index 4b40afa2135..0a0fbf2344e 100644 --- a/Master/texmf-dist/doc/man/man1/l3build.1 +++ b/Master/texmf-dist/doc/man/man1/l3build.1 @@ -1,4 +1,4 @@ -.TH l3build 1 "2021-12-06" +.TH l3build 1 "2021-12-09" .SH NAME l3build \- Checking and building packages .SH SYNOPSIS diff --git a/Master/texmf-dist/doc/man/man1/l3build.man1.pdf b/Master/texmf-dist/doc/man/man1/l3build.man1.pdf Binary files differindex bba690c0388..411d02f970d 100644 --- a/Master/texmf-dist/doc/man/man1/l3build.man1.pdf +++ b/Master/texmf-dist/doc/man/man1/l3build.man1.pdf diff --git a/Master/texmf-dist/scripts/l3build/l3build-aux.lua b/Master/texmf-dist/scripts/l3build/l3build-aux.lua index 42e7f6a53a5..2f6902a7b02 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-aux.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-aux.lua @@ -166,3 +166,16 @@ function dep_install(deps) end return 0 end + +-- Construct a localtexmf including any tdsdirs +-- Needed for checking and typesetting, hence global +function localtexmf() + local paths = "" + for src,_ in pairs(tdsdirs) do + paths = paths .. os_pathsep .. abspath(src) .. "//" + end + if texmfdir and texmfdir ~= "" and direxists(texmfdir) then + paths = paths .. os_pathsep .. abspath(texmfdir) .. "//" + end + return paths +end diff --git a/Master/texmf-dist/scripts/l3build/l3build-check.lua b/Master/texmf-dist/scripts/l3build/l3build-check.lua index 249b22164a8..65ac2222717 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-check.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-check.lua @@ -719,6 +719,7 @@ function runtest(name, engine, hide, ext, test_type, breakout) cp(lvtfile, fileexists(testfiledir .. "/" .. lvtfile) and testfiledir or unpackdir, testdir) local checkopts = checkopts + local tokens = "" engine = engine or stdengine local binary = engine local format = gsub(engine,"tex$",checkformat) @@ -730,6 +731,8 @@ function runtest(name, engine, hide, ext, test_type, breakout) binary = engine_info.binary or binary format = engine_info.format or format checkopts = engine_info.options or checkopts + tokens = engine_info.tokens and (' "' .. engine_info.tokens .. '" ') + or tokens end end -- Finalise format string @@ -742,10 +745,10 @@ function runtest(name, engine, hide, ext, test_type, breakout) end -- Special casing for ConTeXt local function setup(file) - return " -jobname=" .. name .. " " .. ' "\\input ' .. file .. '" ' + return " -jobname=" .. name .. tokens .. ' "\\input ' .. file .. '" ' end if match(checkformat,"^context$") then - function setup(file) return ' "' .. file .. '" ' end + function setup(file) return tokens .. ' "' .. file .. '" ' end end local basename = testdir .. "/" .. name local gen_file = basename .. test_type.generated @@ -764,19 +767,15 @@ function runtest(name, engine, hide, ext, test_type, breakout) -- Ensure there is no stray .log file rmfile(testdir,name .. logext) local errlevels = {} - local localtexmf = "" - if texmfdir and texmfdir ~= "" and direxists(texmfdir) then - localtexmf = os_pathsep .. abspath(texmfdir) .. "//" - end 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=." .. localtexmf + os_setenv .. " TEXINPUTS=." .. localtexmf() .. (checksearch and os_pathsep or "") .. os_concat .. - os_setenv .. " LUAINPUTS=." .. localtexmf + os_setenv .. " LUAINPUTS=." .. localtexmf() .. (checksearch and os_pathsep or "") .. os_concat .. -- Avoid spurious output from (u)pTeX diff --git a/Master/texmf-dist/scripts/l3build/l3build-ctan.lua b/Master/texmf-dist/scripts/l3build/l3build-ctan.lua index 1f5aa2bc906..2efdd14067d 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-ctan.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-ctan.lua @@ -33,17 +33,28 @@ local newzip = require"l3build-zip" -- Copy files to the main CTAN release directory function copyctan() - mkdir(ctandir .. "/" .. ctanpkg) + local pkgdir = ctandir .. "/" .. ctanpkg + mkdir(pkgdir) + + -- Handle pre-formed sources: do two passes to avoid any cleandir() issues + for _,dest in pairs(tdsdirs) do + mkdir(pkgdir .. "/" .. dest) + end + for src,dest in pairs(tdsdirs) do + cp("*",src,pkgdir .. "/" .. dest) + end + + -- Now deal with the one-at-a-time files local function copyfiles(files,source) if source == currentdir or flatten then for _,filetype in pairs(files) do - cp(filetype,source,ctandir .. "/" .. ctanpkg) + cp(filetype,source,pkgdir) end else for _,filetype in pairs(files) do for _,p in ipairs(tree(source,filetype)) do local path = dirname(p.src) - local ctantarget = ctandir .. "/" .. ctanpkg .. "/" + local ctantarget = pkgdir .. "/" .. source .. "/" .. path mkdir(ctantarget) cp(p.src,source,ctantarget) @@ -57,8 +68,9 @@ function copyctan() end copyfiles(sourcefiles,sourcefiledir) for _,file in pairs(textfiles) do - cp(file, textfiledir, ctandir .. "/" .. ctanpkg) + cp(file, textfiledir, pkgdir) end + end function bundlectan() diff --git a/Master/texmf-dist/scripts/l3build/l3build-install.lua b/Master/texmf-dist/scripts/l3build/l3build-install.lua index 78fe2d4b2f6..6a28463e653 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-install.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-install.lua @@ -32,6 +32,7 @@ local var_value = kpse.var_value local gsub = string.gsub local lower = string.lower local match = string.match +local format = string.format local insert = table.insert @@ -107,6 +108,23 @@ function uninstall() errorlevel = zapdir(path) if errorlevel ~= 0 then return errorlevel end end + -- We remove all directories which contain at least one ordinary file in the source tree + for src, dest in pairs(tdsdirs) do + dest = dest .. '/' + local skipdir + for _, p in ipairs(tree(src, '**')) do + local src = p.src:sub(2) -- Skip the first '.' + if skipdir and src:sub(1, #skipdir) ~= skipdir then + skipdir = nil + end + if (not skipdir) and (not direxists(p.cwd)) then + skipdir = dirname(src) + errorlevel = zapdir(dest .. skipdir) + if errorlevel ~= 0 then return errorlevel end + skipdir = skipdir .. '/' + end + end + end return 0 end @@ -287,6 +305,26 @@ function install_files(target,full,dry_run) + create_install_map(unpackdir,"makeindex",{makeindexfiles},module) + create_install_map(unpackdir,"scripts",{scriptfiles},module) + for src, dest in pairs(tdsdirs) do + dest = target .. '/' .. dest + insert(installmap, + {file = '*', source = src, dest = dest}) + dest = dest .. '/' + local skipdir + for _, p in ipairs(tree(src, '**')) do + local src = p.src:sub(2) -- Skip the first '.' + if skipdir and src:sub(1, #skipdir) ~= skipdir then + skipdir = nil + end + if (not skipdir) and (not direxists(p.cwd)) then + skipdir = dirname(src) + errorlevel = cleandir(dest .. skipdir) + if errorlevel ~= 0 then return errorlevel end + skipdir = skipdir .. '/' + end + end + end + if errorlevel ~= 0 then return errorlevel end -- Files are all copied in one shot: this ensures that cleandir() diff --git a/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua b/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua index cc04ac1e38e..c173b2593b1 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua @@ -54,11 +54,7 @@ function runcmd(cmd,dir,vars) vars = vars or {} -- Allow for local texmf files local env = os_setenv .. " TEXMFCNF=." .. os_pathsep - local localtexmf = "" - if texmfdir and texmfdir ~= "" and direxists(texmfdir) then - localtexmf = os_pathsep .. abspath(texmfdir) .. "//" - end - local envpaths = "." .. localtexmf .. os_pathsep + local envpaths = "." .. localtexmf() .. os_pathsep .. abspath(localdir) .. os_pathsep .. dir .. (typesetsearch and os_pathsep or "") -- Deal with spaces in paths diff --git a/Master/texmf-dist/scripts/l3build/l3build-variables.lua b/Master/texmf-dist/scripts/l3build/l3build-variables.lua index d78c39c92f6..ffabf3490a7 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-variables.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-variables.lua @@ -229,6 +229,7 @@ manifestfile = manifestfile or "MANIFEST.md" -- Non-standard installation locations tdslocations = tdslocations or { } +tdsdirs = tdsdirs or {} -- Upload settings curlexe = curlexe or "curl" diff --git a/Master/texmf-dist/scripts/l3build/l3build.lua b/Master/texmf-dist/scripts/l3build/l3build.lua index 2c555373f60..1d8d58c6946 100755 --- a/Master/texmf-dist/scripts/l3build/l3build.lua +++ b/Master/texmf-dist/scripts/l3build/l3build.lua @@ -25,7 +25,7 @@ for those people who are interested. --]] -- Version information -release_date = "2021-12-06" +release_date = "2021-12-09" -- File operations are aided by the LuaFileSystem module local lfs = require("lfs") @@ -133,8 +133,8 @@ else checkconfigs = options["config"] or checkconfigs end -if options["target"] == "check" then - if #checkconfigs > 1 then +if #checkconfigs > 1 then + if options["target"] == "check" then local errorlevel = 0 local opts = options local failed = { } @@ -196,6 +196,13 @@ if options["target"] == "check" then -- Avoid running the 'main' set of tests twice exit(0) end + elseif options["target"] == "clean" then + local failure + for i = 1, #checkconfigs do + opts["config"] = {checkconfigs[i]} + failure = 0 ~= call({"."}, "clean", opts) or failure + end + exit(failure and 1 or 0) end end if #checkconfigs == 1 and diff --git a/Master/texmf-dist/source/latex/l3build/l3build.dtx b/Master/texmf-dist/source/latex/l3build/l3build.dtx index 41ff08dc725..b11dc1adcb8 100644 --- a/Master/texmf-dist/source/latex/l3build/l3build.dtx +++ b/Master/texmf-dist/source/latex/l3build/l3build.dtx @@ -161,6 +161,7 @@ \luavarset{manifestfile} {"MANIFEST.md"} {Filename to use for the manifest file} \luavarseparator \luavarset{tdslocations}{\{ \}}{Map for non-standard file installations} +\luavarset{tdsdirs}{\{ \}}{List of ready-to-use source locations} \luavarseparator \luavarset{uploadconfig} {\meta{table}} {Metadata to describe the package for CTAN (see Table~\ref{tab:upload-setup})} \luavarset{uploadconfig.pkg}{ctanpkg}{Name of the CTAN package} @@ -236,7 +237,7 @@ % }^^A % } % -% \date{Released 2021-12-06} +% \date{Released 2021-12-09} % % \maketitle % \tableofcontents @@ -774,6 +775,22 @@ % A series of example layouts and matching |build.lua| files are available from % \url{https://github.com/latex3/l3build/tree/master/examples}. % +% For more complex layouts in which sources are laid out in TDS format and +% should be used directly, the table \var{tdsdirs} is available. Each entry +% is a source directory and the matching installation target, for example +% \begin{Verbatim} +% tdsdirs = {sources = "tex"} +% \end{Verbatim} +% This would enable a directory \texttt{sources} in the development area to +% be used for testing and typesetting, and for it to be installed into the +% \texttt{tex} tree when building a release. When this method is used, the +% sources are \emph{not} copied into the local tree: like \var{texmfdir}, +% they are added directly to the areas accessible during a testing or +% typesetting run. When using this approach, the files listed in +% \var{typesetfiles} \emph{must} still be included in \var{docfiles}: +% they have to be directly visible to \pkg{l3build}, not found by +% \texttt{kpsewhich} searching. +% % \subsection{Non-standard formats/binaries} % % The standard approach used by \pkg{l3build} is to use a combination @@ -799,6 +816,9 @@ % xetex = {binary = "texexec", format = "", options = "--xetex"} % } % \end{verbatim} +% Additional tokens can also be injected before the loading of a test file using +% the |tokens| entry: this might for example be used to select a graphics driver +% with a DVI-based route. % % \subsection{Output normalisation} % \label{sec:norm} |