diff options
author | Karl Berry <karl@freefriends.org> | 2017-12-07 23:16:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-12-07 23:16:26 +0000 |
commit | 1fed4553e07e0372e12d6a1ac32f29b3c7a2a538 (patch) | |
tree | 1cbfce535eaa4ad401f88e70d29998b9ffe4d2ec /Master/texmf-dist/tex/latex/l3build | |
parent | a1e3748b2a855f1a0c875df7f9585e1a01c44d9a (diff) |
l3experimental+l3build (7dec17)
git-svn-id: svn://tug.org/texlive/trunk@46013 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3build')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3build/l3build.lua | 69 |
1 files changed, 50 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/l3build/l3build.lua b/Master/texmf-dist/tex/latex/l3build/l3build.lua index 9fd1faa3f40..5c5469375b9 100644 --- a/Master/texmf-dist/tex/latex/l3build/l3build.lua +++ b/Master/texmf-dist/tex/latex/l3build/l3build.lua @@ -23,7 +23,7 @@ for those people who are interested. --]] -- Version information -release_date = "2017/11/25" +release_date = "2017/12/06" -- "module" is a deprecated function in Lua 5.2: as we want the name -- for other purposes, and it should eventually be 'free', simply @@ -61,24 +61,25 @@ end -- Directory structure for the build system -- Use Unix-style path separators -maindir = maindir or "." +maindir = maindir or "." --- Substructure for tests and support files +-- Substructure for file locations +docfiledir = docfiledir or maindir +supportdir = supportdir or maindir .. "/support" testfiledir = testfiledir or "testfiles" testsuppdir = testsuppdir or testfiledir .. "/support" -supportdir = supportdir or maindir .. "/support" -- Structure within a development area -distribdir = distribdir or maindir .. "/build/distrib" -localdir = localdir or maindir .. "/build/local" -testdir = testdir or maindir .. "/build/test" -typesetdir = typesetdir or maindir .. "/build/doc" -unpackdir = unpackdir or maindir .. "/build/unpacked" +distribdir = distribdir or maindir .. "/build/distrib" +localdir = localdir or maindir .. "/build/local" +testdir = testdir or maindir .. "/build/test" +typesetdir = typesetdir or maindir .. "/build/doc" +unpackdir = unpackdir or maindir .. "/build/unpacked" -- Substructure for CTAN release material -ctandir = ctandir or distribdir .. "/ctan" -tdsdir = tdsdir or distribdir .. "/tds" -tdsroot = tdsroot or "latex" +ctandir = ctandir or distribdir .. "/ctan" +tdsdir = tdsdir or distribdir .. "/tds" +tdsroot = tdsroot or "latex" -- Location for installation on CTAN or in TEXMFHOME if bundle == "" then @@ -108,7 +109,6 @@ sourcefiles = sourcefiles or {"*.dtx", "*.ins"} textfiles = textfiles or {"*.md", "*.txt"} typesetdemofiles = typesetdemofiles or { } typesetfiles = typesetfiles or {"*.dtx"} -docfiledir = docfiledir or maindir typesetsuppfiles = typesetsuppfiles or { } typesetsourcefiles = typesetsourcefiles or { } unpackfiles = unpackfiles or {"*.ins"} @@ -176,6 +176,7 @@ maxprintline = maxprintline or 79 packtdszip = packtdszip or false scriptname = scriptname or "build.lua" typesetcmds = typesetcmds or "" +typesetruns = typesetruns or 2 versionform = versionform or "" recordstatus = recordstatus or false @@ -681,9 +682,9 @@ function tree(path, glob) return true end function is_dir(file) - return lfs.attributes(file)["mode"] == "directory" + return lfs_attributes(file)["mode"] == "directory" end - local dirs = {["."]=cropdots(path)} + local dirs = {["."] = cropdots(path)} for pattern, critereon in gmatch(cropdots(glob), "([^/]+)(/?)") do local critereon = critereon == "/" and is_dir or always_true function fill(path, dir, table) @@ -691,8 +692,8 @@ function tree(path, glob) local fullpath = path .. "/" .. file if file ~= "." and file ~= ".." and fullpath ~= maindir .. "/build" and - (string.sub(pattern, 1, 1) == "." - or string.sub(file, 1, 1) ~= ".") + (sub(pattern, 1, 1) == "." + or sub(file, 1, 1) ~= ".") then local fulldir = dir .. "/" .. file if critereon(fulldir) then @@ -1011,6 +1012,36 @@ local function formatlog(logfile, newfile, engine, errlevels) for i = 0, 31 do line = gsub(line, char(i), "^^" .. char(64 + i)) end + -- Normalise register allocation to hard-coded numbers + -- No regex, so use a pattern plus lookup approach + local register_types = { + attribute = true, + box = true, + bytecode = true, + catcodetable = true, + count = true, + dimen = true, + insert = true, + language = true, + luabytecode = true, + luachunk = true, + luafunction = true, + marks = true, + muskip = true, + read = true, + skip = true, + toks = true, + whatsit = true, + write = true, + XeTeXcharclass = true + } + if register_types[match(line, "^\\[^%]]+=\\([a-z]+)%d+$")] then + line = gsub(line, "%d+$", "...") + end + -- Also deal with showing boxes + if match(line, "^> \\box%d+=$") or match(line, "^> \\box%d+=(void)$") then + line = gsub(line, "%d+=", "...=") + end -- Remove 'normal' direction information on boxes with (u)pTeX line = gsub(line, ",? yoko direction,?", "") line = gsub(line, ",? yoko%(math%) direction,?", "") @@ -1738,9 +1769,9 @@ typeset = typeset or function(file, dir) tex(file, dir) ) end - errorlevel = cycle(name, dir) - if errorlevel == 0 then + for i = 1, typesetruns do errorlevel = cycle(name, dir) + if errorlevel ~= 0 then break end end end return errorlevel |