3 -- Build script for LaTeX2e "base" files
5 -- Identify the bundle and module
6 module
= "latex2e-base"
9 -- Location of main directory: use Unix-style path separators
12 -- Set up the file types needed here
15 "*.cfg", "*.clo", "*.cls", "*.def", "*.dfu", "*.err", "*.fd", "*.ist",
16 "*.ltx", "*.sty", "*.tex"
18 sourcefiles
= {"*.cls", "*.dtx", "*.fdd", "ltpatch.ltx", "*.ins", "*.tex"}
45 -- A few special file for unpacking
46 unpackfiles
= {"unpack.ins"}
47 unpacksuppfiles
= {"hyphen.cfg", "texsys.cfg", "UShyphen.tex"}
49 -- Custom settings for the check system
50 checksuppfiles
= {"latex.fmt"}
51 testsuppdir
= "testfiles/helpers"
53 -- No dependencies at all (other than l3build of course)
57 -- A function is needed to build the format
58 -- As this is a one-off, things are hard-coded
61 -- Much the same as the standard unpack approach: run from 'here' so
62 -- the relationships are all correct
64 os_setenv
.. " TEXINPUTS=" .. unpackdir
.. os_pathsep
.. localdir
66 "etex -etex -ini " .. " -output-directory=" .. unpackdir
..
67 " " .. unpackdir
.. "/latex.ltx"
71 -- base does all of the targets itself
72 function main (target
, file
, engine
)
74 if target
== "check" then
76 elseif target
== "clean" then
78 elseif target
== "ctan" then
80 elseif target
== "doc" then
82 elseif target
== "install" then
84 elseif target
== "save" then
90 elseif target
== "unpack" then
91 -- A simple way to have the unpack target also build the format
93 elseif target
== "version" then
100 -- Load the common settings for the LaTeX2e repo
101 dofile (maindir
.. "/build-config.lua")
103 -- Find and run the build system
104 kpse
.set_program_name ("kpsewhich")
105 dofile (kpse
.lookup ("l3build.lua"))