What is available
=================

SRC Modula-3 is distributed via anonymous ftp from gatekeeper.dec.com.
The distribution is in a set of compressed tar files in the directory
named pub/DEC/Modula-3/release.  The files are of the form
<archive>-2.11.tar.Z.

The archives boot.<architecture> are used to build and install m3make,
a driver and a compiler.  These programs are built from intermediate C
files that are architecture specific; you need to get the archive(s)
corresponding to the architecture(s) on which you want to install SRC
Modula-3.  The supported <architecture>s are:

Arch.   Hardware              OS                    Build       Install
                                                  disk  cpu      disk

AIX386                        AIX/PS2
AP3000  Apollo DN4500         Domain/OS 10.2
ARM     Acorn R260            RISC iX 1.21
DS3100  DECstation 5000/200   Ultrix 4.2         51569   23      7917
HP300   HP 9000/300           HP-UX 7.0
HPPA    HP 700/800            HP-UX 8.0
IBMR2   IBM RISC System/6000  AIX 3.1
IBMRT   IBM RT                IBM/4.3 (AOS 4.3)
NEXT    NeXT
OKI     Okidata 7300 (i860)   AT\&T SVR4.0
SPARC   Sparcstation-1        SunOS 4.1.x
SUN3    Sun 3/?               SunOS ?
SUN386  Sun 386i              SunOS 4.0.1
UMAX    Encore Multimax       UMAX 4.3 (R4.1.1)
VAX     VAX 8800              Ultrix 4.2


Each of these archives is about 8000 kilobytes.  The column ``Build'' indicates
the resources you need to build and install the programs: ``disk'' is the
amount of disk space (in kilobytes), ``cpu'' is the amount of user and system
cpu time (in minutes).  The column ``Install'' indicates the amount of disk
space that will be permanently used after the installation is done.

The other archives contain Modula-3 source files for various libraries
and programs.

    File           Build  Inst.  Src.  Desc
name     size    disk cpu

doc       464                          the documentation for SRC Modula-3
m3make     79                          make for Modula-3

libm3    1448   24751  19  7088   4870 base library

compiler  416   10102  20  -1088  1461 compiler sources
driver     82    1849   3  -905    239 driver sources

X11R4     128    2542   3  977     434 binding interfaces for X11R4
trestle   472   16517  21  5168   1332 Trestle window system

data       29    2604   4  857     159 some generic container types
tools     432    7893   3  3216   1121 development tools
gtools   2320    5400   1  0      5400 graphic development tools
tcl       696    1540   1  58     1399 binding interface to Tcl

vbtkit    656   17969  21  5448   1992 More VBTs
formsvbt  112    8960   6  1496   4802 FormsVBT
vbtapps   344   23193   4  10751  1110 FormsVBT applications

codeview   23    1065   2  367      78 source code displays for zeus
mg         85    3578   5  1166    257 low-level animation tools
mgkit      84    4100   6  1326    287  higher-level animation tools
zeus       88    3123   6  987     251 algoirthm animation core
zeustools  31     192   2  52      112 preprocessing tools for animations
mentor    328    9762  42  4      1017 algorithm animation demos

bicycle    46    1214   2  383     117 bitmaps of cards for games
games      86   33380   4  16133   295 a few demo program

dpskit    112       1   1  0    -32643 binding interfaces to Display PostScript
dpsapps    12    4495   1  2209     41 applications using Display PostScript

m3tk     1000   38400  69  16     3770 Modula-3 AST tool kit

tests     424                          validation tests

The column ``File Size'' is the size (in kilobytes) of the compressed
tar file.  The column ``Build'' indicates the resources you need to
build and install these pieces of sources: ``disk'' is the amount of
disk space (in kilobytes), ``cpu'' is the amount of user and system
cpu time (in minutes).  The column ``Install'' indicates the amount of
disk space that will be permanently used after the installation is
done and the sources are deleted.  If you want to keep the sources
around, you will need the additional space indicated in the
``Sources'' column.  These time and sizes were measured on a
DECstation 5000/240 running Ultrix 4.2; other architectures may have
different requirements.

You need to build and install libm3 to have a useful system, but
all the other pieces are optional.  Here is the dependency graph for
the archives:

        m3make -> libm3 -----> compiler
                          |--> driver
                          |--> tcl
                          |--> m3tk
                          |--> dpskit --> dpsapps
                          |--> data --------------------------------
                          |                                        v
                          |--> X11R4 --> trestle ----> bicyle --> games
       	       	       	  |                       |
                          |                       |--> gtools
       	       	       	  |                       |
                          |--> tools -------------+--> vbtkit
		                      |                	 |
                                      |                  |
                                      |                  v
                                      |               formsvbt
                                      |                  |
                                      |      ---------------------------
                                      |      v           v             v
                                      |-> vbtapps     codeview     zeustools
                                      |                  |	       |
                                      |                  v	       |
                                      |                 mg	       |
                                      |                  |	       |
                                      |	                 v	       |
                                      |                mgkit	       |
                                      |                  |	       |
                                      |                  v	       |
                                      |--------------> zeus	       |
                                      |                  |	       |
                                      |                  v	       |
                                      |                mentor <---------
				      |
                                      |-> tools2


The m3make and doc archives are included in the boot
archives so you don't need to install them explicitly.

The compiler and driver archives contain the Modula-3 sources while
the boot archives contain the intermediate C code for those programs.
Unless you want to look at the sources of these programs, you don't
need to install the compiler and driver archives.


Getting SRC Modula-3
====================

In the following, '$' is the shell prompt and 'ftp>' is the ftp
prompt. To get SRC Modula-3:

1. Make sure that you have enough disk space using the tables above.

2. Create a fresh directory for the software and go there. Path
  names below are relative to that directory, and it will be called the
  top-level directory:

    $ mkdir  top-level
    $ cd top-level

3. Open an ftp connection with gatekeeper.dec.com [16.1.0.2];
   give anonymous for the name and your login id for the password:

    $ ftp gatekeeper.dec.com
    Connected to gatekeeper.dec.com.
    ...
    Name (gatekeeper.dec.com): anonymous
    Password (gatekeeper.dec.com:anonymous): your name@your machine
    ...

4. Change to the proper directory:

    ftp> cd pub/DEC/Modula-3/release

5. Set the transmission type to binary:

    ftp> type binary

6. Get the distribution bootstrap:

    ftp> get boot.<architecture>-2.11.tar.Z

7. Get libm3 along with any other \modula sources that you want:

    ftp> get libm3-2.11.tar.Z
    ftp> get ...

8. Close the connection:

    ftp> quit


Installation procedure
======================

Once you have ftp'ed the archives, you need to do the following
from the top-level directory to build and install the system:

1. Unpack the boot.<architecture> archive:

    $ zcat boot.<architecture>-2.11.tar.Z | tar xpof -
    $ rm  boot.<architecture>-2.11.tar.Z

2. Using m3make/model-configs/<architecture> as a model, create a
   configuration file for your installation of SRC Modula-3 in
   m3make/<architecture>/config.

3. Make sure that the directory named on the `BIN_USE = ' line
   in your config is on your search path.

4. Build and install the m3make system:

    $ (cd m3make/<architecture>; make -f ../src/Makefile all install)

   You may need to tell your shell that new executables (m3make)
   are present after the install step, using rehash, for example.

5. You may want to change Chapter 7 of this document to
   describe your installation (see that chapter to know how to proceed).

6. Build and install the SRC Modula-3 driver and compiler:

    $ m3make -f m3makefile.boot all install

   This moves the driver, the compiler and some other files to the
   directories specified in your config file.
   Again, you may need to tell your shell that new executables (m3)
   are present, using rehash, for example.

7. At this point, you should have successfully installed the Modula-3
   compiler and driver.  To check, type

    $ m3 -\?

   The driver should list its configuration options.

8. You can now delete the bootstrap directories to conserve space:

    $ rm -f m3make driver compiler

   (Note: if you are doing a port, don't do that!)

9. Build and install the other libraries and tools.
   Now, you have a choice.  You can install all of them at once (a)
   or install them one at a time by hand (b).  Installing them all
   at once is easiest, but requires more disk space at its worst moment.

   (a) To install all of them at once, starting from the compressed tar files:

	    $ m3make build_install.all

       After this is done, you can:

	    $ m3make clean.all

       to remove all the derived files and keep only the sources, or you can:

	    $ m3make delete.all

       to delete all the non-installed files.

   (b) To build and install the archive <archive>:

         $ m3make build_install.<archive>

       After this is done, you can:

         $ m3make clean.<archive>

       to remove all the derived files and keep only the sources, or you can:

         $ m3make delete.<archive>

       to delete all the files.


   If you select (b), you need to start with libm3 and make sure that you
   build according to the dependency graph shown above.
   There is no need to rebuild and reinstall the m3make, doc,
   driver or compiler source archives (but you can do so if you
   want).

   Whether you choose option (a) or option (b), the libraries and tools
   will be built using the system installed in the previous step and
   should help detecting problems in the installation.

10. If you want to build the gnuemacs tags file for the public interfaces:

    $ m3make FTAGS


Later, you can upgrade any of the source components, including m3make,
doc, the driver or the compiler, by building and installing the
corresponding source archive; you should not need to remove the
existing files then.



Running the tests
=================

SRC Modula-3 includes a collection of test programs.  While these
programs are primarily intended to help the developers of SRC
Modula-3, you may want to look at them or run them.  The tests are
available in the archive tests. If you're interested, see the README
file at the top-level of that archive.

