Subversion Repositories tendra.SVN

Rev

Blame | Last modification | View Log | RSS feed

Build System
============

This document is intended to provide an overview of what the build
system intends to achieve, and how it intends to achieve it.


Makefiles
---------

The Makefile dialect of choice is bmake: a portable version of NetBSD's
make(1) program. This is chosen primarily for its expressiveness, and,
therefore, convenience.

bmake provides its own rules and macros - these are not used:
everything required is present in the local ./mk directory.


Portability
-----------

With the proposed restructuring, the source is split into roughly two
portions:

 1. Support tools and utilities (sid, lexi, etc)
 2. The TenDRA compiler itself.

Both these are portable, though the latter also undergoes bootstrapping.

So, our build system needs to provide for compiling the above with
whichever compiler happens to be present on the operating system. For
the support programs, this is the most common case, as they are
expected to be used separately from TenDRA.


Bootstrapping
-------------

Bootstrapping is the process of producing a "quick and dirty"
compilation of the TenDRA compiler, such that it can be then used
itself to compile the final version.

This is required for building TenDRA if TenDRA is not present on the
system to begin with - the bootstrapping process is to avoid a Catch-22
situation of not having the compiler present to compile the compiler.

Bootstrapping is considered good form for a compiler: it is expected
that the compiler be used to compile itself, if for no other reason
than as a sign of faith. Additionally, rather than working around the
idiosyncrancies of each available compiler, we can focus our efforts on
supporting only our own implementation.

Also of interest may be the cases where only a partial implementation
of a compiler is available: we can possibly use these to compile just
enough of our own code in order to completely build our own system.

Other reasons include TenDRA's emphasis on code correctness: we simply
trust our output more than we trust other compilers. This is viewed as
important for producing the compiler, which is relied upon for
producing correct output from a wide variety of inputs.


Tools and Utilities
-------------------

Viewing these programs as entirely separate entities from the TenDRA
compiler itself, we see no reason why they should have an affinity to a
particular compiler any more than any other program would.

From another perspective, the idea behind bootstrapping is to end with
the installed binaries of the TenDRA suite to have been built by TenDRA
itself. However, these programs are no longer to be part of the TenDRA
suite; they are to become separate entities.

From the point of view of a system administrator installing TenDRA for
the first time, it is likely that the other binaries in the operating
system would not have been built by TenDRA: these auxiliary tools fall
into the same category as the other unrelated programs already present.