diff options
Diffstat (limited to 'com/lucid')
-rw-r--r-- | com/lucid/README | 39 | ||||
-rwxr-xr-x | com/lucid/build-prelude | 36 | ||||
-rwxr-xr-x | com/lucid/build-xlib | 15 | ||||
-rwxr-xr-x | com/lucid/clean | 5 | ||||
-rwxr-xr-x | com/lucid/compile | 13 | ||||
-rwxr-xr-x | com/lucid/savesys | 44 | ||||
-rwxr-xr-x | com/lucid/savesys-xlib | 55 |
7 files changed, 207 insertions, 0 deletions
diff --git a/com/lucid/README b/com/lucid/README new file mode 100644 index 0000000..508ed40 --- /dev/null +++ b/com/lucid/README @@ -0,0 +1,39 @@ +This directory contains command scripts used for building Yale Haskell +from the source distribution under Lucid Common Lisp. We have been using +Lucid version 4.0.0 on a Sparc, but we don't expect that there would +be difficulties in building with Lucid on other platforms. + +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 and LUCID 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/lucid. + +* 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 "lucid" 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-lucid-haskell". Try + it out. If it works, you should rename it to "bin/lucid-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 + 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.). + +Important note for Emacs users: We've been told that Lucid provides +some patches to GNU Emacs that cause the Haskell Emacs mode not to work. +(Apparently these patches redefine some of the interprocess communication +functions in an incompatible way.) Use a standard Emacs. diff --git a/com/lucid/build-prelude b/com/lucid/build-prelude new file mode 100755 index 0000000..aee2274 --- /dev/null +++ b/com/lucid/build-prelude @@ -0,0 +1,36 @@ +#!/bin/csh +# +# build-prelude -- recompile the prelude, saving the old one as old-prelude.* +# +# +cd $Y2 +setenv PRELUDEBIN $Y2/progs/prelude/lucid +if (-e $PRELUDEBIN/Prelude.sbin) then + rm $PRELUDEBIN/old* + foreach i ($PRELUDEBIN/Prelude*.{sbin,scm}) + mv $i $PRELUDEBIN/old-$i:t + end + endif +$LUCID <<EOF +;; Need a big heap to compile the prelude. +(lcl:change-memory-management :expand 512 :growth-limit 2048) +;; This will make sure any files that need to get compiled will be +;; compiled with Lucid's production compiler. 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))) +(make-package "MUMBLE-IMPLEMENTATION" :use '("LISP")) +(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. +;; Use production compiler on prelude code and split it up into pieces. +;; Use fast development compiler on interface. +(setf *code-chunk-size* 200) +(setf *compile-interface* '#t) +(setf *interface-code-quality* 2) +(setf *interface-chunk-size* '#f) +(compile/compile *prelude-unit-filename*) +(lcl:quit) +EOF diff --git a/com/lucid/build-xlib b/com/lucid/build-xlib new file mode 100755 index 0000000..960bd13 --- /dev/null +++ b/com/lucid/build-xlib @@ -0,0 +1,15 @@ +#!/bin/csh +# +# build-xlib -- recompile the xlib stuff +# +# +cd $Y2 +setenv CLXFILE /cs/licensed/sclisp-4.0/windows-x.sbin +setenv LIBRARYBIN $Y2/progs/lib/bin/lucid +rm $LIBRARYBIN/xlib*.sbin +bin/haskell <<EOF +:(lcl:change-memory-management :expand 512) +:(load "\$CLXFILE") +:(setf *code-quality* 3) +:compile \$HASKELL_LIBRARY/X11/xlib +EOF diff --git a/com/lucid/clean b/com/lucid/clean new file mode 100755 index 0000000..4c72d9b --- /dev/null +++ b/com/lucid/clean @@ -0,0 +1,5 @@ +#!/bin/csh +# +# delete lucid binaries +'rm' $Y2/*/lucid/*.{sbin,rbin} + diff --git a/com/lucid/compile b/com/lucid/compile new file mode 100755 index 0000000..115156a --- /dev/null +++ b/com/lucid/compile @@ -0,0 +1,13 @@ +#!/bin/csh +# +# compile -- compile the Yale Haskell system from scratch. +# +# +cd $Y2 +$LUCID <<EOF +;; To get Lucid's development mode compiler, remove (compilation-speed 0) +(make-package "MUMBLE-IMPLEMENTATION" :use '("LISP")) +(proclaim '(optimize (speed 3) (safety 0) (compilation-speed 0))) +(load "cl-support/cl-init") +(quit) +EOF diff --git a/com/lucid/savesys b/com/lucid/savesys new file mode 100755 index 0000000..786f44e --- /dev/null +++ b/com/lucid/savesys @@ -0,0 +1,44 @@ +#!/bin/csh +# +# savesys -- build a saved executable in bin/new-lucid-haskell +# +# +cd $Y2 +setenv PRELUDEBIN $Y2/progs/prelude/lucid +if !(-e $PRELUDEBIN/Prelude.sbin) then + echo "Build the prelude first, stupid..." + exit + endif +$LUCID <<EOF +;;; Load the Haskell system. +(make-package "MUMBLE-IMPLEMENTATION" :use '("LISP")) +(setf lcl:*record-source-files* nil) +(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))) +(lcl:compiler-options :file-messages nil) +(setf lcl:*redefinition-action* nil) +(setf *load-verbose* nil) +(in-package :mumble-user) +(setf *printers* '(compiling loading)) +(setf *optimizers* '()) +(setf *compile-interface* '#t) +(setf *interface-code-quality* 1) +(setf *code-chunk-size* 200) +;;; Load the prelude. +(compile/load *prelude-unit-filename*) +;;; Set up the saved system. +(define (haskell-toplevel) + (load-init-files) + (do () ('#f) + (lcl:with-simple-restart (restart-haskell "Restart Haskell.") + (heval)))) +(define (restart-haskell) + (lcl:invoke-restart 'restart-haskell)) +(lcl:gc) +(lcl:disksave "bin/new-lucid-haskell" + :reserved-free-segments 64 :dynamic-free-segments 25 + :restart-function 'haskell-toplevel :full-gc '#t) +(lcl:quit) +EOF diff --git a/com/lucid/savesys-xlib b/com/lucid/savesys-xlib new file mode 100755 index 0000000..0d5a959 --- /dev/null +++ b/com/lucid/savesys-xlib @@ -0,0 +1,55 @@ +#!/bin/csh +# +# savesys-xlib -- build a saved executable in bin/new-lucid-clx-haskell +# +# +cd $Y2 +setenv PRELUDEBIN $Y2/progs/prelude/lucid +if !(-e $PRELUDEBIN/Prelude.sbin) then + echo "Build the prelude first, stupid..." + exit + endif +setenv CLXFILE /cs/licensed/sclisp-4.0/windows-x.sbin +setenv LIBRARYBIN $Y2/progs/lib/bin/lucid +if !(-e $LIBRARYBIN/xlib.sbin) then + echo "Build the xlib stuff first, silly..." + exit + endif +$LUCID <<EOF +;;; Load the Haskell system. +(make-package "MUMBLE-IMPLEMENTATION" :use '("LISP")) +(setf lcl:*record-source-files* nil) +(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))) +(lcl:compiler-options :file-messages nil) +(setf lcl:*redefinition-action* nil) +(setf *load-verbose* nil) +(in-package :mumble-user) +(setf *printers* '(compiling loading)) +(setf *optimizers* '()) +(setf *compile-interface* '#t) +(setf *interface-code-quality* 1) +(setf *code-chunk-size* 200) +;;; 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) + (lcl:with-simple-restart (restart-haskell "Restart Haskell.") + (heval)))) +(define (restart-haskell) + (lcl:invoke-restart 'restart-haskell)) +(lcl:gc) +(lcl:disksave "bin/new-lucid-clx-haskell" + :reserved-free-segments 64 :dynamic-free-segments 25 + :restart-function 'haskell-toplevel :full-gc '#t) +(lcl:quit) +EOF |