[latex3-commits] [git/latex3] master: Add cmdcheck target to l3build 'locally' (e127340)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Dec 19 09:02:50 CET 2017


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/e127340a7fbc58bc1354458a44b0ed854b97ccec

>---------------------------------------------------------------

commit e127340a7fbc58bc1354458a44b0ed854b97ccec
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Dec 19 08:02:50 2017 +0000

    Add cmdcheck target to l3build 'locally'
    
    This has been removed from the main l3build.
    
    At present, the target is only added for l3kernel.
    
    Some simplifiications of the code result from the move.


>---------------------------------------------------------------

e127340a7fbc58bc1354458a44b0ed854b97ccec
 build-config.lua   |    1 -
 l3kernel/build.lua |   35 ++++++++++++++++++++++++++++++++++-
 2 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/build-config.lua b/build-config.lua
index 2fd8c96..e9312fa 100644
--- a/build-config.lua
+++ b/build-config.lua
@@ -4,7 +4,6 @@ checkdeps   = checkdeps   or {maindir .. "/l3kernel"}
 typesetdeps = typesetdeps or {maindir .. "/l3kernel"}
 unpackdeps  = unpackdeps  or {maindir .. "/l3kernel"}
 
-cmdchkfiles     = cmdchkfiles     or {"*.dtx"}
 checkengines    = checkengines
   or {"pdftex", "xetex", "luatex", "ptex", "uptex"}
 checksuppfiles  = checksuppfiles  or
diff --git a/l3kernel/build.lua b/l3kernel/build.lua
index 94330a5..cd4075e 100644
--- a/l3kernel/build.lua
+++ b/l3kernel/build.lua
@@ -12,7 +12,6 @@ maindir = ".."
 -- Non-standard settings
 checkfiles   = {"l3names.def"}
 cleanfiles   = {"*.fmt", "*.log", "*.pdf", "*.zip"}
-cmdchkfiles  = {"source3.tex"}
 docfiles     = {"source3body.tex"}
 installfiles =
   {
@@ -40,6 +39,40 @@ versionfiles     =
 typesetdeps = {maindir .. "/l3packages/xparse"}
 unpackdeps  = { }
 
+function cmdcheck()
+  mkdir(localdir)
+  cleandir(testdir)
+  depinstall(checkdeps)
+  for _,filetype in pairs(
+      {bibfiles, docfiles, typesetfiles, typesetdemofiles}
+    ) do
+    for _,file in pairs(filetype) do
+      cp(file, docfiledir, testdir)
+    end
+  end
+  for _,file in pairs(sourcefiles) do
+    cp(file, sourcefiledir, testdir)
+  end
+  for _,file in pairs(typesetsuppfiles) do
+    cp(file, supportdir, testdir)
+  end
+  print("Checking source3")
+  run(
+    testdir,
+    os_setenv .. " TEXINPUTS=." .. os_pathsep .. abspath(localdir)
+      .. os_pathsep ..
+    os_concat ..
+    string.gsub(stdengine, "tex$", "latex") .. " --interaction=batchmode" ..
+      " \"\\PassOptionsToClass{check}{l3doc} \\input source3.tex \""
+      .. " > " .. os_null
+  )
+  for line in io.lines(testdir .. "/source3.cmds") do
+    if string.match(line, "^%!") then
+      print("   - " .. string.match(line, "^%! (.*)"))
+    end
+  end
+end
+
 function format()
   local engines = checkengines
   if optengines then





More information about the latex3-commits mailing list