summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/l3build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-01-04 20:33:56 +0000
committerKarl Berry <karl@freefriends.org>2024-01-04 20:33:56 +0000
commit32a641f484bf4f20a262ad06facd5bd4d560a001 (patch)
tree0d81c01c3bfb10af143388e0c7c3e7ae3cf372c2 /Master/texmf-dist/scripts/l3build
parentb66da2c166487b44cd87b9312387a726ab302969 (diff)
l3build (4jan24)
git-svn-id: svn://tug.org/texlive/trunk@69300 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/l3build')
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-arguments.lua16
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-aux.lua5
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-check.lua26
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-clean.lua2
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-ctan.lua2
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-file-functions.lua4
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-help.lua4
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-install.lua3
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-manifest-setup.lua2
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-manifest.lua4
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-stdmain.lua22
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-tagging.lua2
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-typesetting.lua17
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-unpack.lua2
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-upload.lua14
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-variables.lua2
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-zip.lua2
-rwxr-xr-xMaster/texmf-dist/scripts/l3build/l3build.lua14
18 files changed, 76 insertions, 67 deletions
diff --git a/Master/texmf-dist/scripts/l3build/l3build-arguments.lua b/Master/texmf-dist/scripts/l3build/l3build-arguments.lua
index 95ed9f59e4d..a1755d693dc 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-arguments.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-arguments.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-arguments.lua Copyright (C) 2018-2021,2023 The LaTeX Project
+File l3build-arguments.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -248,14 +248,14 @@ local function argparse()
return { target = "help" }
end
else
- if not optarg then
- optarg = arg[i + 1]
if not optarg then
- stderr:write("Missing value for option " .. a .."\n")
- return { target = "help" }
+ optarg = arg[i + 1]
+ if not optarg then
+ stderr:write("Missing value for option " .. a .."\n")
+ return { target = "help" }
+ end
+ i = i + 1
end
- i = i + 1
- end
end
else
stderr:write("Unknown option " .. a .."\n")
@@ -283,7 +283,7 @@ local function argparse()
end
end
if next(names) then
- result["names"] = names
+ result["names"] = names
end
return result
end
diff --git a/Master/texmf-dist/scripts/l3build/l3build-aux.lua b/Master/texmf-dist/scripts/l3build/l3build-aux.lua
index 115117c40fb..dd8c410fc09 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-aux.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-aux.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-aux.lua Copyright (C) 2018-2021,2023 The LaTeX Project
+File l3build-aux.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -25,6 +25,7 @@ for those people who are interested.
-- local safety guards and shortcuts
local match = string.match
+local gsub = string.gsub
local pairs = pairs
local print = print
@@ -207,4 +208,4 @@ function runcmd(cmd,dir,vars)
end
end
return run(dir,set_epoch_cmd(epoch, forcedocepoch) .. env .. cmd)
-end \ No newline at end of file
+end
diff --git a/Master/texmf-dist/scripts/l3build/l3build-check.lua b/Master/texmf-dist/scripts/l3build/l3build-check.lua
index 65366c91caa..1f2b04ce5a3 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-check.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-check.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-check.lua Copyright (C) 2018-2023 The LaTeX Project
+File l3build-check.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -628,10 +628,10 @@ function runcheck(name, hide)
end
end
for i=1, #failedengines do
- if failedengines[i] == stdengine then
- failedengines = {stdengine}
- break
- end
+ if failedengines[i] == stdengine then
+ failedengines = {stdengine}
+ break
+ end
end
-- Return everything
return errorlevel, failedengines
@@ -657,7 +657,7 @@ function setup_check(name, engine)
end
end
if found then
- return
+ return
end
-- Attempt to generate missing reference file from expectation
for _, kind in ipairs(test_order) do
@@ -674,7 +674,7 @@ function setup_check(name, engine)
end
end
if found then
- return
+ return
end
print(
"Error: failed to find any reference or expectation file for "
@@ -824,7 +824,7 @@ function runtest(name, engine, hide, ext, test_type, breakout)
)
-- On Windows, concatenating here will suppress any non-zero errorlevel
-- from the main run, so we split into two parts.
- if errlevels[i] == 0 and runtest_tasks(jobname(lvtfile),i) ~= "" then
+ if runtest_tasks(jobname(lvtfile),i) ~= "" then
local errorlevel =
runcmd(preamble .. runtest_tasks(jobname(lvtfile),i),testdir)
if errorlevel ~= 0 then errlevels[i] = errorlevel end
@@ -922,9 +922,9 @@ local function showsavecommands(failurelist)
end
f:write"\n"
if savecmds[stdengine] then
- print("\n Afterwards test for engine specific changes using\n")
- print(" " .. checkcmd)
- f:write(checkcmd)
+ print("\n Afterwards test for engine specific changes using\n")
+ print(" " .. checkcmd)
+ f:write(checkcmd)
end
f:close()
print("")
@@ -1057,6 +1057,10 @@ end
-- A short auxiliary to print the list of differences for check
function checkdiff(config)
+ local testdir = testdir
+ if config then
+ testdir = testdir .. "-" .. config
+ end
local diff_files = ordered_filelist(testdir, "*" .. os_diffext)
if next(diff_files) then
if config then
diff --git a/Master/texmf-dist/scripts/l3build/l3build-clean.lua b/Master/texmf-dist/scripts/l3build/l3build-clean.lua
index e5d5ddec3d7..07c3459fdb2 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-clean.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-clean.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-clean.lua Copyright (C) 2018,2020,2021 The LaTeX Project
+File l3build-clean.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
diff --git a/Master/texmf-dist/scripts/l3build/l3build-ctan.lua b/Master/texmf-dist/scripts/l3build/l3build-ctan.lua
index b290533b27f..c1feb2564ac 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-ctan.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-ctan.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-ctan.lua Copyright (C) 2018-2021 The LaTeX Project
+File l3build-ctan.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
diff --git a/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua b/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua
index b5cd9b5f89d..a1b22ce5707 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-file-functions.lua Copyright (C) 2018-2023 The LaTeX Project
+File l3build-file-functions.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -22,7 +22,6 @@ for those people who are interested.
--]]
-local pairs = pairs
local print = print
local open = io.open
@@ -43,7 +42,6 @@ local luatex_version = status.luatex_version
local match = string.match
local sub = string.sub
-local gmatch = string.gmatch
local gsub = string.gsub
local insert = table.insert
diff --git a/Master/texmf-dist/scripts/l3build/l3build-help.lua b/Master/texmf-dist/scripts/l3build/l3build-help.lua
index 3e204df0d65..46b0bc45b39 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-help.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-help.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-help.lua Copyright (C) 2018,2020,2021 The LaTeX Project
+File l3build-help.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -27,7 +27,7 @@ local match = string.match
local rep = string.rep
local sort = table.sort
-local copyright = "Copyright (C) 2014-2021 The LaTeX Project\n"
+local copyright = "Copyright (C) 2014-2024 The LaTeX Project\n"
function version()
print(
diff --git a/Master/texmf-dist/scripts/l3build/l3build-install.lua b/Master/texmf-dist/scripts/l3build/l3build-install.lua
index ad5aeaaac65..9e2286481ef 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-install.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-install.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-install.lua Copyright (C) 2018-2021 The LaTeX Project
+File l3build-install.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -32,7 +32,6 @@ 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
diff --git a/Master/texmf-dist/scripts/l3build/l3build-manifest-setup.lua b/Master/texmf-dist/scripts/l3build/l3build-manifest-setup.lua
index b5c2b317183..8654b3deb52 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-manifest-setup.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-manifest-setup.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-manifest-setup.lua Copyright (C) 2018,2020,2021 The LaTeX Project
+File l3build-manifest-setup.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
diff --git a/Master/texmf-dist/scripts/l3build/l3build-manifest.lua b/Master/texmf-dist/scripts/l3build/l3build-manifest.lua
index 12b8cdc114f..99a82464b2c 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-manifest.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-manifest.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-manifest.lua Copyright (C) 2018,2020,2021 The LaTeX Project
+File l3build-manifest.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -128,7 +128,7 @@ manifest_build_init = function(entry)
Nchar_descr = 11 , -- TODO: generalise
}
- -- copy default options to each group if necessary
+ -- copy default options to each group if necessary
for kk,ll in pairs(manifest_group_defaults) do
if entry[kk] == nil then
entry[kk] = ll
diff --git a/Master/texmf-dist/scripts/l3build/l3build-stdmain.lua b/Master/texmf-dist/scripts/l3build/l3build-stdmain.lua
index 6209dcd2962..d264a78fa48 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-stdmain.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-stdmain.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-stdmain.lua Copyright (C) 2018-2021 The LaTeX Project
+File l3build-stdmain.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -122,12 +122,12 @@ target_list =
desc = "Updates release tags in files",
func = tag,
pre = function(names)
- if names and #names > 1 then
- print("Too many tags specified; exactly one required")
- exit(1)
- end
- return 0
- end
+ if names and #names > 1 then
+ print("Too many tags specified; exactly one required")
+ exit(1)
+ end
+ return 0
+ end
},
uninstall =
{
@@ -171,10 +171,10 @@ function main(target,names)
end
else
if target_list[target].pre then
- errorlevel = target_list[target].pre(names)
- if errorlevel ~= 0 then
- exit(1)
- end
+ errorlevel = target_list[target].pre(names)
+ if errorlevel ~= 0 then
+ exit(1)
+ end
end
errorlevel = target_list[target].func(names)
end
diff --git a/Master/texmf-dist/scripts/l3build/l3build-tagging.lua b/Master/texmf-dist/scripts/l3build/l3build-tagging.lua
index 20ef513f26a..0753123f996 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-tagging.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-tagging.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-tagging.lua Copyright (C) 2018-2021 The LaTeX Project
+File l3build-tagging.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
diff --git a/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua b/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua
index d3ba3e5b6fc..8de57f3718d 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-2021,2023 The LaTeX Project
+File l3build-typesetting.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -63,7 +63,7 @@ function bibtex(name,dir)
if os_type == "windows" then
grep = "\\\\"
else
- grep = "\\\\\\\\"
+ grep = "\\\\\\\\"
end
if run(dir,
os_grepexe .. " \"^" .. grep .. "citation{\" " .. name .. ".aux > "
@@ -184,6 +184,12 @@ function doc(files)
local errorlevel = docinit()
if errorlevel ~= 0 then return errorlevel end
local done = {}
+ local files_unknown = {}
+ if files and next(files) then
+ for _, file in pairs(files) do
+ files_unknown[file] = true
+ end
+ end
for _,typesetfiles in ipairs({typesetdemofiles,typesetfiles}) do
for _,glob in pairs(typesetfiles) do
local destpath,globstub = splitpath(glob)
@@ -198,6 +204,7 @@ function doc(files)
typeset = false
for _,file in pairs(files) do
if name == file then
+ files_unknown[file] = nil
typeset = true
break
end
@@ -219,5 +226,11 @@ function doc(files)
end
end
end
+ if next(files_unknown) then
+ for file, _ in pairs(files_unknown) do
+ print("Unknown doc name \"" .. file .. "\"")
+ end
+ return 1
+ end
return 0
end
diff --git a/Master/texmf-dist/scripts/l3build/l3build-unpack.lua b/Master/texmf-dist/scripts/l3build/l3build-unpack.lua
index 6ce4b3286b2..3c73dc8d143 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-unpack.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-unpack.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-unpack.lua Copyright (C) 2018-2021 The LaTeX Project
+File l3build-unpack.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
diff --git a/Master/texmf-dist/scripts/l3build/l3build-upload.lua b/Master/texmf-dist/scripts/l3build/l3build-upload.lua
index 180572baf46..87158d1b01d 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-upload.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-upload.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-upload.lua Copyright (C) 2018-2021 The LaTeX Project
+File l3build-upload.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -34,8 +34,6 @@ local popen = io.popen
local read = io.read
local write = io.write
-local os_type = os.type
-
local len = string.len
local lower = string.lower
local match = string.match
@@ -131,8 +129,8 @@ function upload(tagnames)
print("Are you sure you want to continue? [y/n]" )
io.stdout:write("> "):flush()
if lower(read(),1,1) ~= "y" then
- print'Aborting'
- return 1
+ print'Aborting'
+ return 1
end
end
@@ -247,9 +245,9 @@ function shell(s)
local t = assert(h:read('*a'))
local success = h:close()
if (success) then
- return t
+ return t
else
- error("\nError from shell command:\n" .. s .. "\n" .. t .. "\n")
+ error("\nError from shell command:\n" .. s .. "\n" .. t .. "\n")
end
end
@@ -358,7 +356,7 @@ function input_multi_line_field (name)
if answer_line~=nil then
field = field .. "\n" .. answer_line
end
- end
+ end
until (return_count==3 or answer_line==nil or answer_line=='\004')
return field
end
diff --git a/Master/texmf-dist/scripts/l3build/l3build-variables.lua b/Master/texmf-dist/scripts/l3build/l3build-variables.lua
index 9e0ed9d47ad..123e509a5b9 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-variables.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-variables.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-variables.lua Copyright (C) 2018-2023 The LaTeX Project
+File l3build-variables.lua Copyright (C) 2018-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
diff --git a/Master/texmf-dist/scripts/l3build/l3build-zip.lua b/Master/texmf-dist/scripts/l3build/l3build-zip.lua
index 1fab56cf4bc..51074151733 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-zip.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-zip.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-zip.lua Copyright (C) 2021 The LaTeX Project
+File l3build-zip.lua Copyright (C) 2021-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
diff --git a/Master/texmf-dist/scripts/l3build/l3build.lua b/Master/texmf-dist/scripts/l3build/l3build.lua
index 0154019cb99..995eefe533a 100755
--- a/Master/texmf-dist/scripts/l3build/l3build.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build.lua
@@ -2,7 +2,7 @@
--[[
-File l3build.lua Copyright (C) 2014-2022 The LaTeX Project
+File l3build.lua Copyright (C) 2014-2024 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -25,14 +25,13 @@ for those people who are interested.
--]]
-- Version information
-release_date = "2023-12-15"
+release_date = "2024-01-04"
-- File operations are aided by the LuaFileSystem module
local lfs = require("lfs")
-- Local access to functions
-local assert = assert
local ipairs = ipairs
local insert = table.insert
local lookup = kpse.lookup
@@ -40,11 +39,8 @@ local match = string.match
local gsub = string.gsub
local next = next
local print = print
-local select = select
-local tonumber = tonumber
local exit = os.exit
local open = io.open
-local stdout = io.stdout
-- l3build setup and functions
kpse.set_program_name("kpsewhich")
@@ -181,11 +177,11 @@ if #checkconfigs > 1 then
exit(2)
end
for line in f:lines() do
- if line == "" then break end
- savecmds = savecmds .. " " .. line .. "\n"
+ if line == "" then break end
+ savecmds = savecmds .. " " .. line .. "\n"
end
for line in f:lines() do
- recheckcmds = recheckcmds .. " " .. line .. "\n"
+ recheckcmds = recheckcmds .. " " .. line .. "\n"
end
f:close()
end