Commit 7b99171d authored by Helmut Eller's avatar Helmut Eller

Place the fasl files of different implementations in different

directories.  Patch by Peter Seibel.
parent c44821f3
......@@ -7,7 +7,7 @@
;;; This code has been placed in the Public Domain. All warranties
;;; are disclaimed.
;;; $Id: swank-loader.lisp,v 1.16 2004/02/05 05:57:04 wjenkner Exp $
;;; $Id: swank-loader.lisp,v 1.17 2004/02/18 07:31:59 heller Exp $
(cl:defpackage :swank-loader
......@@ -35,12 +35,25 @@
#+clisp '("xref" "metering" "swank-clisp" "swank-gray")
(defparameter *lisp-name*
#+cmu "cmu"
#+sbcl "sbcl"
#+openmcl "openmcl"
#+lispworks "lispworks"
#+allegro "allegro"
#+clisp "clisp")
(defparameter *swank-pathname* (make-swank-pathname "swank"))
(defun file-newer-p (new-file old-file)
"Returns true if NEW-FILE is newer than OLD-FILE."
(> (file-write-date new-file) (file-write-date old-file)))
(defun binary-pathname (source-pathname)
(make-pathname :directory `(:relative "fasl" ,*lisp-name*))
(merge-pathnames (compile-file-pathname source-pathname))))
(defun compile-files-if-needed-serially (files)
"Compile each file in FILES if the source is newer than
its corresponding binary, or the file preceding it was
......@@ -48,14 +61,15 @@ recompiled."
(with-compilation-unit ()
(let ((needs-recompile nil))
(dolist (source-pathname files)
(let ((binary-pathname (compile-file-pathname source-pathname)))
(let ((binary-pathname (binary-pathname source-pathname)))
(when (or needs-recompile
(not (probe-file binary-pathname))
(file-newer-p source-pathname binary-pathname))
(format t "~&;; Compiling ~A...~%" source-pathname)
(compile-file source-pathname)
(ensure-directories-exist binary-pathname)
(compile-file source-pathname :output-file binary-pathname)
(setq needs-recompile t))
(load binary-pathname))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment