3 -- Build script for LaTeX2e files
5 -- No bundle or module here, but these have to be defined
9 -- A couple of custom variables: the order here is set up for 'importance'
10 bundles
= {"base", "doc"}
11 required
= {"cyrillic", "graphics", "tools", "amsmath"}
13 -- Location of main directory: use Unix-style path separators
16 -- Help for the master script is simple
19 print " build check - run automated check system "
20 print " build ctan - create CTAN-ready archive "
21 print " build doc - runs all documentation files "
22 print " build clean - clean out directory tree "
23 print " build install - install files in local texmf tree"
27 -- A custom main function
28 -- While almost all of this is customise, the need to be able to cp and
29 -- rm files means that loading l3build.lua is very useful
30 function main (target
)
31 local function dobundles (target
)
33 for _
,v
in ipairs(bundles
) do
36 for _
,v
in ipairs(required
) do
37 table.insert(t
, "required/" .. v
)
39 return call(t
, target
)
41 if target
== "check" then
43 elseif target
== "clean" then
47 elseif target
== "ctan" then
48 local errorlevel
= dobundles ("ctan")
49 if errorlevel
== 0 then
50 for _
,i
in ipairs (bundles
) do
53 for _
,i
in ipairs (required
) do
54 cp ("*.zip", "required/" .. i
, ".")
57 elseif target
== "doc" then
59 elseif target
== "install" then
61 elseif target
== "unpack" then
63 elseif target
== "version" then
70 -- Find and run the build system
71 kpse
.set_program_name ("kpsewhich")
72 dofile (kpse
.lookup ("l3build.lua"))