diff options
Diffstat (limited to 'com/cmu')
-rw-r--r-- | com/cmu/README | 45 | ||||
-rwxr-xr-x | com/cmu/build-prelude | 32 | ||||
-rwxr-xr-x | com/cmu/build-xlib | 15 | ||||
-rwxr-xr-x | com/cmu/clean | 4 | ||||
-rwxr-xr-x | com/cmu/compile | 12 | ||||
-rwxr-xr-x | com/cmu/savesys | 46 | ||||
-rwxr-xr-x | com/cmu/savesys-xlib | 57 |
7 files changed, 211 insertions, 0 deletions
diff --git a/com/cmu/README b/com/cmu/README new file mode 100644 index 0000000..3653d60 --- /dev/null +++ b/com/cmu/README @@ -0,0 +1,45 @@ +This directory contains command scripts used for building Yale Haskell +from the source distribution under CMU Common Lisp on the sparc. + +We have been using version 16f of CMU Common Lisp to build Haskell. +You can ftp this from lisp-rt1.slisp.cs.cmu.edu (128.2.217.9). +There is a known problem with this version of CMU CL: core files built +under SunOS 4.1.2 won't work under 4.1.3, and vice versa. There are +also apparently compatibility problems with 4.1.3 between sun4c and +sun4m architectures. Anyway, we have built under 4.1.2 on a sun4c +and 4.1.3 on a sun4m. + +Developers need to source haskell-development instead of haskell-setup +in the .cshrc file. + +To rebuild the system: + +* You need to define environment variables Y2, CMUCL, and CMUCLLIB to + point to the appropriate pathnames. See the haskell-development + script for details. + +* Make sure that the environment variable PRELUDEBIN (in the + haskell-setup script) points to $PRELUDE/cmu. + +* Execute the "compile" script. This will recompile all of the Lisp + source files that make up the Yale Haskell system. Compiled files + are put in the "cmu" subdirectory of each source directory. + +* Execute the "build-prelude" script to compile the standard prelude. + Note that this process tends to use up a huge amount of memory! + +* Execute the "savesys" script to save a core file. + +* The new core file is initially called "bin/new-cmu-haskell.core". + Use the -core command line argument to cmucl to test it. If it + works, you should rename it to "bin/sun4c-haskell.core" (or + "bin/sun4m-haskell.core") and use the "bin/cmu-haskell" script + to execute it. Make sure HASKELLPROG (in the haskell-setup script) + is correct. Depending on where you have cmucl this script may need + editing. + +* If you want to build an executable with the X support, you'll also + need to run the "build-xlib" and "savesys-xlib" scripts. You + need to edit these scripts to change the pathname of the file + containing the CLX library (or suppress the load entirely if you + are using a Lisp executable with CLX pre-loaded.). diff --git a/com/cmu/build-prelude b/com/cmu/build-prelude new file mode 100755 index 0000000..68d2621 --- /dev/null +++ b/com/cmu/build-prelude @@ -0,0 +1,32 @@ +#!/bin/csh +# +# build-prelude -- recompile the prelude, saving the old one as old-prelude.* +# +# +cd $Y2 +setenv PRELUDEBIN $Y2/progs/prelude/cmu +if (-e $PRELUDEBIN/Prelude.sparcf) then + rm $PRELUDEBIN/old* + foreach i ($PRELUDEBIN/Prelude*.{scm,sparcf}) + mv $i $PRELUDEBIN/old-$i:t + end + endif +$CMUCL <<EOF +;; Need a big heap to compile the prelude. +(setf ext:*bytes-consed-between-gcs* 10000000) +;; If you want to recompile +;; everything from scratch, execute the "clean" script first, or +;; else use the "compile" script to do this. +(proclaim '(optimize (speed 3) (safety 0) (debug 0) (ext:inhibit-warnings 3))) +(load "cl-support/cl-init") +;; Use the same compiler settings for processing the prelude. +(in-package :mumble-user) +(setf *printers* '(phase-time dump-stat)) +(setf *optimizers* *all-optimizers*) +;; The compiler barfs while compiling the interface file for the prelude, +;; so set the flag for writing it as a source file. +(setf *code-chunk-size* 300) +(setf *compile-interface* '#f) +(compile/compile *prelude-unit-filename*) +(ext:quit) +EOF diff --git a/com/cmu/build-xlib b/com/cmu/build-xlib new file mode 100755 index 0000000..df6eb05 --- /dev/null +++ b/com/cmu/build-xlib @@ -0,0 +1,15 @@ +#!/bin/csh +# +# build-xlib -- recompile the xlib stuff +# +# +cd $Y2 +setenv CLXFILE /net/nebula/homes/systems/hcompile/cmu/lib/subsystems/clx-library.sparcf +setenv LIBRARYBIN $Y2/progs/lib/bin/cmu +rm $LIBRARYBIN/xlib*.sparcf +bin/cmu-haskell <<EOF +:(setf ext:*bytes-consed-between-gcs* 8000000) +:(load "\$CLXFILE") +:(setf *code-quality* 3) +:compile \$HASKELL_LIBRARY/X11/xlib +EOF diff --git a/com/cmu/clean b/com/cmu/clean new file mode 100755 index 0000000..370ed36 --- /dev/null +++ b/com/cmu/clean @@ -0,0 +1,4 @@ +#!/bin/csh +# +# delete CMU CL binaries +'rm' $Y2/*/cmu/*.sparcf diff --git a/com/cmu/compile b/com/cmu/compile new file mode 100755 index 0000000..e4126ea --- /dev/null +++ b/com/cmu/compile @@ -0,0 +1,12 @@ +#!/bin/csh +# +# compile -- compile the Yale Haskell system from scratch. +# +# +cd $Y2 +$CMUCL <<EOF +(setf ext:*bytes-consed-between-gcs* 4000000) +(proclaim '(optimize (speed 3) (safety 0) (debug 0) (ext:inhibit-warnings 3))) +(load "cl-support/cl-init") +(quit) +EOF diff --git a/com/cmu/savesys b/com/cmu/savesys new file mode 100755 index 0000000..b3b0672 --- /dev/null +++ b/com/cmu/savesys @@ -0,0 +1,46 @@ +#!/bin/csh +# +# savesys -- build a saved executable in bin/new-cmu-haskell.core +# +# +cd $Y2 +setenv PRELUDEBIN $Y2/progs/prelude/cmu +if !(-e $PRELUDEBIN/Prelude.sparcf) then + echo "Build the prelude first, stupid..." + exit + endif +$CMUCL <<EOF +;;; Load the Haskell system. +(make-package "MUMBLE-IMPLEMENTATION" :use '("LISP")) +(load "cl-support/cl-init") +;;; Set various internal switches to appropriate values for running +;;; Haskell code. +(setf ext:*bytes-consed-between-gcs* 4000000) +(proclaim '(optimize (speed 3) (safety 0) (debug 0) (ext:inhibit-warnings 3))) +(setf *load-verbose* nil) +(setf *compile-verbose* nil) +(in-package :mumble-user) +(gc-messages '#f) +(setf *printers* '(compiling loading)) +(setf *optimizers* '()) +(setf *compile-interface* '#f) +;;; Load the prelude. +(compile/load *prelude-unit-filename*) +;;; Set up the saved system. +(define (haskell-toplevel) + (load-init-files) + (do () ('#f) + (lisp:with-simple-restart (restart-haskell "Restart Haskell.") + (heval)))) +(define (restart-haskell) + (lisp:invoke-restart 'restart-haskell)) +(ext:save-lisp "bin/new-cmu-haskell.core" + :purify '#t + :root-structures '() + :init-function 'haskell-toplevel + :load-init-file '#f + :site-init '#f + :print-herald '#f + ) +(ext:quit) +EOF diff --git a/com/cmu/savesys-xlib b/com/cmu/savesys-xlib new file mode 100755 index 0000000..763e680 --- /dev/null +++ b/com/cmu/savesys-xlib @@ -0,0 +1,57 @@ +#!/bin/csh +# +# savesys-xlib -- build a saved executable in bin/new-cmu-clx-haskell.core +# +# +cd $Y2 +setenv PRELUDEBIN $Y2/progs/prelude/cmu +if !(-e $PRELUDEBIN/Prelude.sparcf) then + echo "Build the prelude first, stupid..." + exit + endif +setenv CLXFILE /net/nebula/homes/systems/hcompile/cmu/lib/subsystems/clx-library.sparcf +setenv LIBRARYBIN $Y2/progs/lib/bin/cmu +if !(-e $LIBRARYBIN/xlib.sparcf) then + echo "Build the xlib stuff first, silly..." + exit + endif +$CMUCL <<EOF +;;; Load the Haskell system. +(make-package "MUMBLE-IMPLEMENTATION" :use '("LISP")) +(load "cl-support/cl-init") +;;; Set various internal switches to appropriate values for running +;;; Haskell code. +(setf ext:*bytes-consed-between-gcs* 4000000) +(proclaim '(optimize (speed 3) (safety 0) (debug 0) (ext:inhibit-warnings 3))) +(setf *load-verbose* nil) +(setf *compile-verbose* nil) +(in-package :mumble-user) +(gc-messages '#f) +(setf *printers* '(compiling loading)) +(setf *optimizers* '()) +(setf *compile-interface* '#f) +;;; Load the prelude. +(compile/load *prelude-unit-filename*) +;;; Load the X support. +(load "\$CLXFILE") +(compile/load "\$HASKELL_LIBRARY/X11/xlib") +(setf *haskell-compiler-update* + (string-append *haskell-compiler-update* "-X11")) +;;; Set up the saved system. +(define (haskell-toplevel) + (load-init-files) + (do () ('#f) + (lisp:with-simple-restart (restart-haskell "Restart Haskell.") + (heval)))) +(define (restart-haskell) + (lisp:invoke-restart 'restart-haskell)) +(ext:save-lisp "bin/new-cmu-clx-haskell.core" + :purify '#t + :root-structures '() + :init-function 'haskell-toplevel + :load-init-file '#f + :site-init '#f + :print-herald '#f + ) +(ext:quit) +EOF |