Skip to content

Commit

Permalink
introduce a docfiledir
Browse files Browse the repository at this point in the history
It essentially is to the typesetfiles what testfiledir is to the
testfiles: The files found therein are only introduced into the
unpacking process when typesetting the documentation.
  • Loading branch information
dffischer committed May 22, 2017
1 parent 426de6e commit f14c96e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions l3build/l3build.dtx
Expand Up @@ -88,6 +88,7 @@
\luavarset{textfiles} {\{"*.md", "*.txt"\}}{Plain text files to send to CTAN as-is.}
\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{docfiledir} {maindir .. "/doc"}{Where to look for the |typesetfiles|.}
\luavarset{typesetsuppfiles}{\{~\}} {Files needed to support typesetting when \enquote{sandboxed}.}
\luavarset{unpackfiles} {\{"*.ins"\}} {Files to run to perform unpacking.}
\luavarset{unpacksuppfiles} {\{~\}} {Files needed to support unpacking when \enquote{sandboxed}.}
Expand Down
7 changes: 4 additions & 3 deletions l3build/l3build.lua
Expand Up @@ -101,6 +101,7 @@ sourcefiles = sourcefiles or {"*.dtx", "*.ins"}
textfiles = textfiles or {"*.md", "*.txt"}
typesetdemofiles = typesetdemofiles or { }
typesetfiles = typesetfiles or {"*.dtx"}
docfiledir = docfiledir or maindir .. "/doc"
typesetsuppfiles = typesetsuppfiles or { }
unpackfiles = unpackfiles or {"*.ins"}
unpacksuppfiles = unpacksuppfiles or { }
Expand Down Expand Up @@ -1859,7 +1860,7 @@ function doc(files)
cp(i, supportdir, typesetdir)
end
depinstall(typesetdeps)
unpack()
unpack({".", docfiledir})
-- Main loop for doc creation
for _, typesetfiles in ipairs({typesetdemofiles, typesetfiles}) do
for _,i in ipairs(typesetfiles) do
Expand Down Expand Up @@ -2068,12 +2069,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(sourcedir)
local errorlevel = depinstall(unpackdeps)
if errorlevel ~= 0 then
return errorlevel
end
errorlevel = bundleunpack()
errorlevel = bundleunpack(sourcedir)
if errorlevel ~= 0 then
return errorlevel
end
Expand Down

0 comments on commit f14c96e

Please sign in to comment.