PREPARING TO BUILD
------------------

1. Unpack the sources.

2. Create a build directory.  This can be anywhere you like, but I
   recommend that you create a build directory in the top directory of
   the source distribution (in the same directory as "src"), hence:

   As delivered:
	Squeak-X.Y/BUILD.UnixSqueak	- this file
	Squeak-X.Y/src/...		- the sources
   		...			- and so on
   
   You then add (using "mkdir"):
	Squeak-X.Y/build/		- your build directory

CONFIGURING
-----------

1. "cd" to your build directory.

2. Run the "configure" script in the "src/unix" directory of the
   distribution.  Assuming you've created your build directory as
   recommended above:

	../src/unix/configure

   You normally won't need to pass any options to the configure
   script, although it accepts lots of them.  Enter

	../src/unix/configure --help

   to see the complete list.  The most interesting ones are:

	--prefix=<prefix>	default="/usr/local"
	    the prefix for the "bin" and "lib" installation
	    directories.

	--bindir=<bindir>	default="${prefix}/bin"
	    this is where the executables will be installed.

	--libdir=<libdir>	default="${prefix}/lib"
	    this is where the plugins and modules will be installed,
	    in a subdirectory called "squeak<maj>.<min>".

   Note: although building directly into the "src" directory is
   supported, I don't recommend it.  Creating your build directory
   underneath the "src" directory is definitely NOT supported.

   Note: the configuration step chooses which plugins should be
   compiled into modules vs. compiled into the static VM based on the
   contents of the file sqNamedPrims.h.  If you want to change the
   balance of "modulised" vs. "intrinsic" plugins then you have to
   regenerate the plugin sources from within the image before
   building.

   Note: if the configuration step fails because "configure" can't
   guess your platform then you can try giving it explicitly:

	../src/unix/configure <cpu>-<vendor>-<os>

   (For example: "pdp11-dec-sysv" is legal when given explicitly, but
   configure is incapable of guessing it without your help.)  If that
   doesn't work then you can either hack config.guess, config.sub and
   ltconfig appropriately (and then send your changes to the
   maintainers of these programs), or just give up entirely.

BUILDING
--------

1. Type "make" in your build directory.  This will build the VM and
   modules.

2. If you want to rebuild after adding or removing files or
   directories from under the "src" directory, or after changing the
   list of plugins that are to be "modularised", then you will need to
   rerun the configure script.  (This is because the configure script
   looks to see which files and directories are present, and which
   plugins should be modularised, and adjusts the Makefile in the
   build directory accordingly.  Running just "config.status" on the
   Makefile will NOT work.)

INSTALLING
----------

1. Type "make install" in your build directory.  This will install
   squeak in ${bindir} and the modules in ${libdir}/squeak<maj>.<min>.

Note that for the above operations you might need root priviliges, or
at least write permission in ${bindir} and ${libdir}.

2. If you ever want to uninstall, enter "make uninstall" in the build
   directory.  (You can do this even if you haven't built anything in
   the build directory.)

3. You can remove the object files in the build directory by entering
   "make clean".  This leaves the configured Makefile and a few other
   files used for building Squeak in place.  If you want to clear the
   directory entirely then enter "make distclean".
