Subversion Repositories tendra.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6 7u83 1
Build System
2
============
3
 
4
This document is intended to provide an overview of what the build
5
system intends to achieve, and how it intends to achieve it.
6
 
7
 
8
Makefiles
9
---------
10
 
11
The Makefile dialect of choice is bmake: a portable version of NetBSD's
12
make(1) program. This is chosen primarily for its expressiveness, and,
13
therefore, convenience.
14
 
15
bmake provides its own rules and macros - these are not used:
16
everything required is present in the local ./mk directory.
17
 
18
 
19
Portability
20
-----------
21
 
22
With the proposed restructuring, the source is split into roughly two
23
portions:
24
 
25
 1. Support tools and utilities (sid, lexi, etc)
26
 2. The TenDRA compiler itself.
27
 
28
Both these are portable, though the latter also undergoes bootstrapping.
29
 
30
So, our build system needs to provide for compiling the above with
31
whichever compiler happens to be present on the operating system. For
32
the support programs, this is the most common case, as they are
33
expected to be used separately from TenDRA.
34
 
35
 
36
Bootstrapping
37
-------------
38
 
39
Bootstrapping is the process of producing a "quick and dirty"
40
compilation of the TenDRA compiler, such that it can be then used
41
itself to compile the final version.
42
 
43
This is required for building TenDRA if TenDRA is not present on the
44
system to begin with - the bootstrapping process is to avoid a Catch-22
45
situation of not having the compiler present to compile the compiler.
46
 
47
Bootstrapping is considered good form for a compiler: it is expected
48
that the compiler be used to compile itself, if for no other reason
49
than as a sign of faith. Additionally, rather than working around the
50
idiosyncrancies of each available compiler, we can focus our efforts on
51
supporting only our own implementation.
52
 
53
Also of interest may be the cases where only a partial implementation
54
of a compiler is available: we can possibly use these to compile just
55
enough of our own code in order to completely build our own system.
56
 
57
Other reasons include TenDRA's emphasis on code correctness: we simply
58
trust our output more than we trust other compilers. This is viewed as
59
important for producing the compiler, which is relied upon for
60
producing correct output from a wide variety of inputs.
61
 
62
 
63
Tools and Utilities
64
-------------------
65
 
66
Viewing these programs as entirely separate entities from the TenDRA
67
compiler itself, we see no reason why they should have an affinity to a
68
particular compiler any more than any other program would.
69
 
70
From another perspective, the idea behind bootstrapping is to end with
71
the installed binaries of the TenDRA suite to have been built by TenDRA
72
itself. However, these programs are no longer to be part of the TenDRA
73
suite; they are to become separate entities.
74
 
75
From the point of view of a system administrator installing TenDRA for
76
the first time, it is likely that the other binaries in the operating
77
system would not have been built by TenDRA: these auxiliary tools fall
78
into the same category as the other unrelated programs already present.
79