Installation instructions for MOOF
==================================

The instructions which follow are intended for installation under
Linux. The processes involved should be very similar for other
unix-like systems. The Win32 port, under gcc or egcs, should be
relatively painless as well. For MS-DOS and OS/2, essentially you are
on your own. The instructions below will probably provide some useful
tips, but you will have to adapt the makefile for the moof binary to
support your favourite compiler, and some (minimal) source code
editing will probably be involved, as well. Additional information for
your operating system may be provided in the files README.<osname>

Bug reports/general correspondence: please e-mail to tonyg@kcbbs.gen.nz.
I am currently employed full-time, so this is definitely an
unsupported part-time product, but I'll do my best to fix bugs, and I
may even attempt to add new features once in a while. Essentially,
this is something I did for myself that I hope will be useful to
others.

	Tony Garnock-Jones
	(email address: tonyg@kcbbs.gen.nz)

Quick instructions:
-------------------

	* Unpack the .tar.gz file into /usr/local/src.
	* Change directory to /usr/local/src/moof
	* "make moof" - this builds and installs the binary, and installs
	  the moof library as well.

Full instructions:
------------------

1. Unpack the .tar.gz file into /usr/local/src.

	A directory moof/ will be created. Change to this directory.

	If you don't want to use /usr/local/{src,lib,bin} to put moof
in, edit the PREFIXDIR and/or SRCDIR,LIBDIR,BINDIR variables in the
Makefile.

2. Install the libraries.

	MOOF, as a binary on its own, is very stupid. It contains a
compiler and the associated bytecode interpreter, but no actual
read-eval-print loop. Thus, it needs a boot file, which contains the code
necessary to present a usable environment to the user.

	The code needed to do this is normally placed in
/usr/local/lib/moof/startup.m and indeed, this is what the binary
looks for if you don't tell it otherwise (see the configuration section).

	Create a symbolic link from
		/usr/local/src/moof/lib
	to
		/usr/local/lib/moof
	If you are root, you can do this automatically by typing 'make library'.

3. Configure the binary - /usr/local/src/moof/source/config.h

	This file contains definitions for the locations of the files
needed by the moof runtime. These may be altered if you want a different
file arrangement. Note that the Makefile does most of this - if you are
using the Makefile to build and install the binary, and you have set
PREFIXDIR etc. correctly, then don't bother editing config.h to set the file
paths. The defaults are:

	MOOF_LIBDIR	/usr/local/lib/moof	(no trailing /)
	MOOF_BOOTFILE	/usr/local/lib/moof/startup.m

	You can override these settings at *runtime* using the environment
variables of the same names.

	The file also contains a number of #defines which are used to
control which non-essential features are compiled into the
language. Adjust these according to taste. Note that not all features
are available on all platforms - unix-like systems should support most
of them, though.

4. Build MOOF itself.

	Type 'make binary' to build the binary.
	To install the binary in /usr/local/bin, create a symbolic link from
		/usr/local/src/moof/source/moof
	to
		/usr/local/bin/moof
	If you are logged in as root at the time, typing 'make install'
	will both build the binary and install the symlink.

That's all there is to it. Sample moof code is in /usr/local/lib/moof.

=========================================================================
Tony Garnock-Jones B.Sc (Comp.Sci./Biology)	tonyg@kcbbs.gen.nz
12A Dianthus Place				Phone/Fax: +64-9-479-6418
Browns Bay, Auckland
New Zealand
