From f14c96ef3bc369e9d274b48c02b606ab7a1bc1b9 Mon Sep 17 00:00:00 2001 From: XZS Date: Wed, 12 Apr 2017 23:40:15 +0200 Subject: [PATCH] introduce a docfiledir 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. --- l3build/l3build.dtx | 1 + l3build/l3build.lua | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/l3build/l3build.dtx b/l3build/l3build.dtx index 6e9d4e3adb..3e6c6169ed 100644 --- a/l3build/l3build.dtx +++ b/l3build/l3build.dtx @@ -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}.} diff --git a/l3build/l3build.lua b/l3build/l3build.lua index e2373f99fc..3d07919e73 100644 --- a/l3build/l3build.lua +++ b/l3build/l3build.lua @@ -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 { } @@ -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 @@ -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