How to compile SML on the Archimedes under RISC-OS C release 3
==============================================================

Background
----------

The first thing to note is that this is *tedious*, because of weird file
layout conventions forced upon the C compiler by RISC_OS-es short
filenames.  It is however not hard, there is no fundamental change
required for the source - only the scripts for compiling it change.

Ideally, you will need implementations of the UNIX utilities
sed, plus a port of GNU make for the Archimedes.
Sed can be obtained from a variety of public domain libraries,
GNU make (much better than ``amu'') can obtained (indirectly) from myself,
or directly from the porter Paul Moore.

     (pmoore@cix.UUCP) or 
     Archive     (pmoore@cix.UUCP) or 
     Archive BBS (Paul Moore, account #552) or

        10, Mulberry Rise,
        Firdale Park,
        Northwich,
        Cheshire
        CW8 4UQ

The Makefile also expects a C program called ``uecho'' which just
prints its command-line arguments.

If you cannot be bothered to get these don't despair - you can get by
without.  The Makefile can be editted to work with amu and you can
hand-edit files so as to do without sed unecho etc.  The hc directory
contains ready editted files suitable for the version of the abstract
machine interpreter current at the time of writing.  See the lines
marked ARCHY in the Makefile for details of the modifications needed to
use this ``cheating'' route.

You will probably need a 4M byte machine as otherwise you will have to
turn off lots of compiler features to avoid it running out of memory.

How to do it
------------

1.  Obtain the source files from the info-server@uk.ac.ed.lfcs
    The archive you need is edml-fam.src

    If you cannot get access over JANET (or the Internet etc)
    contact

    Laboratory for Foundations of Computer Science,
    James Clerk Maxwell Building,
    Kings Buildings,
    University of Edinburgh,
    EDINBURGH
    Great Britain

2.  Get the tar archive onto your Archy!

3.  Extract the files file fam.src.tar using Frank Lancaster port of
    GNU tar using U and E options to tell to read UNIX format tar files
    and transform .'s to _'s

    Change directory into fam_src

4.  EXEC the file buildfils (in this directory) to build the kind of
    file structure Acorn's C expects.

5.  Replace the original Makefile with the one in this directory.
    supplied.

6.  If you lack sed get it or hack the Makefile as described in
    the Makefile.  Note: Archy sed's and Makefule are not exactly
    ultra-robust.  Don't be surprised if you need to mess around with
    the Makefile a little to get things working.

    If you lack GNU make you will need to edit the Makefile a little
    persuade Acorn's dozy amu to accept it.

7.  make fam to build the abstract machine interpreter fam


Getting SML up and working on Archy
-----------------------------------

Once ``fam'' has been compiled life is pretty easy.
All you need now is to dump a saved state from the distributed
system (the edml-CompilerAndLib archive from info-server@uk.ac.ed.lfcs),
and hack up a few scripts to make sml go.

A workable set-up and instructions are provided in the
README files provided with this archive.



