[latex3-commits] [git/LaTeX3-latex3-l3build] master: New variable "textfiledir" (150bff2)

Joseph Wright joseph.wright at morningstar2.co.uk
Mon Feb 17 09:45:44 CET 2020


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

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

commit 150bff2649909fa3ed1383fbcd1f02b12ed8ef84
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon Feb 17 08:44:57 2020 +0000

    New variable "textfiledir"


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

150bff2649909fa3ed1383fbcd1f02b12ed8ef84
 CHANGELOG.md          | 3 +++
 l3build-ctan.lua      | 6 +++---
 l3build-variables.lua | 1 +
 l3build.dtx           | 9 ++++++++-
 4 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 08fbcb7..a2f3341 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,9 @@ this project uses date-based 'snapshot' version identifiers.
 
 ## [Unreleased]
 
+### Added
+- Variable `textfiledir`
+
 ### Changed
 - Documentation improvements
 
diff --git a/l3build-ctan.lua b/l3build-ctan.lua
index 09b10e0..df1daf9 100644
--- a/l3build-ctan.lua
+++ b/l3build-ctan.lua
@@ -1,6 +1,6 @@
 --[[
 
-File l3build-ctan.lua Copyright (C) 2018 The LaTeX3 Project
+File l3build-ctan.lua Copyright (C) 2018-2020 The LaTeX3 Project
 
 It may be distributed and/or modified under the conditions of the
 LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -54,7 +54,7 @@ function copyctan()
   end
   copyfiles(sourcefiles,sourcefiledir)
   for _,file in pairs(textfiles) do
-    cp(file, currentdir, ctandir .. "/" .. ctanpkg)
+    cp(file, textfiledir, ctandir .. "/" .. ctanpkg)
   end
 end
 
@@ -127,7 +127,7 @@ function ctan()
   end
   if errorlevel == 0 then
     for _,i in ipairs(textfiles) do
-      for _,j in pairs({unpackdir, currentdir}) do
+      for _,j in pairs({unpackdir, textfiledir}) do
         cp(i, j, ctandir .. "/" .. ctanpkg)
         cp(i, j, tdsdir .. "/doc/" .. tdsroot .. "/" .. bundle)
       end
diff --git a/l3build-variables.lua b/l3build-variables.lua
index 06cfdd3..2f5394f 100644
--- a/l3build-variables.lua
+++ b/l3build-variables.lua
@@ -43,6 +43,7 @@ maindir    = maindir or currentdir
 -- Substructure for file locations
 docfiledir    = docfiledir    or currentdir
 sourcefiledir = sourcefiledir or currentdir
+textfiledir   = textfiledir   or currentdir
 supportdir    = supportdir    or maindir .. "/support"
 testfiledir   = testfiledir   or currentdir .. "/testfiles"
 testsuppdir   = testsuppdir   or testfiledir .. "/support"
diff --git a/l3build.dtx b/l3build.dtx
index 3be9f38..6f606d1 100644
--- a/l3build.dtx
+++ b/l3build.dtx
@@ -64,6 +64,7 @@
 \luavarset{testfiledir}{"./testfiles"}  {Directory containing test files}
 \luavarset{testsuppdir}{testfiledir .. "/support"}{Directory containing test-specific support files}
 \luavarset{texmfdir}{maindir .. "/texmf"}{Directory containing support files in tree form}
+\luavarset{textfiledir}{"."}                 {Directory containing plain text files}
 \luavarseparator
 \luavarset{builddir}  {maindir .. "/build"}   {Directory for building and testing}
 \luavarset{distribdir}{builddir .. "/distrib"}{Directory for generating distribution structure}
@@ -773,7 +774,8 @@
 % A variety of source layouts are supported. In general, a \enquote{flat}
 % layout with all source files \enquote{here} is most convenient. However,
 % \pkg{l3build} supports placement of both code and documentation source
-% files in other locations using the \var{sourcefiledir} and \var{docfiledir}
+% files in other locations using the \var{sourcefiledir}, \var{docfiledir}
+% and \var{textfiledir}
 % variables. For pre-built trees, the glob syntax \texttt{**/*.\meta{ext}} may
 % be useful in these cases: this enables recursive searching in the appropriate
 % tree locations. With the standard settings, this structure will be removed
@@ -781,6 +783,11 @@
 % used to control this behavior. The \var{flattentds} setting controls
 % the same concept for TDS creation.
 %
+% Notice that text files are treated separately from documentation files when
+% splitting trees: this is to allow for the common case where files such
+% as |README| and |LICENSE| are at the top level even when other documentation
+% files are in a sub-directory.
+%
 % A series of example layouts and matching |build.lua| files are available from
 % \url{https://github.com/latex3/l3build/tree/master/examples}.
 %





More information about the latex3-commits mailing list.