summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/texlive/linked_scripts/l3build/l3build.lua2
-rw-r--r--Master/texmf-dist/doc/latex/l3build/CHANGELOG.md18
-rw-r--r--Master/texmf-dist/doc/latex/l3build/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/l3build/l3build.pdfbin697243 -> 700309 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/l3build.12
-rw-r--r--Master/texmf-dist/doc/man/man1/l3build.man1.pdfbin15356 -> 15219 bytes
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-check.lua8
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-typesetting.lua196
-rwxr-xr-xMaster/texmf-dist/scripts/l3build/l3build.lua2
-rw-r--r--Master/texmf-dist/source/latex/l3build/l3build.dtx50
10 files changed, 163 insertions, 117 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua b/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua
index 9d51648553a..0f6947cbbd9 100644
--- a/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua
+++ b/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua
@@ -25,7 +25,7 @@ for those people who are interested.
--]]
-- Version information
-release_date = "2019-06-18"
+release_date = "2019-06-26"
-- File operations are aided by the LuaFileSystem module
local lfs = require("lfs")
diff --git a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
index 5adace2012d..84ca6edfcd3 100644
--- a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
+++ b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
@@ -7,6 +7,21 @@ this project uses date-based 'snapshot' version identifiers.
## [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 @@ this project uses date-based 'snapshot' version identifiers.
- 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
diff --git a/Master/texmf-dist/doc/latex/l3build/README.md b/Master/texmf-dist/doc/latex/l3build/README.md
index 0c7eeb233e9..576614bdfd7 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 LaTeX3
=================================================
-Release 2019-06-18
+Release 2019-06-26
Overview
--------
diff --git a/Master/texmf-dist/doc/latex/l3build/l3build.pdf b/Master/texmf-dist/doc/latex/l3build/l3build.pdf
index bddcaaf002e..e51b57752b6 100644
--- a/Master/texmf-dist/doc/latex/l3build/l3build.pdf
+++ b/Master/texmf-dist/doc/latex/l3build/l3build.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/l3build.1 b/Master/texmf-dist/doc/man/man1/l3build.1
index 81d82a908c4..82c01e537ff 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 "2019-06-18"
+.TH l3build 1 "2019-06-26"
.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
index 4cc0aa6c47c..20b6fe76daa 100644
--- a/Master/texmf-dist/doc/man/man1/l3build.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/l3build.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/l3build/l3build-check.lua b/Master/texmf-dist/scripts/l3build/l3build-check.lua
index 301c0df1853..38e7f88a352 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-check.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-check.lua
@@ -98,7 +98,7 @@ end
-- 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 @@ local function normalize_log(content,engine,errlevels)
-- 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 @@ function compare_tlg(name,engine,cleanup)
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
diff --git a/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua b/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua
index 6ce80cdf7a3..5133d081719 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua
@@ -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,8 +26,14 @@ for those people who are interested.
-- 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
@@ -51,37 +57,36 @@ function dvitopdf(name, dir, engine, hide)
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 @@ function bibtex(name, dir)
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 @@ function doc(files)
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, "^%./", "")
- -- Allow for command line selection of files
+ 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
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
diff --git a/Master/texmf-dist/scripts/l3build/l3build.lua b/Master/texmf-dist/scripts/l3build/l3build.lua
index 9d51648553a..0f6947cbbd9 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 = "2019-06-18"
+release_date = "2019-06-26"
-- File operations are aided by the LuaFileSystem module
local lfs = require("lfs")
diff --git a/Master/texmf-dist/source/latex/l3build/l3build.dtx b/Master/texmf-dist/source/latex/l3build/l3build.dtx
index 4a5dc0f51cf..fe2d495a14d 100644
--- a/Master/texmf-dist/source/latex/l3build/l3build.dtx
+++ b/Master/texmf-dist/source/latex/l3build/l3build.dtx
@@ -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