diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-12 20:28:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-12 20:28:20 +0000 |
commit | c4c2e523c8c347f89b6d5d079737d403ff80dc63 (patch) | |
tree | cd78407dd685d49ca9cf4b1877fbb420b8413dad /Master/texmf-dist/scripts | |
parent | 461f4e2e3a8df032fcb51bdd059229e480892593 (diff) |
l3 (12mar20)
git-svn-id: svn://tug.org/texlive/trunk@54259 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
6 files changed, 42 insertions, 33 deletions
diff --git a/Master/texmf-dist/scripts/l3build/l3build-check.lua b/Master/texmf-dist/scripts/l3build/l3build-check.lua index 17e63217871..c90c8fbc5a8 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-check.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-check.lua @@ -537,7 +537,8 @@ local function normalize_pdf(content) binary = false stream = true stream_content = "stream" .. os_newline - elseif not match(line, "^ *$") then + elseif not match(line, "^ *$") and not match(line,"^%%%%") then + line = gsub(line,"%/ID %[<[^>]+><[^>]+>]","/ID [<ID-STRING><ID-STRING>]") new_content = new_content .. line .. os_newline end end @@ -768,6 +769,9 @@ function runtest(name, engine, hide, ext, pdfmode, breakout) -- Break the loop if the result is stable if breakout and i < checkruns then if pdfmode then + if fileexists(testdir .. "/" .. name .. dviext) then + dvitopdf(name, testdir, engine, hide) + end rewrite(pdffile,npffile,normalize_pdf) if compare_pdf(name,engine,true) == 0 then break diff --git a/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua b/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua index e3000b45efb..6c420f80a26 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua @@ -204,7 +204,7 @@ function cleandir(dir) if errorlevel ~= 0 then return errorlevel end - return rm(dir, "*") + return rm(dir, "**") end -- Copy files 'quietly' @@ -376,7 +376,7 @@ end -- Remove file(s) based on a glob function rm(source, glob) - for _,i in ipairs(filelist(source, glob)) do + for i,_ in pairs(tree(source, glob)) do rmfile(source,i) end -- os.remove doesn't give a sensible errorlevel diff --git a/Master/texmf-dist/scripts/l3build/l3build-install.lua b/Master/texmf-dist/scripts/l3build/l3build-install.lua index 1007d2ed1b4..4b95f9ef43d 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-install.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-install.lua @@ -108,8 +108,11 @@ function install_files(target,full,dry_run) -- Needed so paths are only cleaned out once local cleanpaths = { } + -- Collect up all file data before copying: + -- ensures no files are lost during clean-up + local installmap = { } - local function install_files(source,dir,files,subdir) + local function create_install_map(source,dir,files,subdir) subdir = subdir or moduledir -- For material associated with secondary tools (BibTeX, MakeIndex) -- the structure needed is slightly different from those items going @@ -172,13 +175,14 @@ function install_files(target,full,dry_run) print("- " .. file) else local path,file = splitpath(file) - errorlevel = cp(file,sourcepaths[file],target .. "/" .. path) - if errorlevel ~= 0 then return errorlevel end + insert(installmap, + {file = file, source = sourcepaths[file], dest = target .. "/" .. path}) end end end return 0 end + local errorlevel = unpack() if errorlevel ~= 0 then return errorlevel end @@ -233,8 +237,8 @@ function install_files(target,full,dry_run) print("\nFor installation inside " .. target .. ":") end - errorlevel = install_files(sourcefiledir,"source",{sourcelist}) - + install_files(docfiledir,"doc", + errorlevel = create_install_map(sourcefiledir,"source",{sourcelist}) + + create_install_map(docfiledir,"doc", {bibfiles,demofiles,docfiles,pdffiles,textfiles,typesetlist}) if errorlevel ~= 0 then return errorlevel end @@ -272,12 +276,21 @@ function install_files(target,full,dry_run) if errorlevel ~= 0 then return errorlevel end - errorlevel = install_files(unpackdir,"tex",{installlist}) - + install_files(unpackdir,"bibtex/bst",{bstfiles},module) - + install_files(unpackdir,"makeindex",{makeindexfiles},module) - + install_files(unpackdir,"scripts",{scriptfiles},module) + errorlevel = create_install_map(unpackdir,"tex",{installlist}) + + create_install_map(unpackdir,"bibtex/bst",{bstfiles},module) + + create_install_map(unpackdir,"makeindex",{makeindexfiles},module) + + create_install_map(unpackdir,"scripts",{scriptfiles},module) + + if errorlevel ~= 0 then return errorlevel end + + -- Files are all copied in one shot: this ensures that cleandir() + -- can't be an issue even if there are complex set-ups + for _,v in ipairs(installmap) do + errorlevel = cp(v.file,v.source,v.dest) + if errorlevel ~= 0 then return errorlevel end + end - return errorlevel + return 0 end function install() diff --git a/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua b/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua index b76edd913b2..540ac3f384a 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,2019 The LaTeX3 Project +File l3build-typesetting.lua Copyright (C) 2018-2020 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 @@ -36,24 +36,15 @@ local match = string.match local os_type = os.type function dvitopdf(name, dir, engine, hide) - if match(engine, "^u?ptex$") then - run( - dir, - (forcecheckepoch and setepoch() or "") .. - "dvipdfmx " .. name .. dviext - .. (hide and (" > " .. os_null) or "") - ) - else - run( - dir, - (forcecheckepoch and setepoch() or "") .. - "dvips " .. name .. dviext - .. (hide and (" > " .. os_null) or "") - .. os_concat .. - "ps2pdf " .. name .. psext - .. (hide and (" > " .. os_null) or "") - ) - end + run( + dir, + (forcecheckepoch and setepoch() or "") .. + "dvips " .. name .. dviext + .. (hide and (" > " .. os_null) or "") + .. os_concat .. + "ps2pdf " .. ps2pdfopt .. name .. psext + .. (hide and (" > " .. os_null) or "") + ) end -- An auxiliary used to set up the environmental variables diff --git a/Master/texmf-dist/scripts/l3build/l3build-variables.lua b/Master/texmf-dist/scripts/l3build/l3build-variables.lua index e69eb5aff1c..dcb25218691 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-variables.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-variables.lua @@ -184,6 +184,7 @@ if flattentds == nil then end maxprintline = maxprintline or 79 packtdszip = packtdszip or false +ps2pdfopt = ps2pdfopt or "" typesetcmds = typesetcmds or "" typesetruns = typesetruns or 3 recordstatus = recordstatus or false diff --git a/Master/texmf-dist/scripts/l3build/l3build.lua b/Master/texmf-dist/scripts/l3build/l3build.lua index ccb05eed316..60b6ac52848 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 = "2020-02-21" +release_date = "2020-03-12" -- File operations are aided by the LuaFileSystem module local lfs = require("lfs") |