BCPLKIT INSTALL

This is an x86 (IA-32) port of an old BCPL compiler kit (see README)
and should build cleanly on 32-bit FreeBSD and Linux.  (A version of
the compiler for V7/x86, an x86 port of UNIX V7, is available separately.)

Differences between Linux and FreeBSD versions of the compiler are minor
and are restricted to the system interface file "sys.s" of the compiler
runtime, which is provided in "sys_freebsd.s" and "sys_linux.s" variants.

The compiler sources, together with object files needed to bootstrap
the compiler, are in the "src" directory.  The "util" directory contains
some utility programs, and one in particular, "cmpltest.b", will be
found useful should you wish to test the compiler once that has been
built and installed.  The "doc" directory contains the documentation
originally supplied with the compiler kit.

To build and install the compiler in automated fashion (assuming you're
on a supported platform), try

    ./makeall

followed by (as root)

    ./makeall install

Otherwise, change to the "src" directory.  Check that the "sys.s"
symbolic link points to either "sys_linux.s" or "sys_freebsd.s", as
appropriate for your system.  Enter

    make

to build the compiler, and

    make install

to install the components.  By default, these mostly go in
"/usr/local/lib/bcplkit".  You can also change to the "doc" directory and

    make install

to install documentation to "/usr/local/share/doc/bcplkit".

Should you wish to install the compiler somewhere other than
"/usr/local/lib/bcplkit", be sure to change occurrences of this path in
the compiler sources.

Once the compiler is built and installed, it is possible to build and
run the "cmpltest" utility, to verify that all is in order.  The test
should conclude:

    119 TESTS COMPLETED, 0 FAILURE(S)

As an optional extra, the compiler driver is set up to make use of
"copt", a retargetable peephole optimizer by Chris Fraser, when the
"-O" switch is specified.  (A "rules" file is installed with the other
compiler components.)  Simply download and install the additional
software, which is freely available, to make use of this option.
(You may have to edit the copt.c file to ensure that the program
exits with a status of zero on successful completion.)

Robert Nordier
www.nordier.com
