;;; Loads ECL's separate compiler and linker where it is not built-in. ;;; Remove the "nil" and adjust the path for ECL if necessary. #+(and nil ecl (not osx)) (require "/usr/local/lib/ecl/cmp") ;;; Set up "readable gensysms". (defvar *gensym-counter* 0) (defun %gensym () (intern (format nil "~~~A" (incf *gensym-counter*)))) (setf *compile-verbose* nil) (setf *compile-print* nil) #+openmcl (progn (setf ccl::*restore-lisp-functions* 'repl)) (defvar +proj-dir+ "~/slate/") #+openmcl (setf +proj-dir+ (ccl::current-directory-name)) ;;; What files constitute the compiler. Use "cache" or "no-cache" depending on ;;; preference for more caching or smaller size. (defconstant +files+ '("object" "no-cache" "compiler" "prims" "repl")) ;;; Compile the files. (let ((cmp (or #+ecl (lambda (name) (compile-file name :system-p t)) #+openmcl (lambda (name) (os::import (os::path-join +proj-dir+ name))) (lambda (name) (compile-file name))))) (mapc cmp +files+)) ;;; Output the binary. #+ecl (setf compiler::*cc-flags* "-g -I.") #+ecl (c:build-program "slate" :lisp-files +files+ :ld-flags '() :epilogue-code "funcall(1,_intern(\"REPL\",user_package));") #+openmcl (ccl::save-application (os::path-join +proj-dir+ "slate"))