diff options
Diffstat (limited to 'com/lispworks')
-rw-r--r-- | com/lispworks/README | 43 | ||||
-rwxr-xr-x | com/lispworks/build-prelude | 35 | ||||
-rwxr-xr-x | com/lispworks/build-xlib | 12 | ||||
-rwxr-xr-x | com/lispworks/clean | 5 | ||||
-rwxr-xr-x | com/lispworks/compile | 13 | ||||
-rw-r--r-- | com/lispworks/patches/safe-fo-closure.wfasl | bin | 0 -> 2394 bytes | |||
-rwxr-xr-x | com/lispworks/savesys | 43 | ||||
-rwxr-xr-x | com/lispworks/savesys-xlib | 52 |
8 files changed, 203 insertions, 0 deletions
diff --git a/com/lispworks/README b/com/lispworks/README new file mode 100644 index 0000000..bf7aab2 --- /dev/null +++ b/com/lispworks/README @@ -0,0 +1,43 @@ +This directory contains command scripts used for building Yale Haskell +from the source distribution under Lispworks from Harlequin. We have +been using version 3.1.1 on a Sparc. + +Developers need to source haskell-development instead of haskell-setup +in the .cshrc file. + +Important: Make sure you load the stuff in the patches directory +before trying to build the system (the command files do this for you). +If you're building on some platform other than a sparc, you'll have to +get equivalent patches from Harlequin before proceeding. + +To rebuild the system: + +* You need to define environment variables Y2 and LISPWORKS 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/lispworks. + +* 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 "lispworks" 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 build a new executable. + +* The new executable is initially called "bin/new-lispworks-haskell". Try + it out. If it works, you should rename it to "bin/lispworks-haskell". + Make sure that HASKELLPROG (in the haskell-setup script) is correct. + +* 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 may + need to edit these scripts to load the CLX library explicitly if + you are using a Lisp executable that doesn't have CLX pre-loaded. + +When you compile things with the Lispworks compiler, you'll see a +bunch of messages complaining about forward references to things that +haven't yet been defined. We haven't been able to figure out how to +suppress these messages, so unless something else goes wrong you should +just ignore them. diff --git a/com/lispworks/build-prelude b/com/lispworks/build-prelude new file mode 100755 index 0000000..cde5619 --- /dev/null +++ b/com/lispworks/build-prelude @@ -0,0 +1,35 @@ +#!/bin/csh +# +# build-prelude -- recompile the prelude, saving the old one as old-prelude.* +# +# +cd $Y2 +setenv PRELUDEBIN $Y2/progs/prelude/lispworks +if (-e $PRELUDEBIN/Prelude.wfasl) then + rm $PRELUDEBIN/old* + foreach i ($PRELUDEBIN/Prelude*.{wfasl,scm}) + mv $i $PRELUDEBIN/old-$i:t + end + endif +$LISPWORKS <<EOF +(load "com/lispworks/patches/safe-fo-closure.wfasl") +(make-package "MUMBLE-IMPLEMENTATION" :use '("LISP")) +;; Need a bigger than normal stack for compiling the prelude. +(setf system::*stack-overflow-behaviour* :warn) +;; Need a big heap to compile the prelude. +;(lcl:change-memory-management :expand 512 :growth-limit 2048) +;; 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) (compilation-speed 0))) +(load "cl-support/cl-init") +(in-package :mumble-user) +(setf *printers* '(phase-time dump-stat)) +(setf *optimizers* *all-optimizers*) +;; Set appropriate compiler settings for processing the prelude. +;; Don't try to compile the interface files. +(setf *code-chunk-size* 300) +(setf *compile-interface* '#f) +(compile/compile *prelude-unit-filename*) +(lw:bye) +EOF diff --git a/com/lispworks/build-xlib b/com/lispworks/build-xlib new file mode 100755 index 0000000..612820e --- /dev/null +++ b/com/lispworks/build-xlib @@ -0,0 +1,12 @@ +#!/bin/csh +# +# build-xlib -- recompile the xlib stuff +# +# note that lispworks comes with clx pre-loaded! +cd $Y2 +setenv LIBRARYBIN $Y2/progs/lib/X11/lispworks +rm $LIBRARYBIN/xlib*.wfasl +bin/lispworks-haskell <<EOF +:(setf *code-quality* 3) +:compile \$HASKELL_LIBRARY/X11/xlib +EOF diff --git a/com/lispworks/clean b/com/lispworks/clean new file mode 100755 index 0000000..7eb1459 --- /dev/null +++ b/com/lispworks/clean @@ -0,0 +1,5 @@ +#!/bin/csh +# +# delete lispworks binaries +'rm' $Y2/*/lispworks/*.{wfasl} + diff --git a/com/lispworks/compile b/com/lispworks/compile new file mode 100755 index 0000000..de0b459 --- /dev/null +++ b/com/lispworks/compile @@ -0,0 +1,13 @@ +#!/bin/csh +# +# compile -- compile the Yale Haskell system from scratch. +# +# +cd $Y2 +$LISPWORKS <<EOF +(load "com/lispworks/patches/safe-fo-closure.wfasl") +(make-package "MUMBLE-IMPLEMENTATION" :use '("LISP")) +(proclaim '(optimize (speed 3) (safety 0) (compilation-speed 0))) +(load "cl-support/cl-init") +(lw:bye) +EOF diff --git a/com/lispworks/patches/safe-fo-closure.wfasl b/com/lispworks/patches/safe-fo-closure.wfasl Binary files differnew file mode 100644 index 0000000..71c9a5f --- /dev/null +++ b/com/lispworks/patches/safe-fo-closure.wfasl diff --git a/com/lispworks/savesys b/com/lispworks/savesys new file mode 100755 index 0000000..f97b6f6 --- /dev/null +++ b/com/lispworks/savesys @@ -0,0 +1,43 @@ +#!/bin/csh +# +# savesys -- build a saved executable in bin/new-lispworks-haskell +# +# +cd $Y2 +setenv PRELUDEBIN $Y2/progs/prelude/lispworks +if !(-e $PRELUDEBIN/Prelude.wfasl) then + echo "Build the prelude first, stupid..." + exit + endif +$LISPWORKS <<EOF +;;; Load the Haskell system. +(load "com/lispworks/patches/safe-fo-closure.wfasl") +(make-package "MUMBLE-IMPLEMENTATION" :use '("LISP")) +(load "cl-support/cl-init") +;;; Set various internal switches to appropriate values for running +;;; Haskell code. +(proclaim '(optimize (speed 3) (safety 0) (compilation-speed 0))) +(setf *load-verbose* nil) +(setf *compile-verbose* nil) +(in-package :mumble-user) +(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) + ;; Need to reset pathname defaults + (setf lisp:*default-pathname-defaults* (lisp:truename "")) + (load-init-files) + (do () ('#f) + (lisp:with-simple-restart (restart-haskell "Restart Haskell.") + (heval)))) +(define (restart-haskell) + (lisp:invoke-restart 'restart-haskell)) +(lw:save-image "bin/new-lispworks-haskell" + :gc '#t + :normal-gc '#f ; don't reset gc parameters + :restart-function 'haskell-toplevel) +(lw:bye) +EOF diff --git a/com/lispworks/savesys-xlib b/com/lispworks/savesys-xlib new file mode 100755 index 0000000..d1e81a0 --- /dev/null +++ b/com/lispworks/savesys-xlib @@ -0,0 +1,52 @@ +#!/bin/csh +# +# savesys -- build a saved executable in bin/new-lispworks-haskell +# +# +cd $Y2 +setenv PRELUDEBIN $Y2/progs/prelude/lispworks +if !(-e $PRELUDEBIN/Prelude.wfasl) then + echo "Build the prelude first, stupid..." + exit + endif +setenv LIBRARYBIN $Y2/progs/lib/X11/lispworks +if !(-e $LIBRARYBIN/xlib.wfasl) then + echo "Build the xlib stuff first, silly..." + exit + endif +$LISPWORKS <<EOF +;;; Load the Haskell system. +(load "com/lispworks/patches/safe-fo-closure.wfasl") +(make-package "MUMBLE-IMPLEMENTATION" :use '("LISP")) +(load "cl-support/cl-init") +;;; Set various internal switches to appropriate values for running +;;; Haskell code. +(proclaim '(optimize (speed 3) (safety 0) (compilation-speed 0))) +(setf *load-verbose* nil) +(setf *compile-verbose* nil) +(in-package :mumble-user) +(setf *printers* '(compiling loading)) +(setf *optimizers* '()) +(setf *compile-interface* '#f) +;;; Load the prelude. +(compile/load *prelude-unit-filename*) +;;; Load the X support. +(compile/load "\$HASKELL_LIBRARY/X11/xlib") +(setf *haskell-compiler-update* + (string-append *haskell-compiler-update* "-X11")) +;;; Set up the saved system. +(define (haskell-toplevel) + ;; Need to reset pathname defaults + (setf lisp:*default-pathname-defaults* (lisp:truename "")) + (load-init-files) + (do () ('#f) + (lisp:with-simple-restart (restart-haskell "Restart Haskell.") + (heval)))) +(define (restart-haskell) + (lisp:invoke-restart 'restart-haskell)) +(lw:save-image "bin/new-lispworks-clx-haskell" + :gc '#t + :normal-gc '#f ; don't reset gc parameters + :restart-function 'haskell-toplevel) +(lw:bye) +EOF |