diff --git a/tools/README b/tools/README
new file mode 100644
index 0000000000000000000000000000000000000000..e3e31f3ece771102c2c797d267405b62c709a8bd
--- /dev/null
+++ b/tools/README
@@ -0,0 +1,409 @@
+Building CMU CL (Version 2.4)
+=============================
+
+So now you've downloaded the set of scripts that I use to compile and
+maintain CMU CL, this README is intended to give you a general
+overview of the build process (i.e. what needs to be done, in what
+order, and what is it generally called).  It will also tell you how to
+set up a suitable build environment, how the individual scripts fit
+into the general scheme of things, and give you a couple of examples.
+
+General Requirements
+--------------------
+
+In order to build CMU CL, you will need:
+
+a) A working CMU CL binary.  There is no way around this requirement!
+
+   This binary can either be for the platform you want to target, in
+   that case you can either recompile or cross-compile, or for another
+   supported platform, in that case you must cross-compile, obviously.
+
+b) A supported C compiler for the C runtime code.
+
+   Most of the time, this means GNU gcc, though for some ports it
+   means the vendor-supplied C compiler.  The compiler must be
+   available under the name specified by your ports Config file.
+
+c) GNU make
+
+   This has to be available either as gmake or make in your PATH, or
+   the MAKE environment variable has to be set to point to the correct
+   binary.
+
+d) The CMU CL source code
+
+   Here you can either use one of the release source tarballs, or
+   check out the source code directly from the public CMUCL CVS
+   repository.
+
+If you want to build CMU CL's Motif interface/toolkit, you'll need a
+working version of the Motif libraries, either true-blue OSF/Motif, or
+OpenMotif, or Lesstif.  The code was developed against 1.2 Motif,
+though recompilation against 2.x Motif probably works as well.
+
+Setting up a build environment
+------------------------------
+
+1.) Create a base directory and change to it
+
+    mkdir cmucl ; cd cmucl
+
+2.) Extract/move the build tools into that directory
+
+    tar xzf /tmp/build-tools.tgz
+
+3.) Fetch the sources and put them into the base directory
+
+    tar xzf /tmp/cmucl-18d.source.tar.gz
+
+    or, if you want to use the CVS sources directly:
+
+    export CVSROOT=:pserver:anonymous@cvs2.cons.org:/home/anoncvs/CVS-cmucl
+    cvs login  (password is `anonymous')
+    cvs co src
+
+    Whatever you do, the sources must be in a directory named src
+    inside the base directory.  Since the build tools keep all
+    generated files in separate target directories, the src directory
+    can be read-only (e.g. mounted read-only via NFS, etc.)
+
+That's it, you are now ready to build CMU CL.
+
+
+A general outline of the build process
+--------------------------------------
+
+Building CMU CL can happen in one of two ways:  Normal recompilation,
+and cross-compilation.  We'll first look at normal recompilation:
+
+The recompilation process basically consists of 4 phases/parts:
+
+a) Compiling the lisp files that make up the standard kernel.
+
+   This happens in your current CMU CL process, using your current
+   CMU CL's normal file compiler.  This phase currently consists of 3
+   sub-phases, namely those controlled by src/tools/worldcom.lisp,
+   which compiles all the runtime files, src/tools/comcom.lisp, which
+   compiles the compiler (including your chosen backend), and finally
+   src/tools/pclcom.lisp, which compiles PCL, CMU CL's CLOS
+   implementation.  The whole phase is often called "world-compile",
+   or "compiling up a world", based on the name of the first
+   sub-phase.
+
+b) Building a new kernel.core file out of the so created files
+
+   This process, which is generally called genesis, and which is
+   controlled by src/tools/worldbuild.lisp, uses the newly compiled
+   files in order to build a new, basic core file, which is then used
+   by the last phase to create a fully functional normal core file.
+   It does this by "loading" the compiled files into an in-core
+   representation of a new core file, which is then dumped out to
+   disk, together with lots of fixups that need to happen once the new
+   core is started.
+
+   As part of this process, it also creates the file internals.h,
+   which contains information about the general memory layout of the
+   new core and its basic types, their type tags, and the location of
+   several important constants and other variables, that are needed by
+   the C runtime code to work with the given core.
+
+   So going through genesis is needed to create internals.h, which is
+   needed to compile the C runtime code (i.e. the "lisp" binary).
+   However there is a slight circularity here, since genesis needs as
+   one of its inputs the file target:lisp/lisp.nm, which contains the
+   (slightly pre-treated) output of running nm on the new lisp
+   binary.  Genesis uses this information to fixup the addresses of C
+   runtime support functions for calls from Lisp code.
+
+   However the circularity isn't complete, since genesis can work with
+   an empty/bogus lisp.nm file.  While the kernel.core it then
+   produces is unusable, it will create a usable internals.h file,
+   which can be used to recompile the C runtime code, producing a
+   usable lisp.nm file, which in turn can be used to restart genesis,
+   producing a working kernel.core file.
+
+   Genesis also checks whether the newly produced internals.h file
+   differs from a pre-existing internals.h file (this might be caused
+   by an empty internals.h file if you are rebuilding for the first
+   time, or by changes in the lisp sources that cause differences in
+   the memory layout of the kernel.core), and informs you of this, so
+   that you can recompile the C runtime code, and restart genesis.
+
+   If it doesn't inform you of this, you can skip directly to the last
+   phase d).
+
+c) Recompiling the C runtime code, producing the "lisp" binary file
+
+   This step is only needed if you haven't yet got a suitable lisp
+   binary, or if the internals.h file has changed during genesis (of
+   which genesis informs you), or when you made changes to the C
+   sources that you want to take effect.
+
+   Recompiling the C runtime code is controlled by a GNU Makefile, and
+   your target's Config file.  It depends on a correct internals.h
+   file as produced by genesis.
+
+   Note that whenever you recompile the runtime code, for whatever
+   reason, you must redo phase b).  Note that if you make changes to
+   the C sources and recompile because of this, you can do that before
+   Phase b), so that you don't have to perform that phase twice.
+
+d) Populating the kernel.core, and dumping a new lisp.core file.
+
+   In this phase, which is controlled by src/tools/worldload.lisp, and
+   hence often called world-load, the kernel.core file is started up
+   using the (possibly new) lisp binary, the remaining files which
+   were compiled in phase a) are loaded into it, and a new lisp.core
+   file is dumped out.
+
+When cross-compiling, there is additional phase at the beginning, and
+some of the phases happen with different hosts/platforms.  The initial
+phase is setting up and compiling the cross-compilation backend, using
+your current compiler.  The new backend is then loaded, and all
+compilation in phase a) happens using this compiler backend.  The
+creation of the kernel.core file in phase b) happens as usual, while
+phase c) of course happens on the target platform (if that differs
+from the host platform), as does the final phase d).  Another major
+difference is that you can't compile PCL using the cross-compiler, so
+one usually does a normal rebuild using the cross-compiled core on the
+target platform to get a full CMU CL core.
+
+So, now you know all about CMU CL compilation, how does that map onto
+the scripts included with this little text?
+
+Overview of the included build scripts
+--------------------------------------
+
+* create-target.sh target-directory lisp-variant [motif-variant]
+
+This script creates a new target directory, which is a shadow of the
+source directory, that will contain all the files that are created by
+the build process.  Thus each target's files are completely separate
+from the src directory, which could, in fact, be read-only.  Hence you
+can simultaneously build CMUCL for different targets from the same
+source directory.
+
+The arguments are the name of the target directory to create, the
+lisp-variant (i.e. the suffix of the src/lisp/Config.* to use as the
+target's Config file), and optionally the motif-variant (again the
+suffix of the src/motif/server/Config.* file to use as the Config file
+for the target's CMUCL/Motif server code).
+
+The script will generate the target directory tree, link the relevant
+Config files, and generate place-holder files for various files, in
+order to ensure proper operation of the other build-scripts.  It also
+creates a sample setenv.lisp file in the target directory, which is
+used by the build and load processes to set up the correct list of
+*features* for your target lisp core.
+
+IMPORTANT:  You will normally have to modify the sample setenv.lisp
+file, to include code that puts at least a minimal set of features
+onto the list (use PUSHNEW and/or REMOVE).  You can use the current
+set of *features* of your lisp as a first guide.  The sample
+setenv.lisp includes a set of features that should work for
+Linux/x86.
+
+* clean-target.sh target-directory
+
+Cleans the given target directory, so that all created files will be
+removed.  This is useful to force recompilation.
+
+* build-world.sh target-directory [build-binary] [build-flags...]
+
+Starts a complete world build for the given target, using the lisp
+binary/core specified as a build host.  The recompilation step will
+only recompile changed files, or files for which the fasl files are
+missing.  It will also not recompile the C runtime code (the lisp
+binary).  If a (re)compilation of that code is needed, the genesis
+step of the world build will inform you of that fact.  In that case,
+you'll have to use the rebuild-lisp.sh script, and then restart the
+world build process with build-world.sh
+
+* rebuild-lisp.sh target-directory
+
+This script will force a complete recompilation of the C runtime code
+of CMU CL (aka the lisp executable).  Doing this will necessitate
+building a new kernel.core file, using build-world.sh.
+
+* load-world.sh target-directory version
+
+This will finish the CMU CL rebuilding process, by loading the
+remaining compiled files generated in the world build process into the
+kernel.core file, that also resulted from that process, creating the
+final lisp.core file.
+
+You have to pass the version string as a second argument.  The dumped
+core will anounce itself using that string.  Please don't use a string
+consisting of an official release name only, (e.g. "18d"), since those
+are reserved for official release builds.  Including the build-date in
+ISO8601 format is often a good idea, e.g. "18d+ 2002-05-06" for a
+binary that is based on sources current on the 6th May, 2002, which is
+post the 18d release.
+
+* build-utils.sh target-directory
+
+This script will build auxiliary libraries packaged with CMU CL,
+including CLX, CMUCL/Motif, the Motif debugger, inspector, and control
+panel, and the Hemlock editor.  It will use the lisp executable and
+core of the given target.
+
+* make-dist.sh target-directory version arch os
+
+This script creates both main and extra distribution tarballs from the
+given target directory, using the make-main-dist.sh and
+make-extra-dist.sh scripts.
+
+* make-main-dist.sh target-directory version arch os
+
+This script creates a main distribution tarball (both in gzipped and
+bzipped variants) from the given target directory.  This will include
+all the stuff that is normally included in official release tarballs.
+
+* make-extra-dist.sh target-directory version arch os
+
+This script creates an extra distribution tarball (both in gzipped and
+bzipped variants) from the given target directory.  This will include
+all the stuff that is normally included in official extra release
+tarballs, i.e. the auxiliary libraries.
+
+* cross-build-world.sh target-directory cross-directory cross-script 
+                       [build-binary] [build-flags...]
+
+This is a script that can be used instead of build-world.sh for
+cross-compiling CMUCL.  In addition to the arguments of build-world.sh
+it takes two further required arguments:  The name of a directory that
+will contain the cross-compiler backend (the directory is created if
+it doesn't exist, and must not be the same as the target-directory),
+and the name of a Lisp cross-compilation script, which is responsible
+for setting up, compiling, and loading the cross-compiler backend.
+The latter argument is needed because each host/target combination of
+platform's needs slightly different code to produce a working
+cross-compiler.
+
+We include a number of working examples of cross-compiler scripts in
+the cross-scripts directory.  You'll have to edit the features section
+of the given scripts, to specify the features that should be removed
+from the current set of features in the host lisp, and those that
+should be added, so that the backend features are correct for the
+intended target.
+
+You can look at Eric Marsden's collection of build scripts for the
+basis of more cross-compiler scripts.
+
+Step-by-Step Example of recompiling CMUCL for OpenBSD
+-----------------------------------------------------
+
+Set up everything as described in the setup section above. Then
+execute:
+
+# Create a new target directory structure/config for OpenBSD:
+./create-target.sh openbsd OpenBSD_gencgc OpenBSD
+
+# edit openbsd/setenv.lisp to contain what we want:
+cat <<EOF > openbsd/setenv.lisp
+;;; Put code to massage *features* list here...
+
+(in-package :user)
+
+(pushnew :openbsd *features*)
+(pushnew :bsd *features*)
+(pushnew :i486 *features*)
+(pushnew :mp *features*)
+(pushnew :hash-new *features*)
+(pushnew :random-mt19937 *features*)
+(pushnew :conservative-float-type *features*)
+(pushnew :gencgc *features*)
+
+;;; Version tags
+
+(pushnew :cmu18d *features*)
+(pushnew :cmu18 *features*)
+(setf *features* (remove :cmu17 *features*))
+(setf *features* (remove :cmu18c *features*))
+EOF
+
+# Recompile the lisp world, and dump a new kernel.core:
+./build-world.sh openbsd lisp # Or whatever you need to invoke your 
+                              # current lisp binary+core
+
+# If build-world tells you (as it will the first time) that:
+# "The C header file has changed. Be sure to re-compile the startup
+# code."
+# You 'll need to start rebuild-lisp.sh to do that, and then reinvoke
+# build-world.sh:
+
+# Recompile lisp binary itself:
+./rebuild-lisp.sh openbsd
+
+# Restart build-world.sh now:
+./build-world.sh openbsd lisp
+
+# Now we populate the kernel.core with further compiled files,
+# and dump the final lisp.core file:
+
+./load-world.sh openbsd "18d+ 2002-05-06"
+
+# The second argument above is the version number that the built
+# core will announce.  Please always put the build-date and some
+# other information in there, to make it possible to differentiate
+# those builds from official builds, which only contain the release.
+
+Now you should have a new lisp.core, which you can start with
+
+./openbsd/lisp/lisp -core ./openbsd/lisp/lisp.core -noinit -nositeinit
+
+Compiling sources that contain disruptive changes
+-------------------------------------------------
+
+The above instructions should always work as-is for recompiling CMU CL
+using matching binaries and source files.  They also work quite often
+when recompiling newer sources.  However, every so often, some change
+to the CMU CL sources necessitates some form of bootstrapping, so that
+binaries built from earlier sources can compile the sources containing
+that change.  There are two forms of boostrapping that can be
+required:
+
+a) Bootfiles
+
+   The maintainers try to make bootfiles available, that allow going
+   from an old release to the next release.  These are located in the
+   src/bootfiles/<old-release>/ directory of the CMU CL sources.
+
+   I.e. if you have binaries that match release 18d, then you'll need
+   to use all the bootfiles in src/bootfiles/18d/ in order to go to
+   the next release (or current sources, if no release has been made
+   yet).  If you already used some of the bootstrap files to compile
+   your current lisp, you obviously don't need to use those to get to
+   later versions.
+
+   You can use the bootfiles by concatenating them into a file called
+   bootstrap.lisp in the target directory (i.e. target:bootstrap.lisp)
+   in the order they are numbered.  Be sure to remove the bootstrap
+   file once it is no longer needed.
+
+
+b) Cross-compiling
+
+   Under certain rare circumstances (i.e. hasn't happened since before
+   18c), bootstrap code will not be sufficient, and a cross-compilation
+   is needed.  In that case you will have to use cross-build-world.sh,
+   instead of build-world.sh.  Please read the instructions of that
+   script for details of the more complex procedure.
+
+   << This isn't really true anymore, and we should place a more
+      elaborate description of the cross-compiling process here >>
+
+   When cross-compiling, there are two sorts of bootscripts that can be
+   used:  Those that want to be executed prior to compiling and loading
+   the cross-compiler, which should be placed in the file called
+   target:cross-bootstrap.lisp, and those that should happen after the
+   cross-compiler has been compiled and loaded, just prior to compiling
+   the target, which should be placed in target:bootstrap.lisp, just
+   like when doing a normal recompile.
+
+   Additionally, sometimes customized cross-compiler setup scripts
+   (to be used in place of e.g. cross-x86-x86.lisp) are required,
+   which are also placed in one of the bootfiles/*/* files.  In those
+   cases follow the instructions provided in that file, possibly merging
+   the changed contents thereof with your normal cross-script.
diff --git a/tools/build-utils.sh b/tools/build-utils.sh
new file mode 100755
index 0000000000000000000000000000000000000000..f82c37d3ec761ae89330e613b5ee6dabe761cdf8
--- /dev/null
+++ b/tools/build-utils.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+if [ "$1" = "" ]
+then
+	echo "Usage: $0 target-directory"
+	exit 1
+fi
+
+if [ ! -d "$1" ]
+then
+	echo "$1 isn't a directory"
+	exit 2
+fi
+
+TARGET="`echo $1 | sed 's:/*$::'`"
+
+$TARGET/lisp/lisp -core $TARGET/lisp/lisp.core \
+	-noinit -nositeinit -batch <<EOF || exit 3
+(in-package :cl-user)
+
+(setf lisp::*enable-package-locked-errors* nil)
+(setf (ext:search-list "target:")
+      '("$TARGET/" "src/"))
+
+(load "target:setenv")
+
+(pushnew :no-clx *features*)
+(pushnew :no-clm *features*)
+(pushnew :no-hemlock *features*)
+
+(compile-file "target:tools/setup" :load t)
+(setq *gc-verbose* nil *interactive* nil)
+(load "target:tools/clxcom")
+(load "target:clx/clx-library")
+(load "target:tools/clmcom")
+(load "target:tools/hemcom")
+
+EOF
+
+# Find GNU make:
+
+if [ "$MAKE" = "" ]
+then    
+        MAKE="`which gmake`" || MAKE="`which make`"
+fi
+
+export MAKE
+
+${MAKE} -C $TARGET/motif/server clean && ${MAKE} -C $TARGET/motif/server
diff --git a/tools/build-world.sh b/tools/build-world.sh
new file mode 100755
index 0000000000000000000000000000000000000000..19f01c7dfb59fa3514d5a6a6ab5f2db56a23ad8c
--- /dev/null
+++ b/tools/build-world.sh
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+if [ "$1" = "" ]
+then
+	echo "Usage: $0 target-directory [build-binary] [build-flags...]"
+	exit 1
+fi
+
+if [ ! -d "$1" ]
+then
+	echo "$1 isn't a directory"
+	exit 2
+fi
+
+TARGET="`echo $1 | sed 's:/*$::'`"
+LISP="${2:-lisp}"
+if [ $# -ge 2 ]
+then
+	shift 2
+else
+	shift
+fi
+
+$LISP "$@" -noinit -nositeinit <<EOF
+(in-package :cl-user)
+
+;;(setf lisp::*enable-package-locked-errors* nil)
+
+(setf (ext:search-list "target:")
+      '("$TARGET/" "src/"))
+
+(when (probe-file "target:bootstrap.lisp")
+  (load "target:bootstrap.lisp"))
+
+(load "target:setenv")
+
+(pushnew :no-clx *features*)
+(pushnew :no-clm *features*)
+(pushnew :no-hemlock *features*)
+
+(load "target:code/exports")
+(load "target:tools/setup" :if-source-newer :load-source)
+(comf "target:tools/setup" :load t)
+
+(when (probe-file "home:.cmucl-fcn.lisp")
+  (compile-file "home:.cmucl-fcn" :output-file "/tmp/cmucl-fcn.fasl" :load t)
+  (pushnew #'rlt-before-gc-hook ext:*before-gc-hooks*)
+  (setf ext:*after-gc-hooks*
+	      (append ext:*after-gc-hooks* (list #'rlt-after-gc-hook))))
+
+(setq *gc-verbose* nil)
+(setq *interactive* nil)
+(setq debug:*debug-print-level* nil)
+(setq debug:*debug-print-length* nil)
+
+#+nil
+(when (probe-file "verify-hash.lisp")
+  (compile-file "verify-hash" :output-file "/tmp/verify-hash.fasl" :load t)
+  (setf ext:*after-gc-hooks*
+        (append ext:*after-gc-hooks* (list #'check-all-hashes))))
+
+(load "target:tools/worldcom")
+#-(or no-compiler runtime) (load "target:tools/comcom")
+;; Compile at least new-genesis, so that genesis doesn't take ages
+#+(or no-compiler runtime) (comf "target:compiler/generic/new-genesis")
+#-(or no-pcl runtime) (load "target:tools/pclcom")
+
+(setq *gc-verbose* t *interactive* t)
+
+(load "target:tools/worldbuild")
+(ext:quit)
+EOF
diff --git a/tools/clean-target.sh b/tools/clean-target.sh
new file mode 100755
index 0000000000000000000000000000000000000000..22d7c1b0ea9fdf9bd03a9476e88ef003c773010c
--- /dev/null
+++ b/tools/clean-target.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+if [ "$1" = "" ]
+then
+	echo "Usage: $0 target-directory"
+	exit 1
+fi
+
+if [ ! -d "$1" ]
+then
+	echo "$1 isn't a directory"
+	exit 2
+fi
+
+TARGET="`echo $1 | sed 's:/*$::'`"
+
+find $TARGET -name "*.bytef" -o -name "*.lbytef" -o -name "*.assem" -o \
+	-name "*.axpf" -o \
+	-name "*.hpf" -o \
+	-name "*.pmaxf" -o \
+	-name "*.sgif" -o \
+	-name "*.ppcf" -o \
+	-name "*.sparcf" -o \
+	-name "*.x86f" -o \
+	-name "*.core" | xargs rm 2> /dev/null
+rm -f $TARGET/compile-*.log $TARGET/hemlock/spell-dictionary.bin 2> /dev/null
+
+true
diff --git a/tools/create-target.sh b/tools/create-target.sh
new file mode 100755
index 0000000000000000000000000000000000000000..310e297f8e0859dcfa7237a7dc92183ba7f47dac
--- /dev/null
+++ b/tools/create-target.sh
@@ -0,0 +1,183 @@
+#!/bin/sh
+
+if [ "$1" = "" -o "$2" = "" ]
+then
+	echo "Usage: $0 target-directory lisp-variant [motif-variant]"
+	# List the available lisp-variants
+	echo Possible lisp-variants:
+	( cd src/lisp/ ; ls -1 Config.* ) | sed 's;^Config[.];;g' | \
+		pr -3at -o 8
+	echo Possible Motif-variants:
+	( cd src/motif/server/ ; ls -1 Config.* ) | sed 's;^Config[.];;g' | \
+		pr -3at -o 8
+	exit 1
+fi
+
+[ -d $1 ] && echo "Error: $1 exists already!" && exit 2
+
+TARGET="`echo $1 | sed 's:/*$::'`"
+
+# Make sure the given variants exist
+if [ ! -f src/lisp/Config.$2 ]; then
+	echo "No such lisp-variant could be found: Config.$2"
+	exit 1
+fi
+
+# From the given variant, try to derive a motif variant
+if [ "$3" = "" ]; then
+    case $2 in
+      alpha_linux) motif=alpha_linux ;;
+      alpha_osf1) motif=alpha_osf1 ;;
+      FreeBSD*) motif=FreeBSD ;;
+      NetBSD*) motif=NetBSD ;;
+      OpenBSD*) motif=OpenBSD ;;
+      sun4_solaris*) motif=solaris ;;
+      sun4c*) motif=sun4c_411 ;;
+      hp700*) motif=hpux_cc ;;
+      pmax_mach) motif=pmax_mach ;;
+      sgi*) motif=irix ;;
+      linux*) motif=x86 ;;
+    esac
+elif [ ! -f src/motif/server/Config.$3 ]; then
+	echo "No such motif-variant could be found: Config.$3"
+	exit 1
+fi
+
+# Create a directory tree that mirrors the source directory tree
+find src -name 'CVS' -prune -o -type d -print \
+	| sed "s:^src:$TARGET:g" | xargs mkdir
+
+# Link Makefile and Config files
+( cd $TARGET/lisp ; ln -s ../../src/lisp/GNUmakefile ./Makefile )
+( cd $TARGET/lisp ; ln -s ../../src/lisp/Config.$2 ./Config )
+
+# Create empty initial map file
+echo 'Map file for lisp version 0' > $TARGET/lisp/lisp.nm
+
+# Create dummy internals.h so we get warned to recompile
+echo '#error You need to run genesis (via build-world.sh) before compiling the startup code!' > $TARGET/lisp/internals.h
+
+# Create sample setenv.lisp file
+cat <<EOF > $TARGET/setenv.lisp
+;;; Put code to massage *features* list here...
+;;; This is read early in the build process so don't include complicated
+;;; things there.  pushnew, setf, remove, are ok.  In particular, reader
+;;; conditionals aren't supported.
+;;;
+;;; Most of these don't need to be set explicitly anymore unless you're 
+;;; changing the features.
+(in-package :cl-user)
+
+;; Specific features that most people want:
+
+;;(pushnew :hash-new *features*)
+;;(pushnew :random-mt19937 *features*)
+;;(pushnew :conservative-float-type *features*)
+;;(pushnew :relative-package-names *features*)
+
+;; Version tags
+
+;;(pushnew :cmu18e *features*)
+;;(pushnew :cmu18 *features*)
+;;(setf *features* (remove :cmu17 *features*))
+;;(setf *features* (remove :cmu18c *features*))
+;;(setf *features* (remove :cmu18d *features*))
+
+;; Select the target platform and OS here
+
+EOF
+
+# Put in some platform specific items
+case $2 in
+  *linux*)
+      case $2 in
+        *_gencgc*) gcname=":gencgc" ;;
+	*) gcname=":cgc" ;;
+      esac
+      cat <<EOF >> $TARGET/setenv.lisp
+;; e.g. for Linux on x86 you probably want:
+;;(pushnew :x86 *features*)
+;;(pushnew :linux *features*)
+;; Note! If you are still running glibc 2.1, you need the following:
+;; (pushnew :glibc2.1 *features*)
+;; Otherwise, i.e. for glibc 2.2 and later you want:
+(setf *features* (remove :glibc2.1 *features*))
+
+;; Select conservative GC:
+;;(pushnew $gcname *features*)
+;; This X86 port supports multiprocessing and linkage-table
+;;(pushnew :mp *features*)
+;;(pushnew :linkage-table *features*)
+
+;; CPU selection:
+;; i486 gives you faster locking
+;;(pushnew :i486 *features*)
+;; Pentium gives you CPU cyclecounts in time
+;;(pushnew :pentium *features*)
+EOF
+      ;;
+  *OpenBSD*)
+      case $2 in
+        *_gencgc*) gcname=":gencgc" ;;
+	*) gcname=":cgc" ;;
+      esac
+      cat <<EOF >> $TARGET/setenv.lisp
+;; e.g. for OpenBSD on x86 you probably want:
+;;(pushnew :x86 *features*)
+;;(pushnew :openbsd *features*)
+;;(pushnew :bsd *features*)
+
+;; Select conservative GC:
+;;(pushnew $gcname *features*)
+;; This X86 port supports multiprocessing
+;;(pushnew :mp *features*)
+
+;; CPU selection:
+;; i486 gives you faster locking
+;;(pushnew :i486 *features*)
+;; Pentium gives you CPU cyclecounts in time
+;;(pushnew :pentium *features*)
+EOF
+      ;;
+  *solaris*)
+      cat <<EOF >> $TARGET/setenv.lisp
+;; e.g. for Solaris on sparc you probably want some of these:
+;;(pushnew :sparc *features*)
+;;(pushnew :svr4 *features*)
+
+;; Solaris supports linkage-table
+;;(pushnew :linkage-table *features*)
+
+;; CPU selection:
+;; Sparc-v7 gives us fsqrt instruction
+;;(pushnew :sparc-v7 *features*)
+;;(setf *features* (remove :sparc-v7 *features*))
+;; Sparc-v8 gives us fast fixnum multiplies and divides
+;;(pushnew :sparc-v8 *features*)
+;;(setf *features* (remove :sparc-v8 *features*))
+;; Sparc-v9 gives us the extra FP registers, fast bignum multiply and
+;; floor, other float operations available on the Sparc V9, and other
+;; assorted V9 features.
+;;(pushnew :sparc-v9 *features*)
+;;(setf *features* (remove :sparc-v9 *features*))
+
+;;(pushnew :complex-fp-vops *features*)
+EOF
+      ;;
+  *)
+      cat <<EOF >> $TARGET/setenv.lisp
+
+;; Select some appropriate features for the $2 platform, otherwise you'll
+;; run into problems later on.
+EOF
+      ;;
+esac
+
+
+echo Motif = $motif
+# Do Motif setup
+if [ "$motif" != "" ]
+then
+	( cd $TARGET/motif/server ; ln -s ../../../src/motif/server/GNUmakefile ./Makefile )
+	( cd $TARGET/motif/server ; ln -s ../../../src/motif/server/Config.$motif ./Config )
+fi
diff --git a/tools/cross-build-world.sh b/tools/cross-build-world.sh
new file mode 100755
index 0000000000000000000000000000000000000000..fc68de2db5160e405db030734d57d8675b52b0ee
--- /dev/null
+++ b/tools/cross-build-world.sh
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+if [ "$1" = "" -o "$2" = "" ]
+then
+        echo "Usage: $0 target-directory cross-directory cross-compiler-script [build-binary] [build-flags...]"
+        exit 1
+fi
+
+if [ ! -d "$1" ]
+then
+        echo "$1 isn't a directory"
+        exit 2
+fi
+
+if [ -f "$2" ]
+then
+	echo "$2 exists but isn't a directory"
+	exit 2
+fi
+
+if [ ! -f "$3" ]
+then
+	echo "$3 doesn't exist, or isn't a normal file"
+fi
+
+TARGET="`echo $1 | sed 's:/*$::'`"
+CROSS="`echo $2 | sed 's:/*$::'`"
+SCRIPT="$3"
+LISP="${4:-lisp}"
+if [ $# -ge 4 ]
+then
+	shift 4
+else
+	shift 3
+fi
+
+if [ ! -d "$CROSS" ]
+then
+	# Create a directory tree that mirrors the source directory tree
+	find src -name 'CVS' -prune -o -type d -print | \
+		sed "s:^src:$CROSS:g" | xargs mkdir
+fi
+
+$LISP "$@" -noinit -nositeinit <<EOF
+(in-package :cl-user)
+
+;;(setf lisp::*enable-package-locked-errors* nil)
+
+(setf (ext:search-list "target:")
+      '("$CROSS/" "src/"))
+
+(when (probe-file "$TARGET/cross-bootstrap.lisp")
+  (load "$TARGET/cross-bootstrap.lisp"))
+
+(load "target:code/exports")
+(load "target:tools/setup" :if-source-newer :load-source)
+(comf "target:tools/setup" :load t)
+
+(setq *gc-verbose* nil *interactive* nil)
+
+(load "$SCRIPT")
+
+(pushnew :bootstrap *features*)
+
+(setf (ext:search-list "target:")
+      '("$TARGET/" "src/"))
+
+(when (probe-file "target:bootstrap.lisp")
+  (load "target:bootstrap.lisp"))
+
+(load "target:setenv")
+
+(pushnew :no-pcl *features*)
+(pushnew :no-clx *features*)
+(pushnew :no-clm *features*)
+(pushnew :no-hemlock *features*)
+
+(load "target:tools/worldcom")
+#-(or no-compiler runtime) (load "target:tools/comcom")
+;; Compile at least new-genesis, so that genesis doesn't take ages
+#+(or no-compiler runtime) (comf "target:compiler/generic/new-genesis")
+#-(or no-pcl runtime) (load "target:tools/pclcom")
+
+(setq *gc-verbose* t *interactive* t)
+
+(load "target:tools/worldbuild")
+(ext:quit)
+EOF
diff --git a/tools/cross-scripts/cross-sparc-sparc.lisp b/tools/cross-scripts/cross-sparc-sparc.lisp
new file mode 100644
index 0000000000000000000000000000000000000000..8d7fea86bad268f6369a544fa11f76c7cd98aaef
--- /dev/null
+++ b/tools/cross-scripts/cross-sparc-sparc.lisp
@@ -0,0 +1,191 @@
+(in-package :cl-user)
+
+;;; Rename the X86 package and backend so that new-backend does the
+;;; right thing.
+(rename-package "SPARC" "OLD-SPARC")
+(setf (c:backend-name c:*native-backend*) "OLD-SPARC")
+
+(c::new-backend "SPARC"
+   ;; Features to add here
+   '(:sparc :sparc-v8
+     :complex-fp-vops
+     :linkage-table
+     :conservative-float-type
+     :hash-new :random-mt19937
+     :cmu :cmu18 :cmu18e
+     )
+   ;; Features to remove from current *features* here
+   '(:sparc-v9 :x86 :x86-bootstrap :alpha :osf1 :mips
+     :propagate-fun-type :propagate-float-type :constrain-float-type
+     :openbsd :freebsd :glibc2 :linux :pentium
+     :long-float :new-random :small))
+
+;;; Extern-alien-name for the new backend.
+(in-package :vm)
+(defun extern-alien-name (name)
+  (declare (type simple-string name))
+  #+(and bsd (not elf))
+  (concatenate 'string "_" name)
+  #-(and bsd (not elf))
+  name)
+;; When compiling the compiler, vm:fixup-code-object and
+;; vm:sanctify-for-execution are undefined.  Import these to get rid
+;; of that error.
+(import 'old-sparc::fixup-code-object)
+(import 'old-sparc::sanctify-for-execution)
+(export 'extern-alien-name)
+(export 'fixup-code-object)
+(export 'sanctify-for-execution)
+
+(in-package :cl-user)
+
+;;; Compile the new backend.
+(pushnew :bootstrap *features*)
+(pushnew :building-cross-compiler *features*)
+(load "target:tools/comcom")
+
+;;; Load the new backend.
+(setf (search-list "c:")
+      '("target:compiler/"))
+(setf (search-list "vm:")
+      '("c:sparc/" "c:generic/"))
+(setf (search-list "assem:")
+      '("target:assembly/" "target:assembly/sparc/"))
+
+;; Load the backend of the compiler.
+
+(in-package "C")
+
+(load "vm:vm-macs")
+(load "vm:parms")
+(load "vm:objdef")
+(load "vm:interr")
+(load "assem:support")
+
+(load "target:compiler/srctran")
+(load "vm:vm-typetran")
+(load "target:compiler/float-tran")
+(load "target:compiler/saptran")
+
+(load "vm:macros")
+(load "vm:utils")
+
+(load "vm:vm")
+(load "vm:insts")
+(load "vm:primtype")
+(load "vm:move")
+(load "vm:sap")
+(load "vm:system")
+(load "vm:char")
+(load "vm:float")
+
+(load "vm:memory")
+(load "vm:static-fn")
+(load "vm:arith")
+(load "vm:cell")
+(load "vm:subprim")
+(load "vm:debug")
+(load "vm:c-call")
+(load "vm:print")
+(load "vm:alloc")
+(load "vm:call")
+(load "vm:nlx")
+(load "vm:values")
+(load "vm:array")
+(load "vm:pred")
+(load "vm:type-vops")
+
+(load "assem:assem-rtns")
+
+(load "assem:array")
+(load "assem:arith")
+(load "assem:alloc")
+
+(load "c:pseudo-vops")
+
+(check-move-function-consistency)
+
+(load "vm:new-genesis")
+
+;;; OK, the cross compiler backend is loaded.
+
+(setf *features* (remove :building-cross-compiler *features*))
+
+;;; Info environment hacks.
+(macrolet ((frob (&rest syms)
+	     `(progn ,@(mapcar #'(lambda (sym)
+				   `(defconstant ,sym
+				      (symbol-value
+				       (find-symbol ,(symbol-name sym)
+						    :vm))))
+			       syms))))
+  (frob OLD-SPARC:BYTE-BITS OLD-SPARC:WORD-BITS
+	OLD-SPARC:LOWTAG-BITS
+	#+long-float OLD-SPARC:SIMPLE-ARRAY-LONG-FLOAT-TYPE 
+	OLD-SPARC:SIMPLE-ARRAY-DOUBLE-FLOAT-TYPE 
+	OLD-SPARC:SIMPLE-ARRAY-SINGLE-FLOAT-TYPE
+	#+long-float OLD-SPARC:SIMPLE-ARRAY-COMPLEX-LONG-FLOAT-TYPE 
+	OLD-SPARC:SIMPLE-ARRAY-COMPLEX-DOUBLE-FLOAT-TYPE 
+	OLD-SPARC:SIMPLE-ARRAY-COMPLEX-SINGLE-FLOAT-TYPE
+	OLD-SPARC:SIMPLE-ARRAY-UNSIGNED-BYTE-2-TYPE 
+	OLD-SPARC:SIMPLE-ARRAY-UNSIGNED-BYTE-4-TYPE
+	OLD-SPARC:SIMPLE-ARRAY-UNSIGNED-BYTE-8-TYPE 
+	OLD-SPARC:SIMPLE-ARRAY-UNSIGNED-BYTE-16-TYPE 
+	OLD-SPARC:SIMPLE-ARRAY-UNSIGNED-BYTE-32-TYPE 
+	OLD-SPARC:SIMPLE-ARRAY-SIGNED-BYTE-8-TYPE 
+	OLD-SPARC:SIMPLE-ARRAY-SIGNED-BYTE-16-TYPE
+	OLD-SPARC:SIMPLE-ARRAY-SIGNED-BYTE-30-TYPE 
+	OLD-SPARC:SIMPLE-ARRAY-SIGNED-BYTE-32-TYPE
+	OLD-SPARC:SIMPLE-BIT-VECTOR-TYPE
+	OLD-SPARC:SIMPLE-STRING-TYPE OLD-SPARC:SIMPLE-VECTOR-TYPE 
+	OLD-SPARC:SIMPLE-ARRAY-TYPE OLD-SPARC:VECTOR-DATA-OFFSET
+	))
+
+(let ((function (symbol-function 'kernel:error-number-or-lose)))
+  (let ((*info-environment* (c:backend-info-environment c:*target-backend*)))
+    (setf (symbol-function 'kernel:error-number-or-lose) function)
+    (setf (info function kind 'kernel:error-number-or-lose) :function)
+    (setf (info function where-from 'kernel:error-number-or-lose) :defined)))
+
+(defun fix-class (name)
+  (let* ((new-value (find-class name))
+	 (new-layout (kernel::class-layout new-value))
+	 (new-cell (kernel::find-class-cell name))
+	 (*info-environment* (c:backend-info-environment c:*target-backend*)))
+    (remhash name kernel::*forward-referenced-layouts*)
+    (kernel::%note-type-defined name)
+    (setf (info type kind name) :instance)
+    (setf (info type class name) new-cell)
+    (setf (info type compiler-layout name) new-layout)
+    new-value))
+(fix-class 'c::vop-parse)
+(fix-class 'c::operand-parse)
+
+#+random-mt19937
+(declaim (notinline kernel:random-chunk))
+
+(setf c:*backend* c:*target-backend*)
+
+;;; Extern-alien-name for the new backend.
+(in-package :vm)
+(defun extern-alien-name (name)
+  (declare (type simple-string name))
+  #+(and bsd (not elf))
+  (concatenate 'string "_" name)
+  #-(and bsd (not elf))
+  name)
+(export 'extern-alien-name)
+(export 'fixup-code-object)
+(export 'sanctify-for-execution)
+(in-package :cl-user)
+
+;;; Don't load compiler parts from the target compilation
+
+(defparameter *load-stuff* nil)
+
+;; hack, hack, hack: Make old-sparc::any-reg the same as
+;; sparc::any-reg as an SC.  Do this by adding old-sparc::any-reg
+;; to the hash table with the same value as sparc::any-reg.
+(let ((ht (c::backend-sc-names c::*target-backend*)))
+  (setf (gethash 'old-sparc::any-reg ht)
+	(gethash 'sparc::any-reg ht)))
diff --git a/tools/cross-scripts/cross-x86-x86.lisp b/tools/cross-scripts/cross-x86-x86.lisp
new file mode 100644
index 0000000000000000000000000000000000000000..8ff4f50a3f243c34d000c409e121e80b6d64451f
--- /dev/null
+++ b/tools/cross-scripts/cross-x86-x86.lisp
@@ -0,0 +1,171 @@
+(in-package :cl-user)
+
+;;; Rename the X86 package and backend so that new-backend does the
+;;; right thing.
+(rename-package "X86" "OLD-X86")
+(setf (c:backend-name c:*native-backend*) "OLD-X86")
+
+(c::new-backend "X86"
+   ;; Features to add here
+   '(:x86 :i486 :pentium
+     :stack-checking :mp :gencgc
+     :conservative-float-type
+     :hash-new :random-mt19937
+     :linux :glibc2 :glibc2.1
+     :cmu :cmu18 :cmu18d
+     )
+   ;; Features to remove from current *features* here
+   '(:x86-bootstrap :alpha :osf1 :mips
+     :propagate-fun-type :propagate-float-type :constrain-float-type
+     :openbsd :freebsd :glibc2 :linux
+     :long-float :new-random :small))
+
+;;; Compile the new backend.
+(pushnew :bootstrap *features*)
+(pushnew :building-cross-compiler *features*)
+(load "target:tools/comcom")
+
+;;; Load the new backend.
+(setf (search-list "c:")
+      '("target:compiler/"))
+(setf (search-list "vm:")
+      '("c:x86/" "c:generic/"))
+(setf (search-list "assem:")
+      '("target:assembly/" "target:assembly/x86/"))
+
+;; Load the backend of the compiler.
+
+(in-package "C")
+
+(load "vm:vm-macs")
+(load "vm:parms")
+(load "vm:objdef")
+(load "vm:interr")
+(load "assem:support")
+
+(load "target:compiler/srctran")
+(load "vm:vm-typetran")
+(load "target:compiler/float-tran")
+(load "target:compiler/saptran")
+
+(load "vm:macros")
+(load "vm:utils")
+
+(load "vm:vm")
+(load "vm:insts")
+(load "vm:primtype")
+(load "vm:move")
+(load "vm:sap")
+(load "vm:system")
+(load "vm:char")
+(load "vm:float")
+
+(load "vm:memory")
+(load "vm:static-fn")
+(load "vm:arith")
+(load "vm:cell")
+(load "vm:subprim")
+(load "vm:debug")
+(load "vm:c-call")
+(load "vm:print")
+(load "vm:alloc")
+(load "vm:call")
+(load "vm:nlx")
+(load "vm:values")
+(load "vm:array")
+(load "vm:pred")
+(load "vm:type-vops")
+
+(load "assem:assem-rtns")
+
+(load "assem:array")
+(load "assem:arith")
+(load "assem:alloc")
+
+(load "c:pseudo-vops")
+
+(check-move-function-consistency)
+
+(load "vm:new-genesis")
+
+;;; OK, the cross compiler backend is loaded.
+
+(setf *features* (remove :building-cross-compiler *features*))
+
+;;; Info environment hacks.
+(macrolet ((frob (&rest syms)
+	     `(progn ,@(mapcar #'(lambda (sym)
+				   `(defconstant ,sym
+				      (symbol-value
+				       (find-symbol ,(symbol-name sym)
+						    :vm))))
+			       syms))))
+  (frob OLD-X86:BYTE-BITS OLD-X86:WORD-BITS
+	#+long-float OLD-X86:SIMPLE-ARRAY-LONG-FLOAT-TYPE 
+	OLD-X86:SIMPLE-ARRAY-DOUBLE-FLOAT-TYPE 
+	OLD-X86:SIMPLE-ARRAY-SINGLE-FLOAT-TYPE
+	#+long-float OLD-X86:SIMPLE-ARRAY-COMPLEX-LONG-FLOAT-TYPE 
+	OLD-X86:SIMPLE-ARRAY-COMPLEX-DOUBLE-FLOAT-TYPE 
+	OLD-X86:SIMPLE-ARRAY-COMPLEX-SINGLE-FLOAT-TYPE
+	OLD-X86:SIMPLE-ARRAY-UNSIGNED-BYTE-2-TYPE 
+	OLD-X86:SIMPLE-ARRAY-UNSIGNED-BYTE-4-TYPE
+	OLD-X86:SIMPLE-ARRAY-UNSIGNED-BYTE-8-TYPE 
+	OLD-X86:SIMPLE-ARRAY-UNSIGNED-BYTE-16-TYPE 
+	OLD-X86:SIMPLE-ARRAY-UNSIGNED-BYTE-32-TYPE 
+	OLD-X86:SIMPLE-ARRAY-SIGNED-BYTE-8-TYPE 
+	OLD-X86:SIMPLE-ARRAY-SIGNED-BYTE-16-TYPE
+	OLD-X86:SIMPLE-ARRAY-SIGNED-BYTE-30-TYPE 
+	OLD-X86:SIMPLE-ARRAY-SIGNED-BYTE-32-TYPE
+	OLD-X86:SIMPLE-BIT-VECTOR-TYPE
+	OLD-X86:SIMPLE-STRING-TYPE OLD-X86:SIMPLE-VECTOR-TYPE 
+	OLD-X86:SIMPLE-ARRAY-TYPE OLD-X86:VECTOR-DATA-OFFSET
+	))
+
+(let ((function (symbol-function 'kernel:error-number-or-lose)))
+  (let ((*info-environment* (c:backend-info-environment c:*target-backend*)))
+    (setf (symbol-function 'kernel:error-number-or-lose) function)
+    (setf (info function kind 'kernel:error-number-or-lose) :function)
+    (setf (info function where-from 'kernel:error-number-or-lose) :defined)))
+
+(defun fix-class (name)
+  (let* ((new-value (find-class name))
+	 (new-layout (kernel::%class-layout new-value))
+	 (new-cell (kernel::find-class-cell name))
+	 (*info-environment* (c:backend-info-environment c:*target-backend*)))
+    (remhash name kernel::*forward-referenced-layouts*)
+    (kernel::%note-type-defined name)
+    (setf (info type kind name) :instance)
+    (setf (info type class name) new-cell)
+    (setf (info type compiler-layout name) new-layout)
+    new-value))
+(fix-class 'c::vop-parse)
+(fix-class 'c::operand-parse)
+
+#+random-mt19937
+(declaim (notinline kernel:random-chunk))
+
+(setf c:*backend* c:*target-backend*)
+
+;;; Extern-alien-name for the new backend.
+(in-package :vm)
+(defun extern-alien-name (name)
+  (declare (type simple-string name))
+  #+(and bsd (not elf))
+  (concatenate 'string "_" name)
+  #-(and bsd (not elf))
+  name)
+(export 'extern-alien-name)
+(export 'fixup-code-object)
+(export 'sanctify-for-execution)
+(in-package :cl-user)
+
+;;; Don't load compiler parts from the target compilation
+
+(defparameter *load-stuff* nil)
+
+;; hack, hack, hack: Make old-x86::any-reg the same as
+;; x86::any-reg as an SC.  Do this by adding old-x86::any-reg
+;; to the hash table with the same value as x86::any-reg.
+(let ((ht (c::backend-sc-names c::*target-backend*)))
+  (setf (gethash 'old-x86::any-reg ht)
+	(gethash 'x86::any-reg ht)))
diff --git a/tools/load-world.sh b/tools/load-world.sh
new file mode 100755
index 0000000000000000000000000000000000000000..64764d1a7259f106abbf64ed94648a97ba8aded9
--- /dev/null
+++ b/tools/load-world.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+if [ "$1" = "" -o "$2" = "" ]
+then
+	echo "Usage: $0 target-directory version"
+	exit 1
+fi
+
+if [ ! -d "$1" ]
+then
+	echo "$1 isn't a directory"
+	exit 2
+fi
+
+TARGET="`echo $1 | sed 's:/*$::'`"
+
+$TARGET/lisp/lisp -core $TARGET/lisp/kernel.core <<EOF
+(in-package :cl-user)
+
+(setf (ext:search-list "target:")
+      '("$TARGET/" "src/"))
+
+(load "target:setenv")
+
+(pushnew :no-clx *features*)
+(pushnew :no-clm *features*)
+(pushnew :no-hemlock *features*)
+
+(load "target:tools/worldload")
+$2
+
+EOF
diff --git a/tools/make-dist.sh b/tools/make-dist.sh
new file mode 100755
index 0000000000000000000000000000000000000000..1f40b2c07a6b80d210b367ae69be138460eb4c13
--- /dev/null
+++ b/tools/make-dist.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+if [ "$1" = "" -o "$2" = "" -o "$3" = "" -o "$4" = "" ]
+then
+	echo "Usage: $0 target-directory version arch os"
+	exit 1
+fi
+
+if [ ! -d "$1" ]
+then
+	echo "$1 isn't a directory"
+	exit 2
+fi
+
+TARGET="`echo $1 | sed 's:/*$::'`"
+VERSION=$2
+ARCH=$3
+OS=$4
+ROOT=`dirname $0`
+
+$ROOT/make-main-dist.sh $TARGET $VERSION $ARCH $OS || exit 1
+$ROOT/make-extra-dist.sh $TARGET $VERSION $ARCH $OS || exit 2
diff --git a/tools/make-extra-dist.sh b/tools/make-extra-dist.sh
new file mode 100755
index 0000000000000000000000000000000000000000..6c8f6a7c06f07c392327cfab3f1c667bb076f1ac
--- /dev/null
+++ b/tools/make-extra-dist.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+if [ "$1" = "" -o "$2" = "" -o "$3" = "" -o "$4" = "" ]
+then
+	echo "Usage: $0 target-directory version arch os"
+	exit 1
+fi
+
+if [ ! -d "$1" ]
+then
+	echo "$1 isn't a directory"
+	exit 2
+fi
+
+DESTDIR=release
+TARGET="`echo $1 | sed 's:/*$::'`"
+VERSION=$2
+ARCH=$3
+OS=$4
+
+case $ARCH in
+	x86*)		FASL=x86f ;;
+	sparc*)		FASL=sparcf ;;
+	alpha*)		FASL=axpf ;;
+	ppc*)		FASL=ppcf ;;
+	mips*)		FASL=sgif ;;
+	*)
+		echo "Unknown FASL type for architecture $ARCH"
+		exit 2
+		;;
+esac
+
+# Frob PATH to use /usr/ucb/install for Solaris
+if [ `uname -s` = "SunOS" ]
+then
+	PATH=/usr/ucb:$PATH
+fi
+
+echo Cleaning $DESTDIR
+[ -d $DESTDIR ] && rm -rf $DESTDIR
+
+echo Installing extra components
+install -d -g bin -o root -m 0755 $DESTDIR/lib/cmucl/lib
+install -d -g bin -o root -m 0755 $DESTDIR/lib/cmucl/lib/subsystems
+install -g bin -o root -m 0644 $TARGET/clx/clx-library.$FASL \
+	$DESTDIR/lib/cmucl/lib/subsystems/
+install -g bin -o root -m 0644 $TARGET/hemlock/hemlock-library.$FASL \
+	$DESTDIR/lib/cmucl/lib/subsystems/
+# install -d -g bin -o root -m 0755 $DESTDIR/lib/cmucl/lib/fonts/
+# install -g bin -o root -m 0644 misc/8x13u.snf misc/fonts.dir \
+#	$DESTDIR/lib/cmucl/lib/fonts/
+install -g bin -o root -m 0644 src/hemlock/XKeysymDB \
+	src/hemlock/hemlock11.cursor src/hemlock/hemlock11.mask \
+	$TARGET/hemlock/spell-dictionary.bin \
+	$DESTDIR/lib/cmucl/lib/
+install -g bin -o root -m 0755 src/hemlock/mh-scan $DESTDIR/lib/cmucl/lib/
+install -g bin -o root -m 0644 $TARGET/interface/clm-library.$FASL  \
+	$DESTDIR/lib/cmucl/lib/subsystems/
+install -g bin -o root -m 0755 $TARGET/motif/server/motifd \
+	$DESTDIR/lib/cmucl/lib/
+
+sync ; sleep 1 ; sync ; sleep 1 ; sync
+echo Tarring extra components
+( cd $DESTDIR ; tar cf - lib ) | \
+	gzip -c > cmucl-$VERSION-$ARCH-$OS.extra.tar.gz
+( cd $DESTDIR ; tar cf - lib ) | \
+	bzip2 -c > cmucl-$VERSION-$ARCH-$OS.extra.tar.bz2
+
+echo Cleaning $DESTDIR
+[ -d $DESTDIR ] && rm -rf $DESTDIR
+echo Done
diff --git a/tools/make-main-dist.sh b/tools/make-main-dist.sh
new file mode 100755
index 0000000000000000000000000000000000000000..f6a3d1e620810f919fa90aee03d338be1def6534
--- /dev/null
+++ b/tools/make-main-dist.sh
@@ -0,0 +1,85 @@
+#!/bin/sh
+
+if [ "$1" = "" -o "$2" = "" -o "$3" = "" -o "$4" = "" ]
+then
+	echo "Usage: $0 target-directory version arch os"
+	exit 1
+fi
+
+if [ ! -d "$1" ]
+then
+	echo "$1 isn't a directory"
+	exit 2
+fi
+
+DESTDIR=release
+TARGET="`echo $1 | sed 's:/*$::'`"
+VERSION=$2
+ARCH=$3
+OS=$4
+
+case $ARCH in
+	x86*)		FASL=x86f ;;
+	sparc*)		FASL=sparcf ;;
+	alpha*)		FASL=axpf ;;
+	ppc*)		FASL=ppcf ;;
+	mips*)		FASL=sgif ;;
+	*)
+		echo "Unknown FASL type for architecture $ARCH"
+		exit 2
+		;;
+esac
+
+# Frob PATH to use /usr/ucb/install for Solaris
+if [ `uname -s` = "SunOS" ]
+then
+	PATH=/usr/ucb:$PATH
+fi
+
+echo Cleaning $DESTDIR
+[ -d $DESTDIR ] && rm -rf $DESTDIR
+
+echo Installing main components
+install -d -g bin -o root -m 0755 $DESTDIR/bin
+install -d -g bin -o root -m 0755 $DESTDIR/doc/cmucl
+install -d -g bin -o root -m 0755 $DESTDIR/lib/cmucl
+install -d -g bin -o root -m 0755 $DESTDIR/lib/cmucl/lib
+install -d -g bin -o root -m 0755 $DESTDIR/lib/cmucl/lib/subsystems
+install -d -g bin -o root -m 0755 $DESTDIR/man/man1
+install -g bin -o root -m 0755 $TARGET/lisp/lisp $DESTDIR/bin/
+install -g bin -o root -m 0644 $TARGET/lisp/lisp.core $DESTDIR/lib/cmucl/lib/
+install -g bin -o root -m 0755 src/tools/load-foreign.csh src/tools/config \
+	$DESTDIR/lib/cmucl/lib/
+install -g bin -o root -m 0644 src/tools/config.lisp \
+	$DESTDIR/lib/cmucl/lib/
+install -g bin -o root -m 0644 src/code/generic-site.lisp \
+	$DESTDIR/lib/cmucl/lib/
+install -g bin -o root -m 0644 $TARGET/lisp/lisp.nm $TARGET/lisp/lisp.map \
+	$TARGET/lisp/internals.h $TARGET/lisp/internals.inc $DESTDIR/lib/cmucl/
+install -g bin -o root -m 0755 src/tools/sample-wrapper $DESTDIR/lib/cmucl/
+for f in gray-streams gray-compat simple-streams iodefs
+do
+  install -g bin -o root -m 0644 $TARGET/pcl/$f-library.$FASL $DESTDIR/lib/cmucl/lib/subsystems/
+done
+
+install -g bin -o root -m 0644 src/general-info/cmucl.1 \
+	$DESTDIR/man/man1/
+install -g bin -o root -m 0644 src/general-info/lisp.1 \
+	$DESTDIR/man/man1/
+install -g bin -o root -m 0644 src/general-info/README $DESTDIR/doc/cmucl/
+if [ -f src/general-info/release-$VERSION.txt ] 
+then
+	install -g bin -o root -m 0644 src/general-info/release-$VERSION.txt \
+		$DESTDIR/doc/cmucl/
+fi
+
+sync ; sleep 1 ; sync ; sleep 1 ; sync
+echo Tarring main components
+( cd $DESTDIR ; tar cf - bin doc lib man ) | \
+	gzip -c > cmucl-$VERSION-$ARCH-$OS.tar.gz
+( cd $DESTDIR ; tar cf - bin doc lib man ) | \
+	bzip2 -c > cmucl-$VERSION-$ARCH-$OS.tar.bz2
+
+echo Cleaning $DESTDIR
+[ -d $DESTDIR ] && rm -rf $DESTDIR
+echo Done
diff --git a/tools/rebuild-lisp.sh b/tools/rebuild-lisp.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d6aa6e93facdb39ece404641660b8fe9ebccb4f8
--- /dev/null
+++ b/tools/rebuild-lisp.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+if [ "$1" = "" ]
+then
+	echo "Usage: $0 target-directory"
+	exit 1
+fi
+
+if [ ! -d "$1" ]
+then
+	echo "$1 isn't a directory"
+	exit 2
+fi
+
+TARGET="`echo $1 | sed 's:/*$::'`"
+
+# Find GNU make:
+
+if [ "$MAKE" = "" ]
+then	
+	MAKE="`which gmake`" || MAKE="`which make`"
+fi
+
+export MAKE
+
+${MAKE} -C $TARGET/lisp clean && ${MAKE} -C $TARGET/lisp