[latex3-commits] [l3svn] 03/03: Revert "l3build: Move copyctan() and copytds() to public area"
noreply at latex-project.org
noreply at latex-project.org
Sat Apr 15 18:35:19 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 85b4521b804c137ab8d1b69b1ac498fa584b9fbb
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sat Apr 15 17:35:08 2017 +0100
Revert "l3build: Move copyctan() and copytds() to public area"
This reverts commit cc4311a0ee6b1a6e720ec630a1d21612628784a5.
---
l3build/l3build.dtx | 53 ---------------------
l3build/l3build.lua | 132 +++++++++++++++++++++++++--------------------------
2 files changed, 66 insertions(+), 119 deletions(-)
diff --git a/l3build/l3build.dtx b/l3build/l3build.dtx
index be209fb..ada0468 100644
--- a/l3build/l3build.dtx
+++ b/l3build/l3build.dtx
@@ -1231,59 +1231,6 @@
% 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 b424615..637d028 100644
--- a/l3build/l3build.lua
+++ b/l3build/l3build.lua
@@ -700,6 +700,72 @@ 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
local function depinstall(deps)
local errorlevel
@@ -1744,72 +1810,6 @@ 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