From: Joe Marshall <eval.apply@gmail.com>
Date: Wed, 18 Jan 2012 20:27:09 +0000 (-0800)
Subject: Add instructions for rebuilding the compiler.
X-Git-Tag: release-9.2.0~334^2~12
X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=264e619b1616cac015b2a4818d01774e34f2e126;p=mit-scheme.git

Add instructions for rebuilding the compiler.
---

diff --git a/src/README.txt b/src/README.txt
index 0c21c3d50..7568a170f 100644
--- a/src/README.txt
+++ b/src/README.txt
@@ -171,3 +171,57 @@ system-wide location(s), you may want to set the MIT_SCHEME_EXE
 environment variable.  The Makefiles expect it to be the host scheme's
 command name.  For information about installing MIT/GNU Scheme in
 unusual locations, please see the Unix Installation instructions.
+
+Building an incompatible compiler
+=================================
+
+If the basic compiler data structures have changed, it may not be
+possible to directly build the compiler by invoking make.  (This is a
+known bug.)
+
+However, it is possible to build the compiler from the Scheme sources
+if you have a working installation with a runtime band.  Here is how:
+
+    1.  Put the source tree into the `configured' state as per the
+        above instructions.
+
+    2.  Make the "src/compiler/" directory be your working directory.
+
+    3.  `Syntax' the compiler with these steps:
+
+        a.  Start scheme with the runtime band:
+            scheme --band runtime.com
+
+        b.  ]=> (load-option 'sf)
+
+        c.  ]=> (load "compiler.sf")
+
+        d.  ]=> (exit)
+
+    4.  Compile the compiler with these steps:
+
+        a.  Start scheme with the runtime band:
+            scheme --band runtime.com
+
+        b.  ]=> (load "make.scm")
+
+        c.  ]=> (load "compiler.cbf")
+
+        d.  ]=> (exit)
+
+    5.  Build a new compiler band with these steps:
+
+        a.  Start scheme with the runtime band:
+            scheme --band runtime.com
+
+        b.  ]=> (load-option 'cref)
+
+        c.  ]=> (load-option 'sf)
+
+        d.  ]=> (load "make")
+
+        e.  ]=> (disk-save "compiler-band.com")
+
+The resulting band, compiler-band.com, should be suitable for
+compiling the compiler.
+