diff --git a/CHANGELOG.md b/CHANGELOG.md index f0f84f6..588bc7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ this project uses date-based 'snapshot' version identifiers. ### Added +- Support `exhibitfiles` to set files that need to be "exhibited" in the current workspace + - Variable `checkpatterns` (issue \#449) ### Changed diff --git a/l3build-clean.lua b/l3build-clean.lua index 5d82d10..d3d6b3f 100644 --- a/l3build-clean.lua +++ b/l3build-clean.lua @@ -64,7 +64,9 @@ function clean() end end end - + for _,i in pairs(exhibitfiles) do + rm(currentdir, i) + end return 0 end diff --git a/l3build-unpack.lua b/l3build-unpack.lua index 504642a..e17721e 100644 --- a/l3build-unpack.lua +++ b/l3build-unpack.lua @@ -39,6 +39,9 @@ function unpack(sources, sourcedirs) return errorlevel end end + for _,i in ipairs(exhibitfiles) do + cp(i, unpackdir, maindir) + end return 0 end diff --git a/l3build-variables.lua b/l3build-variables.lua index 46339fa..fa8f95e 100644 --- a/l3build-variables.lua +++ b/l3build-variables.lua @@ -85,6 +85,7 @@ docfiles = docfiles or { } dynamicfiles = dynamicfiles or { } excludefiles = excludefiles or {"*~","build.lua","config-*.lua"} exefiles = exefiles or { } +exhibitfiles = exhibitfiles or { } installfiles = installfiles or {"*.sty","*.cls"} makeindexfiles = makeindexfiles or {"*.ist"} scriptfiles = scriptfiles or { } diff --git a/l3build.dtx b/l3build.dtx index 77f9efb..fd4b9ef 100644 --- a/l3build.dtx +++ b/l3build.dtx @@ -89,6 +89,7 @@ \luavarset{docfiles} {\{ \}}{Files which are part of the documentation but should not be typeset} \luavarset{dynamicfiles} {\{ \}}{Secondary files to cleared before each test is run} \luavarset{excludefiles} {\{"*\string~","build.lua","config-*.lua"\}}{Files to ignore entirely (default for Emacs backup files)} +\luavarset{exhibitfiles} {\{ \}}{Files to \enquote{exhibit} in the current workspace} \luavarset{installfiles} {\{"*.sty","*.cls"\}}{Files to install to the \texttt{tex} area of the \texttt{texmf} tree} \luavarset{makeindexfiles} {\{"*.ist"\}}{MakeIndex files to be included in a TDS-style zip} \luavarset{scriptfiles} {\{ \}}{Files to install to the \texttt{scripts} area of the \texttt{texmf} tree} @@ -478,7 +479,7 @@ % When applied to a bundle, the |clean| target is first applied to each % embedded modules (listed in |modules|). % In addition, all the files in the directory of |build.lua| are removed -% when matched by \var{cleanfiles}, while ignoring \var{sourcefiles}. Finally |ctandir| and |tdsdir| are removed. +% when matched by \var{cleanfiles} and \var{exhibitfiles}, while ignoring \var{sourcefiles}. Finally |ctandir| and |tdsdir| are removed. % \end{buildcmd} % % @@ -631,6 +632,9 @@ % % If additional support files are required for the unpacking process, these can be enumerated in the \var{unpacksuppfiles} variable. % Dependencies for unpacking are defined with \var{unpackdeps}. +% +% If users merged some text files (such as |*.md|) into some source files and the text files need to \enquote{exhibit} in the main directory (to preview on GitHub repository homepage, etc.), these can be enumerated in the \var{exhibitfiles} variable. +% Then, these files will be copied from \var{unpackdir} to the main directory after unpacking. % % By default this process allows files to be accessed in all standard |texmf| trees; this can be disabled by setting \var{unpacksearch} to |false|. % \end{buildcmd} @@ -2260,7 +2264,7 @@ \showboxdepth=\maxdimen % \end{macrocode} % -% \begin{macro}{\logginoutput} +% \begin{macro}{\loggingoutput} % The |\showoutput| command of \LaTeX{} calls |\loggingoutput| which in turn % calls |\errorstopmode| but we want to continue running without any stops. % \begin{macrocode}