texlive[51478] trunk: l3build (26jun19)
commits+karl at tug.org
commits+karl at tug.org
Wed Jun 26 22:53:25 CEST 2019
Revision: 51478
http://tug.org/svn/texlive?view=revision&revision=51478
Author: karl
Date: 2019-06-26 22:53:24 +0200 (Wed, 26 Jun 2019)
Log Message:
-----------
l3build (26jun19)
Modified Paths:
--------------
trunk/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua
trunk/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
trunk/Master/texmf-dist/doc/latex/l3build/README.md
trunk/Master/texmf-dist/doc/latex/l3build/l3build.pdf
trunk/Master/texmf-dist/doc/man/man1/l3build.1
trunk/Master/texmf-dist/doc/man/man1/l3build.man1.pdf
trunk/Master/texmf-dist/scripts/l3build/l3build-check.lua
trunk/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua
trunk/Master/texmf-dist/scripts/l3build/l3build.lua
trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx
Modified: trunk/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua 2019-06-26 20:53:06 UTC (rev 51477)
+++ trunk/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua 2019-06-26 20:53:24 UTC (rev 51478)
@@ -25,7 +25,7 @@
--]]
-- Version information
-release_date = "2019-06-18"
+release_date = "2019-06-26"
-- File operations are aided by the LuaFileSystem module
local lfs = require("lfs")
Modified: trunk/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md 2019-06-26 20:53:06 UTC (rev 51477)
+++ trunk/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md 2019-06-26 20:53:24 UTC (rev 51478)
@@ -7,6 +7,21 @@
## [Unreleased]
+## [2019-06-26]
+
+### Added
+
+- Support for HarfTeX (see #92)
+
+### Changed
+
+- Support for normalisation of LuaTeX v1.10 stack information
+ (may require new `.tlg` files)
+
+### Fixed
+
+- Support for spaces in paths when typesetting (see #91)
+
## [2019-06-18]
### Added
@@ -262,7 +277,8 @@
- Rationalise short option names: removed `-d`, `-E`, `-r`
- Target `cmdcheck`: specific to LaTeX3 kernel work
-[Unreleased]: https://github.com/latex3/l3build/compare/2019-06-18...HEAD
+[Unreleased]: https://github.com/latex3/l3build/compare/2019-06-26...HEAD
+[2019-06-26]: https://github.com/latex3/l3build/compare/2019-06-18...2019-06-26
[2019-06-18]: https://github.com/latex3/l3build/compare/2019-02-10...2019-06-18
[2019-02-10]: https://github.com/latex3/l3build/compare/2019-02-06...2019-02-10
[2019-02-06]: https://github.com/latex3/l3build/compare/2018-12-23...2019-02-06
Modified: trunk/Master/texmf-dist/doc/latex/l3build/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/l3build/README.md 2019-06-26 20:53:06 UTC (rev 51477)
+++ trunk/Master/texmf-dist/doc/latex/l3build/README.md 2019-06-26 20:53:24 UTC (rev 51478)
@@ -1,7 +1,7 @@
l3build: a testing and building system for LaTeX3
=================================================
-Release 2019-06-18
+Release 2019-06-26
Overview
--------
Modified: trunk/Master/texmf-dist/doc/latex/l3build/l3build.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/man/man1/l3build.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/l3build.1 2019-06-26 20:53:06 UTC (rev 51477)
+++ trunk/Master/texmf-dist/doc/man/man1/l3build.1 2019-06-26 20:53:24 UTC (rev 51478)
@@ -1,4 +1,4 @@
-.TH l3build 1 "2019-06-18"
+.TH l3build 1 "2019-06-26"
.SH NAME
l3build \- Checking and building packages
.SH SYNOPSIS
Modified: trunk/Master/texmf-dist/doc/man/man1/l3build.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/scripts/l3build/l3build-check.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/l3build/l3build-check.lua 2019-06-26 20:53:06 UTC (rev 51477)
+++ trunk/Master/texmf-dist/scripts/l3build/l3build-check.lua 2019-06-26 20:53:24 UTC (rev 51478)
@@ -98,7 +98,7 @@
-- the 'business' part from the tests and removes system-dependent stuff
local function normalize_log(content,engine,errlevels)
local maxprintline = maxprintline
- if match(engine,"^lua") then
+ if match(engine,"^lua") or match(engine,"^harf") then
maxprintline = maxprintline + 1 -- Deal with an out-by-one error
end
local function killcheck(line)
@@ -123,7 +123,9 @@
-- do this before wrapping lines
line = gsub(line, "^l%.%d+ ", "l. ...")
-- Also from lua stack traces.
- line = gsub(line, "lua:%d+: in function", "lua:...: in function")
+ for str,_ in pairs({"field","function","upvalue"}) do
+ line = gsub(line, "lua:%d+: in " .. str, "lua:...: in " .. str)
+ end
-- Allow for wrapped lines: preserve the content and wrap
-- Skip lines that have an explicit marker for truncation
if len(line) == maxprintline and
@@ -637,7 +639,7 @@
end
-- Do additional log formatting if the engine is LuaTeX, there is no
-- LuaTeX-specific .tlg file and the default engine is not LuaTeX
- if match(engine,"^lua")
+ if match(engine,"^lua") or match(engine,"harf")
and not match(tlgfile, "%.luatex" .. "%" .. tlgext)
and not match(stdengine,"^lua")
then
Modified: trunk/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua 2019-06-26 20:53:06 UTC (rev 51477)
+++ trunk/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua 2019-06-26 20:53:24 UTC (rev 51478)
@@ -1,6 +1,6 @@
--[[
-File l3build-typesetting.lua Copyright (C) 2018 The LaTeX3 Project
+File l3build-typesetting.lua Copyright (C) 2018,2019 The LaTeX3 Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -26,9 +26,15 @@
-- Auxiliary functions for typesetting: need to be generally available
--
-local gsub = string.gsub
-local match = string.match
+local ipairs = ipairs
+local pairs = pairs
+local print = print
+local gsub = string.gsub
+local match = string.match
+
+local os_type = os.type
+
function dvitopdf(name, dir, engine, hide)
if match(engine, "^u?ptex$") then
run(
@@ -51,37 +57,36 @@
end
-- An auxiliary used to set up the environmental variables
-function runtool(subdir, dir, envvar, command)
- dir = dir or "."
- return(
- run(
- typesetdir .. "/" .. subdir,
- (forcedocepoch and setepoch() or "") ..
- -- Allow for local texmf files
- os_setenv .. " TEXMFCNF=." .. os_pathsep
- .. os_concat ..
- os_setenv .. " " .. envvar .. "=." .. os_pathsep
- .. abspath(localdir) .. os_pathsep
- .. abspath(dir .. "/" .. subdir)
- .. (typesetsearch and os_pathsep or "")
- .. os_concat ..
- command
- )
- )
+function runcmd(cmd,dir,vars)
+ local dir = dir or "."
+ local dir = abspath(dir)
+ local vars = vars or {}
+ -- Allow for local texmf files
+ local env = os_setenv .. " TEXMFCNF=." .. os_pathsep
+ local envpaths = "." .. os_pathsep
+ .. abspath(localdir) .. os_pathsep
+ .. dir .. (typesetsearch and os_pathsep or "")
+ -- Deal with spaces in paths
+ if os_type == "windows" and match(envpaths," ") then
+ envpaths = gsub(envpaths,'"','')
+ end
+ for _,var in pairs(vars) do
+ env = env .. os_concat .. os_setenv .. " " .. var .. "=" .. envpaths
+ end
+ return run(dir,(forcedocepoch and setepoch() or "") .. env .. os_concat .. cmd)
end
-function biber(name, dir)
- if fileexists(typesetdir .. "/" .. name .. ".bcf") then
- local path, name = splitpath(name)
- return(
- runtool(path, dir, "BIBINPUTS", biberexe .. " " .. biberopts .. " " .. name)
- )
+function biber(name,dir)
+ if fileexists(dir .. "/" .. name .. ".bcf") then
+ return
+ runcmd(biberexe .. " " .. biberopts .. " " .. name,dir,{"BIBINPUTS"})
end
return 0
end
-function bibtex(name, dir)
- if fileexists(typesetdir .. "/" .. name .. ".aux") then
+function bibtex(name,dir)
+ local dir = dir or "."
+ if fileexists(dir .. "/" .. name .. ".aux") then
-- LaTeX always generates an .aux file, so there is a need to
-- look inside it for a \citation line
local grep
@@ -90,103 +95,76 @@
else
grep = "\\\\\\\\"
end
- local path, name = splitpath(name)
- if run(
- typesetdir,
+ if run(dir,
os_grepexe .. " \"^" .. grep .. "citation{\" " .. name .. ".aux > "
.. os_null
- ) + run(
- typesetdir,
+ ) + run(dir,
os_grepexe .. " \"^" .. grep .. "bibdata{\" " .. name .. ".aux > "
.. os_null
) == 0 then
- return(
- -- Cheat slightly as we need to set two variables
- runtool(
- path, dir,
- "BIBINPUTS",
- os_setenv .. " BSTINPUTS=." .. os_pathsep
- .. abspath(localdir)
- .. (typesetsearch and os_pathsep or "") ..
- os_concat ..
- bibtexexe .. " " .. bibtexopts .. " " .. name
- )
- )
+ return runcmd(bibtexexe .. " " .. bibtexopts .. " " .. name,dir,
+ {"BIBINPUTS","BSTINPUTS"})
end
end
return 0
end
-function makeindex(name, dir, inext, outext, logext, style)
- if fileexists(typesetdir .. "/" .. name .. inext) then
- local path, name = splitpath(name)
+function makeindex(name,dir,inext,outext,logext,style)
+ local dir = dir or "."
+ if fileexists(dir .. "/" .. name .. inext) then
if style == "" then style = nil end
- return(
- runtool(
- path, dir,
- "INDEXSTYLE",
- makeindexexe .. " " .. makeindexopts
- .. " -o " .. name .. outext
- .. (style and (" -s " .. style) or "")
- .. " -t " .. name .. logext .. " " .. name .. inext
- )
- )
+ return runcmd(makeindexexe .. " " .. makeindexopts
+ .. " -o " .. name .. outext
+ .. (style and (" -s " .. style) or "")
+ .. " -t " .. name .. logext .. " " .. name .. inext,
+ dir,
+ {"INDEXSTYLE"})
end
return 0
end
-function tex(file, dir)
- local path, name = splitpath(file)
- return(
- runtool(
- path, dir,
- "TEXINPUTS",
- typesetexe .. " " .. typesetopts .. " \"" .. typesetcmds
- .. "\\input " .. name .. "\""
- )
- )
+function tex(file,dir)
+ local dir = dir or "."
+ return runcmd(typesetexe .. " " .. typesetopts .. " \"" .. typesetcmds
+ .. "\\input " .. file .. "\"",
+ dir,{"TEXINPUTS"})
end
-function typesetpdf(file, dir)
- local name = gsub(file, "%.[^.]+$", "")
+local function typesetpdf(file,dir)
+ local dir = dir or "."
+ local name = jobname(file)
print("Typesetting " .. name)
- local errorlevel = typeset(file, dir)
- if errorlevel == 0 then
- name = name .. ".pdf"
- os.remove(jobname(name))
- cp(name, typesetdir, docfiledir)
- else
+ local errorlevel = typeset(file,dir)
+ if errorlevel ~= 0 then
print(" ! Compilation failed")
+ return errorlevel
end
- return errorlevel
+ pdfname = name .. pdfext
+ rm(docfiledir,pdfname)
+ return cp(pdfname,dir,docfiledir)
end
-typeset = typeset or function(file, dir)
+typeset = typeset or function(file,dir)
dir = dir or "."
- local errorlevel = tex(file, dir)
+ local errorlevel = tex(file,dir)
if errorlevel ~= 0 then
return errorlevel
- else
- local name = jobname(file)
- errorlevel = biber(name, dir) + bibtex(name, dir)
- if errorlevel == 0 then
- local function cycle(name, dir)
- return(
- makeindex(name, dir, ".glo", ".gls", ".glg", glossarystyle) +
- makeindex(name, dir, ".idx", ".ind", ".ilg", indexstyle) +
- tex(file, dir)
- )
- end
- for i = 1, typesetruns do
- errorlevel = cycle(name, dir)
- if errorlevel ~= 0 then break end
- end
- end
+ end
+ local name = jobname(file)
+ errorlevel = biber(name,dir) + bibtex(name,dir)
+ if errorlevel ~= 0 then
return errorlevel
end
+ for i = 2,typesetruns do
+ errorlevel =
+ makeindex(name,dir,".glo",".gls",".glg",glossarystyle) +
+ makeindex(name,dir,".idx",".ind",".ilg",indexstyle) +
+ tex(file,dir)
+ if errorlevel ~= 0 then break end
+ end
+ return errorlevel
end
-
-- A hook to allow additional typesetting of demos
typeset_demo_tasks = typeset_demo_tasks or function()
return 0
@@ -213,34 +191,36 @@
depinstall(typesetdeps)
unpack({sourcefiles, typesetsourcefiles}, {sourcefiledir, docfiledir})
-- Main loop for doc creation
- local done = {}
local errorlevel = typeset_demo_tasks()
if errorlevel ~= 0 then
return errorlevel
end
- for _, typesetfiles in ipairs({typesetdemofiles, typesetfiles}) do
- for _,i in ipairs(typesetfiles) do
- for _, dir in ipairs({unpackdir, typesetdir}) do
- for j,_ in pairs(tree(dir, i)) do
- if not done[j] then
- j = gsub(j, "^%./", "")
+ local done = {}
+ for _,typesetfiles in ipairs({typesetdemofiles,typesetfiles}) do
+ for _,glob in pairs(typesetfiles) do
+ for _,dir in ipairs({typesetdir,unpackdir}) do
+ for _,file in pairs(tree(dir,glob)) do
+ local path,srcname = splitpath(file)
+ local name = jobname(srcname)
+ if not done[name] then
+ local typeset = true
-- Allow for command line selection of files
- local typeset = true
if files and next(files) then
typeset = false
- for _,k in ipairs(files) do
- if k == gsub(j, "%.[^.]+$", "") then
+ for _,file in pairs(files) do
+ if name == file then
typeset = true
break
end
end
end
+ -- Now know if we should typeset this source
if typeset then
- local errorlevel = typesetpdf(j, dir)
+ local errorlevel = typesetpdf(srcname,path)
if errorlevel ~= 0 then
return errorlevel
else
- done[j] = true
+ done[name] = true
end
end
end
Modified: trunk/Master/texmf-dist/scripts/l3build/l3build.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/l3build/l3build.lua 2019-06-26 20:53:06 UTC (rev 51477)
+++ trunk/Master/texmf-dist/scripts/l3build/l3build.lua 2019-06-26 20:53:24 UTC (rev 51478)
@@ -25,7 +25,7 @@
--]]
-- Version information
-release_date = "2019-06-18"
+release_date = "2019-06-26"
-- File operations are aided by the LuaFileSystem module
local lfs = require("lfs")
Modified: trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx 2019-06-26 20:53:06 UTC (rev 51477)
+++ trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx 2019-06-26 20:53:24 UTC (rev 51478)
@@ -227,7 +227,7 @@
% }^^A
% }
%
-% \date{Released 2019-06-18}
+% \date{Released 2019-06-26}
%
% \maketitle
% \tableofcontents
@@ -1705,6 +1705,54 @@
% files which would be copied are reported.
% \end{function}
%
+% \subsection{Typesetting functions}
+%
+% All typetting functions return $0$ on a successful completion.
+%
+% \begin{function}{biber()}
+% \begin{syntax}
+% |biber(|\meta{name},\meta{dir}|)|
+% \end{syntax}
+% Runs Biber on the \meta{name} (\emph{i.e.}~a jobname lacking any
+% extension) inside the \meta{dir}. If there is no |.bcf| file then
+% no action is taken with a return value of $0$.
+% \end{function}
+%
+% \begin{function}{bibtex()}
+% \begin{syntax}
+% |bibtex(|\meta{name},\meta{dir}|)|
+% \end{syntax}
+% Runs Bib\TeX{} on the \meta{name} (\emph{i.e.}~a jobname lacking any
+% extension) inside the \meta{dir}. If there are no |\citation| lines in
+% the |.aux| file then no action is taken with a return value of $0$.
+% \end{function}
+%
+% \begin{function}{makeindex()}
+% \begin{syntax}
+% |makeindex(|\meta{name},\meta{dir},\meta{inext},\meta{outext},\meta{logext},\meta{style}|)|
+% \end{syntax}
+% Runs MakeIndex on the \meta{name} (\emph{i.e.}~a jobname lacking any
+% extension) inside the \meta{dir}. The various extensions and the \meta{style}
+% should normally be given as it standard for MakeIndex.
+% \end{function}
+%
+% \begin{function}{tex()}
+% \begin{syntax}
+% |tex(|\meta{file},\meta{dir}|)|
+% \end{syntax}
+% Runs \luavar{typesetexe} on the \meta{name} inside the \meta{dir}.
+% \end{function}
+%
+% \begin{function}{runcmd()}
+% \begin{syntax}
+% |runcmd(|\meta{cmd},\meta{dir},|{|\meta{envvars}|})|
+% \end{syntax}
+% A generic function which runs the \meta{cmd} in the \meta{dir}, first
+% setting up all of the environmental variables specified to
+% point to the |local| and |working| directories. This function is useful
+% when creating non-standard typesetting steps.
+% \end{function}
+%
% \subsection{Customising the target list}
%
% The targets known to \pkg{l3build} are stored in the global table
More information about the tex-live-commits
mailing list