diff options
author | Yale AI Dept <ai@nebula.cs.yale.edu> | 1993-07-14 13:08:00 -0500 |
---|---|---|
committer | Duncan McGreggor <duncan.mcgreggor@rackspace.com> | 1993-07-14 13:08:00 -0500 |
commit | 4e987026148fe65c323afbc93cd560c07bf06b3f (patch) | |
tree | 26ae54177389edcbe453d25a00c38c2774e8b7d4 /com/akcl |
Import to github.
Diffstat (limited to 'com/akcl')
-rw-r--r-- | com/akcl/README | 39 | ||||
-rwxr-xr-x | com/akcl/build-prelude | 35 | ||||
-rwxr-xr-x | com/akcl/clean | 4 | ||||
-rwxr-xr-x | com/akcl/compile | 11 | ||||
-rwxr-xr-x | com/akcl/savesys | 46 |
5 files changed, 135 insertions, 0 deletions
diff --git a/com/akcl/README b/com/akcl/README new file mode 100644 index 0000000..1e997d5 --- /dev/null +++ b/com/akcl/README @@ -0,0 +1,39 @@ +This directory contains command scripts used for building Yale Haskell +from the source distribution under AKCL. We have been using +AKCL version 1.615 on a Sparc, but we don't expect that there would +be difficulties in building with AKCL 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 AKCL 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/akcl. + +* 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 "akcl" 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-akcl-haskell". Try + it out. If it works, you should rename it to "bin/akcl-haskell". + Make sure that HASKELLPROG (in the haskell-setup script) is correct. + +A word of warning: we have noticed that AKCL is slower by a factor of +three or four than the other Common Lisps we've ported Yale Haskell +to. We don't really support AKCL and we encourage you to buy one of +the commercial Lisp products instead. + +We do not support our Haskell-to-CLX interface under AKCL, either. + + + + diff --git a/com/akcl/build-prelude b/com/akcl/build-prelude new file mode 100755 index 0000000..8f61827 --- /dev/null +++ b/com/akcl/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/akcl +rm $PRELUDEBIN/old* +if (-e $PRELUDEBIN/Prelude.o) then + foreach i ($PRELUDEBIN/Prelude*.{o,scm}) + mv $i $PRELUDEBIN/old-$i:t + end + endif +$AKCL <<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) (compilation-speed 0))) +(make-package "MUMBLE-IMPLEMENTATION" :use '("LISP")) +(load "cl-support/cl-init.lisp") +;; 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. +;; Also have it break up the prelude code file into many small pieces +;; to avoid overwhelming the C compiler. +(setf *code-chunk-size* 100) +(setf *compile-interface* '#f) +(compile/compile *prelude-unit-filename*) +(lisp:bye) +EOF diff --git a/com/akcl/clean b/com/akcl/clean new file mode 100755 index 0000000..aba58af --- /dev/null +++ b/com/akcl/clean @@ -0,0 +1,4 @@ +#!/bin/csh +# +# delete AKCL binaries +'rm' $Y2/*/akcl/*.o diff --git a/com/akcl/compile b/com/akcl/compile new file mode 100755 index 0000000..3ed28f5 --- /dev/null +++ b/com/akcl/compile @@ -0,0 +1,11 @@ +#!/bin/csh +# +# compile -- compile the Yale Haskell system from scratch. +# +# +cd $Y2 +$AKCL <<EOF +;; Default optimize settings for AKCL are (speed 3) (safety 0) +(load "support/cl-support/cl-init.lisp") +(bye) +EOF diff --git a/com/akcl/savesys b/com/akcl/savesys new file mode 100755 index 0000000..c01db2b --- /dev/null +++ b/com/akcl/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/akcl +if !(-e $PRELUDEBIN/Prelude.o) then + echo "Build the prelude first, stupid..." + exit + endif +$AKCL <<EOF +;;; Load the Haskell system. +(make-package "MUMBLE-IMPLEMENTATION" :use '("LISP")) +(load "cl-support/cl-init.lisp") +;;; 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 compiler:*compile-verbose* nil) +(in-package :mumble-user) +(setf *printers* '(compiling loading)) +(setf *optimizers* '()) +(setf *compile-interface* '#f) +(setf *code-chunk-size* 100) +;;; Load the prelude. +(compile/load *prelude-unit-filename*) +;;; Set up the saved system. +;;; AKCL doesn't have the new CL condition system, so define the +;;; restart function using catch and throw. +(define (haskell-toplevel) + (setf lisp:*package* (lisp:find-package :mumble-user)) + (setf lisp:*default-pathname-defaults* (lisp:truename "./")) + (load-init-files) + (do () ('#f) + (lisp:catch 'restart-haskell + (heval)))) +(define (restart-haskell) + (lisp:throw 'restart-haskell '#f)) +;;; Have to do garbage collection and set-up of top-level function +;;; by hand before calling save. +;;; AKCL exits automatically after calling save. +(lisp:gbc 3) +(setf system::*top-level-hook* (function haskell-toplevel)) +(lisp:save "bin/new-akcl-haskell") +EOF |