[latex3-commits] [l3svn] 04/04: l3build: Move copyctan() and copytds() to public area
noreply at latex-project.org
noreply at latex-project.org
Sat Apr 15 10:41:55 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 cc4311a0ee6b1a6e720ec630a1d21612628784a5
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sat Apr 15 09:11:35 2017 +0100
l3build: Move copyctan() and copytds() to public area
These are now documented in some detail: it is possible they may yet
be extended based on requirements from CTeX (to discuss with those
authors).
---
l3build/l3build.dtx | 53 +++++++++++++++++++++
l3build/l3build.lua | 132 +++++++++++++++++++++++++--------------------------
2 files changed, 119 insertions(+), 66 deletions(-)
diff --git a/l3build/l3build.dtx b/l3build/l3build.dtx
index ada0468..be209fb 100644
--- a/l3build/l3build.dtx
+++ b/l3build/l3build.dtx
@@ -1231,6 +1231,59 @@
% require this form of path.
% \end{function}
%
+% \subsection{Support functions}
+%
+% These functions support the main targets and may be used to construct
+% alternative implementations of the latter.
+%
+% \begin{function}{copyctan()}
+% \begin{syntax}
+% |copyctan()|
+% \end{syntax}
+% Copies files in the tables
+% \begin{itemize}
+% \item \var{bibfiles}
+% \item \var{demofiles}
+% \item \var{pdffiles}
+% \item \var{sourcefiles}
+% \item \var{textfiles}
+% \item \var{typesetfiles}
+% \end{itemize}
+% from the current (source) directory to the \enquote{flat} directory used
+% to build a CTAN-ready \texttt{.zip} file.
+% \end{function}
+%
+% \begin{function}{copytds()}
+% \begin{syntax}
+% |copytds()|
+% \end{syntax}
+% Copies files into a directory structure used to construct a TDS-style
+% \texttt{.zip} file. The path for files within this uses the \meta{module}
+% name (or \meta{bundle}/\meta{module} for more complex cases) appended
+% to the following subdirectories
+% \begin{itemize}
+% \item |doc|: files from the current (source) directory and listed in
+% \begin{itemize}
+% \item \var{bibfiles}
+% \item \var{demofiles}
+% \item \var{docfiles}
+% \item \var{pdffiles}
+% \item \var{textfiles}
+% \item \var{typesetlist}
+% \end{itemize}
+% \item |makeindex|: files from the \var{unpackdir}
+% listed in \var{makeindexfiles}
+% \item |bibtex/bst|: files from the \meta{unpackdir} listed in
+% \var{bstfiles}
+% \item |source|: files from the current (source) directory
+% listed in \var{sourcefiles}
+% \item |tex|files from the \var{unpackdir} listed in \var{installfiles}
+% \end{itemize}
+% (Note that where the \var{module} is set to |base| then files from
+% \var{bstfiles} and \var{makeindexfiles} will be installed without the
+% \var{module} prefix; this is primarily needed for core work by the team.)
+% \end{function}
+%
% \end{documentation}
%
% \begin{implementation}
diff --git a/l3build/l3build.lua b/l3build/l3build.lua
index 22e3d83..2b670b7 100644
--- a/l3build/l3build.lua
+++ b/l3build/l3build.lua
@@ -698,72 +698,6 @@ local function checkinit()
execute(os_ascii .. ">" .. testdir .. "/ascii.tcx")
end
--- Copy files to the main CTAN release directory
-function copyctan()
- -- Do all of the copying in one go
- for _,i in ipairs(
- {
- bibfiles,
- demofiles,
- docfiles,
- pdffiles,
- sourcefiles,
- textfiles,
- typesetlist
- }
- ) do
- for _,j in ipairs(i) do
- cp(j, ".", ctandir .. "/" .. ctanpkg)
- end
- end
-end
-
--- Copy files to the correct places in the TDS tree
-function copytds()
- local function install(source, dest, files, tool)
- local moduledir = moduledir
- -- For material associated with secondary tools (BibTeX, MakeIndex)
- -- the structure needed is slightly different from those items going
- -- into the tex/doc/source trees
- if tool then
- -- "base" is reserved for the tools themselves: make the assumption
- -- in this case that the tdsroot name is the right place for stuff to
- -- go (really just for the team)
- if module == "base" then
- moduledir = tdsroot
- else
- moduledir = module
- end
- end
- -- Convert the file table(s) to a list of individual files
- local filenames = { }
- for _,i in ipairs(files) do
- for _,j in ipairs(i) do
- for _,k in ipairs(filelist(source, j)) do
- insert(filenames, k)
- end
- end
- end
- -- The target is only created if there are actual files to install
- if next(filenames) ~= nil then
- local installdir = tdsdir .. "/" .. dest .. "/" .. moduledir
- mkdir(installdir)
- for _,i in ipairs(filenames) do
- cp(i, source, installdir)
- end
- end
- end
- install(
- ".",
- "doc",
- {bibfiles, demofiles, docfiles, pdffiles, textfiles, typesetlist}
- )
- install(unpackdir, "makeindex", {makeindexfiles}, true)
- install(unpackdir, "bibtex/bst", {bstfiles}, true)
- install(".", "source", {sourcelist})
- install(unpackdir, "tex", {installfiles})
-end
-
-- Unpack files needed to support testing/typesetting/unpacking
function depinstall(deps)
local errorlevel
@@ -1808,6 +1742,72 @@ function ctan(standalone)
return errorlevel
end
+-- Copy files to the main CTAN release directory
+function copyctan()
+ -- Do all of the copying in one go
+ for _,i in ipairs(
+ {
+ bibfiles,
+ demofiles,
+ docfiles,
+ pdffiles,
+ sourcefiles,
+ textfiles,
+ typesetlist
+ }
+ ) do
+ for _,j in ipairs(i) do
+ cp(j, ".", ctandir .. "/" .. ctanpkg)
+ end
+ end
+end
+
+-- Copy files to the correct places in the TDS tree
+function copytds()
+ local function install(source, dest, files, tool)
+ local moduledir = moduledir
+ -- For material associated with secondary tools (BibTeX, MakeIndex)
+ -- the structure needed is slightly different from those items going
+ -- into the tex/doc/source trees
+ if tool then
+ -- "base" is reserved for the tools themselves: make the assumption
+ -- in this case that the tdsroot name is the right place for stuff to
+ -- go (really just for the team)
+ if module == "base" then
+ moduledir = tdsroot
+ else
+ moduledir = module
+ end
+ end
+ -- Convert the file table(s) to a list of individual files
+ local filenames = { }
+ for _,i in ipairs(files) do
+ for _,j in ipairs(i) do
+ for _,k in ipairs(filelist(source, j)) do
+ insert(filenames, k)
+ end
+ end
+ end
+ -- The target is only created if there are actual files to install
+ if next(filenames) ~= nil then
+ local installdir = tdsdir .. "/" .. dest .. "/" .. moduledir
+ mkdir(installdir)
+ for _,i in ipairs(filenames) do
+ cp(i, source, installdir)
+ end
+ end
+ end
+ install(
+ ".",
+ "doc",
+ {bibfiles, demofiles, docfiles, pdffiles, textfiles, typesetlist}
+ )
+ install(unpackdir, "makeindex", {makeindexfiles}, true)
+ install(unpackdir, "bibtex/bst", {bstfiles}, true)
+ install(".", "source", {sourcelist})
+ install(unpackdir, "tex", {installfiles})
+end
+
function bundlectan()
-- Generate a list of individual file names excluding those in the second
-- argument: the latter is a table
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the latex3-commits
mailing list