tl2017 luatex discretionaries
[latex2e.git] / latex2e-20170101 / doc / build.lua
blob36e410121278eb9883538d8f6a603f2f011f5207
1 #!/usr/bin/env texlua
3 -- Build script for LaTeX2e "doc" files
5 -- Identify the bundle and module
6 module = "base"
7 bundle = ""
9 -- CTAN's name for this is a bit different from ours
10 ctanpkg = "latex-doc"
12 -- Location of main directory: use Unix-style path separators
13 maindir = ".."
15 -- Set up the file types needed here
16 installfiles = { }
17 sourcefiles = {"ltnews??.tex"}
18 typesetfiles =
20 "cfgguide.tex",
21 "clsguide.tex",
22 "cyrguide.tex",
23 "encguide.tex",
24 "fntguide.tex",
25 "ltnews.tex",
26 "ltx3info.tex",
27 "modguide.tex",
28 "usrguide.tex",
29 "latexchanges.tex"
32 -- No dependencies at all (other than l3build of course)
33 checkdeps = { }
34 unpackdeps = { }
36 -- Simplified help
37 function help ()
38 print ""
39 print " build clean - clean out directory tree "
40 print " build ctan - create CTAN-ready archive "
41 print " build doc - runs all documentation files"
42 print ""
43 end
45 -- doc does all of the targets itself
46 function main (target, file, engine)
47 local errorlevel
48 if target == "doc" then
49 doc ()
50 elseif target == "clean" then
51 clean ()
52 elseif target == "ctan" then
53 ctan (true)
54 elseif target == "version" then
55 version ()
56 else
57 help ()
58 end
59 end
61 -- Load the common settings for the LaTeX2e repo
62 dofile (maindir .. "/build-config.lua")
64 -- Find and run the build system
65 kpse.set_program_name ("kpsewhich")
66 dofile (kpse.lookup ("l3build.lua"))