;;; -*-lisp-*- ;;; ;;; Build a runlisp image ;;; ;;; (c) 2006 Straylight/Edgeware ;;; ;;;----- Licensing notice --------------------------------------------------- ;;; ;;; This program is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 2 of the License, or ;;; (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with this program; if not, write to the Free Software Foundation, ;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #-ecl (load "runlisp" :verbose t) #+ecl (defpackage #:runlisp (:export #:run)) ;;; Build core file for CMU CL. #+cmu (save-lisp "runlisp-cmucl.core" :load-init-file nil :site-init nil :print-herald nil :process-command-line nil :batch-mode t :init-function (lambda () (if (runlisp:run) 0 127))) ;;; Build mem file for CLISP. #+clisp (saveinitmem "runlisp-clisp.mem") ;;; Build standalone binary for ECL. #+ecl (let ((fasl-skel #p"/var/cache/common-lisp-controller/0/ecl/thing.o")) (c:build-program "runlisp-ecl" :lisp-files (append '("runlisp.o") (mapcan (lambda (thing) (let ((comp (car thing))) (mapcar (lambda (file) (merge-pathnames (make-pathname :directory (list :relative comp) :name file) fasl-skel)) (cdr thing)))) '((#1="common-lisp-controller" #1#) ("asdf" "asdf") (#1# "post-sysdef-install")))) :init-name "init_runlisp_boot" :epilogue-code '(ext:quit (if (runlisp:run) 0 127)))) ;;; If we're not dead, die. (ext:quit 0) ;;;----- That's all, folks --------------------------------------------------