[latex3-commits] [l3svn] 01/02: provide typesetsourcefiles

noreply at latex-project.org noreply at latex-project.org
Sat Jun 24 23:17:14 CEST 2017


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

commit 70afe1e89cb6727ac8d9c8b847096c866e4f4df4
Author: XZS <d.f.fischer at web.de>
Date:   Thu Apr 13 22:45:31 2017 +0200

    provide typesetsourcefiles
    
    The files specified in this array are treated similar to the
    typesetsuppfiles, as they are only pulled in when typesetting the
    documentation. Like the sourcefiles, however, they are also unpacked
    before. So the name for the new variable is a combination of both.
---
 l3build/l3build.dtx |    1 +
 l3build/l3build.lua |   19 +++++++++++--------
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/l3build/l3build.dtx b/l3build/l3build.dtx
index a2dfb83..c4b302c 100644
--- a/l3build/l3build.dtx
+++ b/l3build/l3build.dtx
@@ -89,6 +89,7 @@
 \luavarset{typesetdemofiles}{\{~\}}       {Files to typeset before the documentation (as demos), but where the PDF results are not included in the release.}
 \luavarset{typesetfiles}    {\{"*.dtx"\}} {Files to typeset for documentation.}
 \luavarset{typesetsuppfiles}{\{~\}}       {Files needed to support typesetting when \enquote{sandboxed}.}
+\luavarset{typesetsourcefiles}{\{~\}}     {Files to copy to unpacking when typesetting.}
 \luavarset{unpackfiles}     {\{"*.ins"\}} {Files to run to perform unpacking.}
 \luavarset{unpacksuppfiles} {\{~\}}       {Files needed to support unpacking when \enquote{sandboxed}.}
 \luavarset{versionfiles}    {\{"*.dtx"\}} {Files for automatic version editing.}
diff --git a/l3build/l3build.lua b/l3build/l3build.lua
index 832bd95..87f93c0 100644
--- a/l3build/l3build.lua
+++ b/l3build/l3build.lua
@@ -102,6 +102,7 @@ textfiles        = textfiles        or {"*.md", "*.txt"}
 typesetdemofiles = typesetdemofiles or { }
 typesetfiles     = typesetfiles     or {"*.dtx"}
 typesetsuppfiles = typesetsuppfiles or { }
+typesetsourcefiles = typesetsourcefiles or { }
 unpackfiles      = unpackfiles      or {"*.ins"}
 unpacksuppfiles  = unpacksuppfiles  or { }
 versionfiles     = versionfiles     or {"*.dtx"}
@@ -1851,7 +1852,7 @@ function doc(files)
     cp(i, supportdir, typesetdir)
   end
   depinstall(typesetdeps)
-  unpack()
+  unpack({sourcefiles, typesetsourcefiles})
   -- Main loop for doc creation
   for _, typesetfiles in ipairs({typesetdemofiles, typesetfiles}) do
     for _,i in ipairs(typesetfiles) do
@@ -2060,12 +2061,12 @@ end
 
 -- Unpack the package files using an 'isolated' system: this requires
 -- a copy of the 'basic' DocStrip program, which is used then removed
-function unpack()
+function unpack(sources)
   local errorlevel = depinstall(unpackdeps)
   if errorlevel ~= 0 then
     return errorlevel
   end
-  errorlevel = bundleunpack()
+  errorlevel = bundleunpack({"."}, sources)
   if errorlevel ~= 0 then
     return errorlevel
   end
@@ -2080,7 +2081,7 @@ end
 
 -- Split off from the main unpack so it can be used on a bundle and not
 -- leave only one modules files
-bundleunpack = bundleunpack or function(sourcedir)
+bundleunpack = bundleunpack or function(sourcedir, sources)
   local errorlevel = mkdir(localdir)
   if errorlevel ~=0 then
     return errorlevel
@@ -2090,10 +2091,12 @@ bundleunpack = bundleunpack or function(sourcedir)
     return errorlevel
   end
   for _,i in ipairs(sourcedir or {"."}) do
-    for _,j in ipairs(sourcefiles) do
-      errorlevel = cp(j, i, unpackdir)
-      if errorlevel ~=0 then
-        return errorlevel
+    for _,j in ipairs(sources or {sourcefiles}) do
+      for _,k in ipairs(j) do
+        errorlevel = cp(k, i, unpackdir)
+        if errorlevel ~=0 then
+          return errorlevel
+        end
       end
     end
   end

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list