[latex3-commits] [git/LaTeX3-latex3-l3build] master: Document changes in build.lua files [ci skip] (e580a86)

Joseph Wright joseph.wright at morningstar2.co.uk
Sat Mar 10 10:18:22 CET 2018


Repository : https://github.com/latex3/l3build
On branch  : master
Link       : https://github.com/latex3/l3build/commit/e580a869eb446c141d156b30f57aeb474e668e36

>---------------------------------------------------------------

commit e580a869eb446c141d156b30f57aeb474e668e36
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sat Mar 10 09:18:22 2018 +0000

    Document changes in build.lua files [ci skip]


>---------------------------------------------------------------

e580a869eb446c141d156b30f57aeb474e668e36
 l3build.dtx |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/l3build.dtx b/l3build.dtx
index 2b23e8c..51d67e1 100644
--- a/l3build.dtx
+++ b/l3build.dtx
@@ -547,7 +547,33 @@
 % 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}
 %
+% \subsection{The \texttt{build.lua} file}
+%
+% The \texttt{build.lua} file used to control \pkg{l3build} is a simple Lua file
+% which is read during execution. In the current release of \pkg{l3build},
+% \texttt{build.lua} is read automatically and can access all of the global
+% functions provided by the script. Thus it may contain a simple list of
+% variable settings \emph{or} additionally custom code to change the build
+% process. A number of example scripts are given in Section~\ref{sec:examples}.
+%
+% Earlier releases of \pkg{l3build} required that the last line of
+% \texttt{build.lua} ran the main script, \emph{i.e.}~ that \texttt{build.lua}
+% was what the user called rather than \texttt{l3build.lua}. To allow scripts
+% to support both forms \emph{for the transition}, a simple test may be
+% included as showing in Figure~\ref{fig:build-compat}.
+% \begin{figure}
+%   \begin{lstlisting}[frame=single,language={[5.2]Lua},gobble = 6]
+%     if not release_date then
+%       dofile(kpse.lookup("l3build.lua"))
+%     end
+%   \end{lstlisting}
+% \caption{Final lines for a \texttt{build.lua} script usable with both older
+%   and newer releases of \pkg{l3build}.}
+% \label{fig:build-compat}
+% \end{figure}
+%
 % \subsection{Example build scripts}
+% \label{sec:examples}
 %
 % An example of a standalone build script for a package that uses self-contained |.dtx| files is shown in Figure~\ref{fig:breqn}.
 % Here, the |module| only is defined, and since it doesn't use |.ins| files so the variable \var{unpackfiles} is redefined to run |tex| on the |.dtx| files instead to generate the necessary |.sty| files.





More information about the latex3-commits mailing list