# Notes:
# 0) get beta.xerox.com:pub/tarfile-rev-4b and untar it
# 1) Make sure that the akcl version is >= 605
# 2) untar pcl-4b-akcl.tar.Z from obtained from rascal.ics.utexas.edu
# 3) % make all
# 4) if desired save an image:  % make saved_pcl 

SHELL=/bin/sh

LISP=akcl

PRELIM='(setq compiler::*compile-ordinaries* t)(load "sys-package.lisp")(load "sys-proclaim.lisp") (in-package "PCL")(setq *pathname-extensions* (cons "lisp" "o"))(push :turbo-closure *features*)(push :turbo-closure-env-size *features*)(setq *pcl-directory* (truename "./"))(load "defsys.lisp")'

all:	fix-boot
	echo ${PRELIM} '(pcl::compile-pcl)' | ${LISP}

saved_pcl:
	echo ${PRELIM} '(pcl::load-pcl)(si::save-system "saved_pcl")'  | ${LISP}


fix-boot:
	mv boot.lisp boot.lisp.orig
	cat boot.lisp.orig | sed -e "s:(parse-defmethod args):(parse-defmethod args)(and (fboundp (quote proclaim-method))(proclaim-method name lambda-list)):g" > boot.lisp
	touch fix-boot

tar:
	tar cvf - sys-*.lisp kcl-low.lisp makefile | compress -c > pcl-4b-akcl.tar.Z
