texlive[48991] trunk: l3build (25oct18)
commits+karl at tug.org
commits+karl at tug.org
Thu Oct 25 23:34:47 CEST 2018
Revision: 48991
http://tug.org/svn/texlive?view=revision&revision=48991
Author: karl
Date: 2018-10-25 23:34:47 +0200 (Thu, 25 Oct 2018)
Log Message:
-----------
l3build (25oct18)
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-file-functions.lua
trunk/Master/texmf-dist/scripts/l3build/l3build-install.lua
trunk/Master/texmf-dist/scripts/l3build/l3build.lua
trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx
trunk/Master/texmf-dist/source/latex/l3build/l3build.ins
trunk/Master/texmf-dist/tex/latex/l3build/regression-test.tex
Modified: trunk/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua 2018-10-25 21:34:28 UTC (rev 48990)
+++ trunk/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua 2018-10-25 21:34:47 UTC (rev 48991)
@@ -25,7 +25,7 @@
--]]
-- Version information
-release_date = "2018-09-26"
+release_date = "2018-10-25"
-- File operations are aided by the LuaFileSystem module
local lfs = require("lfs")
@@ -95,6 +95,20 @@
-- comes after any user versions
build_require("variables")
+-- Ensure that directories are 'space safe'
+maindir = escapepath(maindir)
+docfiledir = escapepath(docfiledir)
+sourcefiledir = escapepath(sourcefiledir)
+supportdir = escapepath(supportdir)
+testfiledir = escapepath(testfiledir)
+testsuppdir = escapepath(testsuppdir)
+builddir = escapepath(builddir)
+distribdir = escapepath(distribdir)
+localdir = escapepath(localdir)
+testdir = escapepath(testdir)
+typesetdir = escapepath(typesetdir)
+unpackdir = escapepath(unpackdir)
+
-- Tidy up the epoch setting
-- Force an epoch if set at the command line
-- Must be done after loading variables, etc.
Modified: trunk/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md 2018-10-25 21:34:28 UTC (rev 48990)
+++ trunk/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md 2018-10-25 21:34:47 UTC (rev 48991)
@@ -7,8 +7,21 @@
## [Unreleased]
-## [2018-09-26]
+## [2018-10-25]
+## Added
+
+- `\SHOWFILE` command
+
+## Changed
+
+- Better support for multiple LuaTeX engines (see #75)
+
+## Fixed
+
+- Support for spaces in directory names (fixes #76)
+- Support relative directories as argument to `--texmfhome`
+
## [2018-09-23]
## Changed
@@ -112,7 +125,7 @@
## [2018-03-08]
### Added
-- Target `tag`, variable `tagfiles` and function `update_tag()`
+- Target `tag`, variable `tagfiles` and function `update_tag()`
- Variables `scriptfiles` and `scriptmanfiles` to support installation
of scripts
@@ -170,7 +183,8 @@
- Rationalise short option names: removed `-d`, `-E`, `-r`
- Target `cmdcheck`: specific to LaTeX3 kernel work
-[Unreleased]: https://github.com/latex3/l3build/compare/2018-09-26...HEAD
+[Unreleased]: https://github.com/latex3/l3build/compare/2018-10-25...HEAD
+[2018-10-25]: https://github.com/latex3/l3build/compare/2018-09-26...2018-10-25
[2018-09-26]: https://github.com/latex3/l3build/compare/2018-09-23...2018-09-26
[2018-09-23]: https://github.com/latex3/l3build/compare/2018-09-21...2018-09-23
[2018-09-21]: https://github.com/latex3/l3build/compare/2018-08-07...2018-09-21
@@ -187,4 +201,3 @@
[2018-02-20]: https://github.com/latex3/l3build/compare/2018-01-27...2018-02-20
[2018-01-27]: https://github.com/latex3/l3build/compare/2018-01-10...2018-01-27
[2018-01-10]: https://github.com/latex3/l3build/compare/2017-12-12...2018-01-10
-
Modified: trunk/Master/texmf-dist/doc/latex/l3build/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/l3build/README.md 2018-10-25 21:34:28 UTC (rev 48990)
+++ trunk/Master/texmf-dist/doc/latex/l3build/README.md 2018-10-25 21:34:47 UTC (rev 48991)
@@ -1,7 +1,7 @@
l3build: a testing and building system for LaTeX3
=================================================
-Release 2018-09-26
+Release 2018-10-25
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 2018-10-25 21:34:28 UTC (rev 48990)
+++ trunk/Master/texmf-dist/doc/man/man1/l3build.1 2018-10-25 21:34:47 UTC (rev 48991)
@@ -1,4 +1,4 @@
-.TH l3build 1 "2018-09-26"
+.TH l3build 1 "2018-10-25"
.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 2018-10-25 21:34:28 UTC (rev 48990)
+++ trunk/Master/texmf-dist/scripts/l3build/l3build-check.lua 2018-10-25 21:34:47 UTC (rev 48991)
@@ -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 engine == "luatex" or engine == "luajittex" then
+ if match(engine,"^lua") then
maxprintline = maxprintline + 1 -- Deal with an out-by-one error
end
local function killcheck(line)
@@ -553,7 +553,7 @@
for _,engine in pairs(checkengines) do
local enginename = engine
-- Allow for luatex == luajittex for .tlg/.tpf purposes
- if engine == "luajittex" then
+ if match(engine,"^lua") then
engine = "luatex"
end
setup_check(name,engine)
@@ -638,8 +638,7 @@
-- LuaTeX-specific .tlg file and the default engine is not LuaTeX
if engine == "luatex"
and not match(tlgfile, "%.luatex" .. "%" .. tlgext)
- and stdengine ~= "luatex"
- and stdengine ~= "luajittex"
+ and not match(stdengine,"^lua")
then
local lualogfile = logfile
if cleanup then
@@ -671,26 +670,21 @@
cp(lvtfile, fileexists(testfiledir .. "/" .. lvtfile)
and testfiledir or unpackdir, testdir)
local engine = engine or stdengine
- -- Set up the format file name if it's one ending "...tex"
local realengine = engine
local format = ""
- if
- match(checkformat, "tex$") and
- not match(engine, checkformat) then
- format = " -fmt=" .. gsub(engine, "(.*)tex$", "%1") .. checkformat
+ if checkformat == "latex" then
+ -- Special case for e-LaTeX format
+ if engine == "etex" then
+ format = " -fmt=latex"
+ -- Use "...latex" formats for other engines
+ elseif not match(engine,"latex") then
+ format = " -fmt=" .. gsub(engine,"tex","latex")
+ end
+ -- Special case for (u)pTeX LaTeX
+ if match(engine,"^u?ptex$") then
+ realengine = "e" .. engine
+ end
end
- -- Special casing for e-LaTeX format
- if
- match(checkformat, "^latex$") and
- match(engine, "^etex$") then
- format = " -fmt=latex"
- end
- -- Special casing for (u)pTeX LaTeX formats
- if
- match(checkformat, "^latex$") and
- match(engine, "^u?ptex$") then
- realengine = "e" .. engine
- end
-- Special casing for XeTeX engine
local checkopts = checkopts
if match(engine, "xetex") and not pdfmode then
@@ -703,7 +697,7 @@
if match(checkformat, "^context$") then
format = ""
function setup(file) return ' "' .. file .. '" ' end
- if engine == "luatex" or engine == "luajittex" then
+ if match(engine,"^lua") then
realengine = "context"
elseif engine == "pdftex" then
realengine = "texexec"
Modified: trunk/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua 2018-10-25 21:34:28 UTC (rev 48990)
+++ trunk/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua 2018-10-25 21:34:47 UTC (rev 48991)
@@ -33,6 +33,7 @@
local lfs_dir = lfs.dir
local execute = os.execute
+local exit = os.exit
local getenv = os.getenv
local remove = os.remove
local os_time = os.time
@@ -90,67 +91,6 @@
return match(char, "^%w$") and char or "%" .. char
end
- -- remove a leading "\" if one is present:
- -- this can simple be discarded
- local function unescape()
- if char == "\\" then
- i = i + 1
- char = sub(glob,i,i)
- if char == "" then
- pattern = "[^]"
- return false
- end
- end
- return true
- end
-
- -- look for the body of a set:
- -- char is already the first token
- local function collect_set()
- while true do
- if char == "" then
- pattern = "[^]"
- return false
- elseif char == "]" then
- pattern = pattern .. "]"
- break
- else
- if not unescape(char) then break end
- local char_one = char
- i = i + 1
- char = sub(glob,i,i)
- if char == "" then
- pattern = "[^]"
- return false
- elseif char == "-" then
- i = i + 1
- char = sub(glob,i,i)
- if char == "" then
- pattern = "[^]"
- return false
- elseif char == "]" then
- -- Not a range
- pattern = pattern .. escape(char_one) .. "%-]"
- return true
- else
- if not unescape(char) then break end
- pattern = pattern .. escape(char_one) .. "-" .. escape(char)
- end
- elseif char == "]" then
- -- Successfully done
- pattern = pattern .. escape(char_one) .. "]"
- return true
- else
- pattern = pattern .. escape(char_one)
- i = i - 1 -- Back up one
- end
- end
- i = i + 1
- char = sub(glob,i,i)
- end
- return true
- end
-
-- Convert tokens.
while true do
i = i + 1
@@ -163,25 +103,10 @@
elseif char == "*" then
pattern = pattern .. ".*"
elseif char == "[" then
- -- Search inside a charset
+ -- Ignored
+ print("[...] syntax not supported in globs!")
+ elseif char == "\\" then
i = i + 1
- char = sub(glob,i,i)
- if char == "" or char == "]" then -- Matches nothing
- pattern = "[^]"
- break
- elseif char == "^" or char == "!" then
- i = i + 1
- char = sub(glob,i,i)
- if char ~= "]" then -- Matches anything so ignore
- pattern = pattern .. "[^"
- if not collect_set() then break end
- end
- else
- pattern = pattern .. "["
- if not collect_set() then break end
- end
- elseif char == "\\" then -- Discarded
- i = i + 1
char = sub(glob, i, i)
if char == "" then
pattern = pattern .. "\\$"
@@ -206,6 +131,8 @@
os_yes = "printf 'y\\n%.0s' {1..200}"
os_ascii = "echo \"\""
+os_cmpexe = getenv("cmpexe") or "cmp"
+os_cmpext = getenv("cmpext") or ".cmp"
os_diffext = getenv("diffext") or ".diff"
os_diffexe = getenv("diffexe") or "diff -c --strip-trailing-cr"
os_grepexe = "grep"
@@ -213,10 +140,13 @@
if os_type == "windows" then
os_ascii = "@echo."
+ os_cmpexe = getenv("cmpexe") or "fc /b"
+ os_cmpext = getenv("cmpext") or ".cmp"
os_concat = "&"
os_diffext = getenv("diffext") or ".fc"
os_diffexe = getenv("diffexe") or "fc /n"
os_grepexe = "findstr /r"
+ os_newline = "\n"
if tonumber(luatex_version) < 100 or
(tonumber(luatex_version) == 100
and tonumber(luatex_revision) < 4) then
@@ -246,9 +176,28 @@
chdir(path)
local result = currentdir()
chdir(oldpwd)
- return gsub(result, "\\", "/")
+ return escapepath(gsub(result, "\\", "/"))
end
+function escapepath(path)
+ if os_type == "windows" then
+ local path,count = gsub(path,'"','')
+ if count % 2 ~= 0 then
+ print("Unbalanced quotes in path")
+ exit(0)
+ else
+ if match(path," ") then
+ return '"' .. path .. '"'
+ end
+ return path
+ end
+ else
+ path = gsub(path,"\\ ","[PATH-SPACE]")
+ path = gsub(path," ","\\ ")
+ return gsub(path,"[PATH-SPACE]","\\ ")
+ end
+end
+
-- For cleaning out a directory, which also ensures that it exists
function cleandir(dir)
local errorlevel = mkdir(dir)
Modified: trunk/Master/texmf-dist/scripts/l3build/l3build-install.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/l3build/l3build-install.lua 2018-10-25 21:34:28 UTC (rev 48990)
+++ trunk/Master/texmf-dist/scripts/l3build/l3build-install.lua 2018-10-25 21:34:47 UTC (rev 48991)
@@ -36,7 +36,7 @@
local function gethome()
set_program("latex")
- return options["texmfhome"] or var_value("TEXMFHOME")
+ return abspath(options["texmfhome"] or var_value("TEXMFHOME"))
end
function uninstall()
Modified: trunk/Master/texmf-dist/scripts/l3build/l3build.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/l3build/l3build.lua 2018-10-25 21:34:28 UTC (rev 48990)
+++ trunk/Master/texmf-dist/scripts/l3build/l3build.lua 2018-10-25 21:34:47 UTC (rev 48991)
@@ -25,7 +25,7 @@
--]]
-- Version information
-release_date = "2018-09-26"
+release_date = "2018-10-25"
-- File operations are aided by the LuaFileSystem module
local lfs = require("lfs")
@@ -95,6 +95,20 @@
-- comes after any user versions
build_require("variables")
+-- Ensure that directories are 'space safe'
+maindir = escapepath(maindir)
+docfiledir = escapepath(docfiledir)
+sourcefiledir = escapepath(sourcefiledir)
+supportdir = escapepath(supportdir)
+testfiledir = escapepath(testfiledir)
+testsuppdir = escapepath(testsuppdir)
+builddir = escapepath(builddir)
+distribdir = escapepath(distribdir)
+localdir = escapepath(localdir)
+testdir = escapepath(testdir)
+typesetdir = escapepath(typesetdir)
+unpackdir = escapepath(unpackdir)
+
-- Tidy up the epoch setting
-- Force an epoch if set at the command line
-- Must be done after loading variables, etc.
Modified: trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx 2018-10-25 21:34:28 UTC (rev 48990)
+++ trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx 2018-10-25 21:34:47 UTC (rev 48991)
@@ -223,7 +223,7 @@
% }^^A
% }
%
-% \date{Released 2018-09-26}
+% \date{Released 2018-10-25}
%
% \maketitle
% \tableofcontents
@@ -474,7 +474,7 @@
%
% \begin{buildcmd}{doc \meta{name(s)}}
% Typesets only the files with the \meta{name(s)} given, which should be the
-% root name without any extension.
+% basename without any extension.
% \end{buildcmd}
%
% \begin{buildcmd}{install}
@@ -1824,6 +1824,32 @@
% \end{macrocode}
% \end{macro}
%
+%
+
+% \begin{macro}{\SHOWFILE}
+% Load a file (e.g.,| \jobname.toc|) into the .log file with the usual special
+% characters rendered harmless. Use as |\SHOWFILE{\jobname.aux}|.
+% \begin{macrocode}
+\begingroup % within the scope of this groups each line needs to end in % !
+\catcode`\^^M\active %
+\gdef\SHOWFILE#1{%
+ \typeout{-------- #1 (start) ---------}%
+\IfFileExists{#1}%
+ {\begingroup %
+ \catcode`\^^M\active %
+ \edef^^M{^\string^M^^J}%
+ \everyeof{\noexpand}%
+ \obeyspaces %
+ \@sanitize %
+ \message{\@@input #1 }%
+ \endgroup }%
+ {\message{Not found}}%
+ \typeout{-------- #1 (end) -----------}%
+}%
+\endgroup
+% \end{macrocode}
+% \end{macro}
+%
% To allow testing of possible changes, we allow extra code to be read
% in before the test starts. The necessary code should be placed in a
% file |regression-test.cfg|.
Modified: trunk/Master/texmf-dist/source/latex/l3build/l3build.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/l3build/l3build.ins 2018-10-25 21:34:28 UTC (rev 48990)
+++ trunk/Master/texmf-dist/source/latex/l3build/l3build.ins 2018-10-25 21:34:47 UTC (rev 48991)
@@ -1,6 +1,6 @@
\iffalse meta-comment
-File l3build.ins Copyright (C) 2014,2016 The LaTeX3 Project
+File l3build.ins Copyright (C) 2014-2018 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
@@ -32,7 +32,7 @@
\preamble
-Copyright (C) 2014-2016 The LaTeX3 Project
+Copyright (C) 2014-2018 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
Modified: trunk/Master/texmf-dist/tex/latex/l3build/regression-test.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/l3build/regression-test.tex 2018-10-25 21:34:28 UTC (rev 48990)
+++ trunk/Master/texmf-dist/tex/latex/l3build/regression-test.tex 2018-10-25 21:34:47 UTC (rev 48991)
@@ -6,7 +6,7 @@
%%
%% l3build.dtx (with options: `package')
%%
-%% Copyright (C) 2014-2016 The LaTeX3 Project
+%% Copyright (C) 2014-2018 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
@@ -80,6 +80,24 @@
\fi
\def\OMIT{\LONGTYPEOUT{OMIT}}
\def\TIMO{\LONGTYPEOUT{TIMO}}
+
+\begingroup % within the scope of this groups each line needs to end in % !
+\catcode`\^^M\active %
+\gdef\SHOWFILE#1{%
+ \typeout{-------- #1 (start) ---------}%
+\IfFileExists{#1}%
+ {\begingroup %
+ \catcode`\^^M\active %
+ \edef^^M{^\string^M^^J}%
+ \everyeof{\noexpand}%
+ \obeyspaces %
+ \@sanitize %
+ \message{\@@input #1 }%
+ \endgroup }%
+ {\message{Not found}}%
+ \typeout{-------- #1 (end) -----------}%
+}%
+\endgroup
\ifx\InputIfFileExists\@undefined
\newread\@inputcheck
\long\def\InputIfFileExists#1#2#3{%
More information about the tex-live-commits
mailing list