summaryrefslogtreecommitdiff
path: root/Build/source/README.layout
blob: dbb5139c2c9e2dcb84dcf483ef1c29ef72118a04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
	Layout of the teTeX / TeX Live (TL) build system
	================================================

The TL 2009 build system has been completely restructured, using Autoconf,
Automake, and Libtool.  The main purpose was to configure and build each
library before configuring any module (program or other library) depending
on that library.  This allows to check for properties and features of a
library built as part of the TL tree in much the same as for an installed
(system) version of that library.

This should simplify upgrading of modules maintained independently and/or
integrating new modules into the TL build system.

1. Layout of directories
========================

1.1. Overall layout
-------------------

libs/*/*		various libraries
texk/kpathsea/*		the Kpathsea library

texk/*/*		programs (mostly using Kpathsea)
utils/*/*		utility programs (not using Kpathsea)

texk/am/*		Makefile.am fragments
texk/web2c/am/*		  for the Kpathsea library
texk/web2c/*/am/*	  and the Web2C programs

libs/Lib/*		library Lib (zlib, libpng, t1lib, etc.)
texk/Prog/*		program package Prog (web2c, afm2pl, bibtex8, etc.)
utils/Util/*		utility program package Util (dialog, pdfopen, ps2eps, etc.)

libs/dummy/*		dummy modules
texk/dummy/*		  used to configure
utils/dummy/*		  the real modules

ac/*			various configure.ac fragments (configure options)
*/ac/*			  for the whole TL tree
*/*/ac/*		  or for a particular component

build-aux/*		auxiliary build scripts (config.guess etc.)

m4/kpse-pkgs.m4		Autoconf macros defining the lists of Lib, Prog, and Util
			  modules and handling loops over these lists
m4/*			other Autoconf macros

1.2. A library `Lib'
--------------------

libs/Lib/ac/withenable.ac	defines libraries required by Lib
libs/Lib/ac/Lib.ac		defines basic tests for a system version of Lib
m4/kpse-Lib-flags.m4		defines Autoconf macros for configure options
				  as well as KPSE_LIB_FLAGS, to be used in configure.ac
                                  files and defining Make variables

Several libraries use an unmodified source tree supplemented by a proxy
build system (bypassing that of the source tree, e.g.,

libs/zlib/zlib-1.2.3/*		(almost) unmodified source tree
libs/zlib/Makefile.am		proxy Makefile.am
libs/zlib/configure.ac		  and configure.ac

1.3. A program `Prog'
---------------------

texk/Prog/ac/withenable.ac	defines libraries required by Prog, provides the
				  configure option --disable-Prog
texk/Prog/ac/Prog.ac		defines Prog specific configure option that should
				  be seen at the top-level

1.4. A utility program `Util'
-----------------------------

utils/Util/ac/withenable.ac	defines libraries required by Util, provides the
				  configure option --disable-Util

2. Running `configure'
======================

Running configure for the top-level directory will in addition configure the
directories texk/kpathsea/, libs/, libs/dummy/, utils/, utils/dummy, texk/,
and texk/dummy/.  This will determine the programs to be built (utils/Util/
and texk/Prog) and libraries from the TL tree (texk/kpathsea/ and libs/Lib)
required by these programs.

3. Running `make'
=================

Running make in the top-level directory will recurse into the directories
texk/kpathsea/, libs/, utils/, and texk/.

3.1. Running `make' in libs/
----------------------------

First, for each subdirectory libs/Lib not yet configured, this runs
`configure' and if required `make all' in that directory.  Then this
recurses into all required subdirectories for the selected make target:
`default' or `all' to (re-)build, `check' to run tests, `install' etc.

3.2. Running `make' in utils/ and texk/
---------------------------------------

Quite similarly, for each subdirectory utils/Util and texk/Prog not yet
configured, this first runs `configure' and if required `make all' in that
directory.  Subsequently, this recurses into all required subdirectories to
(re-)build, run tests, install, etc.

3.3 Comment
-----------

The process described above configures all directories, even for libraries
or programs not to be built.  This is necessary for make targets such as
`dist' or `distcheck' that have to recurse into all subdirectories, whereas
targets such as `all', `check', or `install' only recurse into the required
subdirectories.