tlbuild: Top-level directories

 
 6.2 Top-level directories
 =========================
 
 Here is a brief description of the top-level directories in the TeX Live
 source tree.
 
    As mentioned at the beginning of ⇒Overview of build system,
 the main source directories are 'texk/' (TeX-specific programs and
 libraries), 'utils/' (additional programs), and 'libs/' (generic
 libraries).
 
    In addition, the top-level directories 'am/' and 'm4/' contain
 'Makefile.am' fragments and Autoconf macros, respectively, used in many
 places.  Specifically, the file 'm4/kpse-pkgs.m4' contains lists of all
 program and library modules; missing modules are silently ignored.
 (This helps in creating cut-down source trees.)
 
    Each module contributes fragments (in separate files) defining its
 capabilities and requirements to the 'configure.ac' scripts at the
 top-level and in the subdirectories 'libs', 'utils', and 'texk'.  The
 fragments from program modules supply 'configure' options to disable or
 enable building them; those from library modules specify if an installed
 (system) version of that library can be used.  This ultimately
 determines which modules need to be built--although all modules must be
 configured for the benefit of 'make' targets such as 'dist' or
 'distcheck'.
 
    The top-level 'build-aux/' directory contains the common files
 'compile', 'config.guess', 'config.sub', 'depcomp', etc. used by most
 packages.  These are taken from the GNU Gnulib sources
 (<https://www.gnu.org/software/gnulib>), which in turn synchronizes with
 any ultimate upstream repository.  There are independent copies of some
 of these in a few other places, e.g.,
 'libs/freetype2/freetype-*/builds/unix/'.  The 'reautoconf' script does
 not touch those, but a TL cron job keeps them in sync (nightly).
 
    When the top-level './Build' script is used to build TL, two more two
 more top-level directories appear: 'Work/' for the build tree, and
 'inst/' for the install tree (from 'make install').  These names (and
 everything else about 'Build''s operation) can be changed by setting
 environment variables before running it; see the script source.