summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-10-25 21:34:47 +0000
committerKarl Berry <karl@freefriends.org>2018-10-25 21:34:47 +0000
commit02aa0c181c36eb53c436478eeb878a070972ac16 (patch)
treee6803181aa2bf1a9bbe4ccda4841b4f6d9b1e31a /Master
parent56ff75d2dc5bee2624945e8dd43945f1670e040d (diff)
l3build (25oct18)
git-svn-id: svn://tug.org/texlive/trunk@48991 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/l3build/CHANGELOG.md21
-rw-r--r--Master/texmf-dist/doc/latex/l3build/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/l3build/l3build.pdfbin674707 -> 674538 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/l3build.12
-rw-r--r--Master/texmf-dist/doc/man/man1/l3build.man1.pdfbin15376 -> 15273 bytes
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-check.lua38
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-file-functions.lua109
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-install.lua2
-rwxr-xr-xMaster/texmf-dist/scripts/l3build/l3build.lua16
-rw-r--r--Master/texmf-dist/source/latex/l3build/l3build.dtx30
-rw-r--r--Master/texmf-dist/source/latex/l3build/l3build.ins4
-rw-r--r--Master/texmf-dist/tex/latex/l3build/regression-test.tex20
12 files changed, 129 insertions, 115 deletions
diff --git a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
index d2101f6fe9c..7202cfb1c70 100644
--- a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
+++ b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
@@ -7,7 +7,20 @@ this project uses date-based 'snapshot' version identifiers.
## [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]
@@ -112,7 +125,7 @@ this project uses date-based 'snapshot' version identifiers.
## [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 @@ 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/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 @@ this project uses date-based 'snapshot' version identifiers.
[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
-
diff --git a/Master/texmf-dist/doc/latex/l3build/README.md b/Master/texmf-dist/doc/latex/l3build/README.md
index 5cd4a6bfbfd..bbabb53c0a7 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 2018-09-26
+Release 2018-10-25
Overview
--------
diff --git a/Master/texmf-dist/doc/latex/l3build/l3build.pdf b/Master/texmf-dist/doc/latex/l3build/l3build.pdf
index 4af47c724ba..babc27bce30 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 160e805e288..b00410abd09 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 "2018-09-26"
+.TH l3build 1 "2018-10-25"
.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 a54d0bc91a7..8ee6bab296d 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 556f326cd70..416bfb4c994 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 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 @@ function runcheck(name, hide)
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 @@ function compare_tlg(name, engine,cleanup)
-- 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,25 +670,20 @@ function runtest(name, engine, hide, ext, pdfmode, breakout)
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
- 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
+ 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 XeTeX engine
local checkopts = checkopts
@@ -703,7 +697,7 @@ function runtest(name, engine, hide, ext, pdfmode, breakout)
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"
diff --git a/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua b/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua
index bc462d3ff33..bf5ce872b15 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua
@@ -33,6 +33,7 @@ local chdir = lfs.chdir
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 @@ local function glob_to_pattern(glob)
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,24 +103,9 @@ local function glob_to_pattern(glob)
elseif char == "*" then
pattern = pattern .. ".*"
elseif char == "[" then
- -- Search inside a charset
- 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
+ -- Ignored
+ print("[...] syntax not supported in globs!")
+ elseif char == "\\" then
i = i + 1
char = sub(glob, i, i)
if char == "" then
@@ -206,6 +131,8 @@ os_setenv = "export"
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 @@ os_newline = "\n"
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,7 +176,26 @@ function abspath(path)
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
diff --git a/Master/texmf-dist/scripts/l3build/l3build-install.lua b/Master/texmf-dist/scripts/l3build/l3build-install.lua
index 12c59914916..f32dcd003fd 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-install.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-install.lua
@@ -36,7 +36,7 @@ local insert = table.insert
local function gethome()
set_program("latex")
- return options["texmfhome"] or var_value("TEXMFHOME")
+ return abspath(options["texmfhome"] or var_value("TEXMFHOME"))
end
function uninstall()
diff --git a/Master/texmf-dist/scripts/l3build/l3build.lua b/Master/texmf-dist/scripts/l3build/l3build.lua
index cdf1dead187..bb5b27bfd80 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 = "2018-09-26"
+release_date = "2018-10-25"
-- File operations are aided by the LuaFileSystem module
local lfs = require("lfs")
@@ -95,6 +95,20 @@ end
-- 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.
diff --git a/Master/texmf-dist/source/latex/l3build/l3build.dtx b/Master/texmf-dist/source/latex/l3build/l3build.dtx
index 368ef71c42a..d8c4287d585 100644
--- a/Master/texmf-dist/source/latex/l3build/l3build.dtx
+++ b/Master/texmf-dist/source/latex/l3build/l3build.dtx
@@ -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|.
diff --git a/Master/texmf-dist/source/latex/l3build/l3build.ins b/Master/texmf-dist/source/latex/l3build/l3build.ins
index e943feb036e..483bab9d4a5 100644
--- a/Master/texmf-dist/source/latex/l3build/l3build.ins
+++ b/Master/texmf-dist/source/latex/l3build/l3build.ins
@@ -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 @@ license information is placed in the derived files.
\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
diff --git a/Master/texmf-dist/tex/latex/l3build/regression-test.tex b/Master/texmf-dist/tex/latex/l3build/regression-test.tex
index 34cb639dc6c..f7e71b6a036 100644
--- a/Master/texmf-dist/tex/latex/l3build/regression-test.tex
+++ b/Master/texmf-dist/tex/latex/l3build/regression-test.tex
@@ -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{%