source: trunk/j/src/org/armedbear/lisp/swank-loader.lisp @ 7684

Last change on this file since 7684 was 7684, checked in by piso, 17 years ago

Work in progress.

File size: 2.2 KB
Line 
1;;; swank-loader.lisp
2;;;
3;;; Copyright (C) 2004 Peter Graves
4;;; $Id: swank-loader.lisp,v 1.4 2004-09-15 17:50:41 piso Exp $
5;;;
6;;; This program is free software; you can redistribute it and/or
7;;; modify it under the terms of the GNU General Public License
8;;; as published by the Free Software Foundation; either version 2
9;;; of the License, or (at your option) any later version.
10;;;
11;;; This program is distributed in the hope that it will be useful,
12;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with this program; if not, write to the Free Software
18;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19
20(in-package #:cl-user)
21
22#+abcl
23(sys:load-system-file "swank-package")
24
25#+sbcl
26(load (merge-pathnames "swank-package.lisp" *load-truename*))
27
28#+abcl
29(dolist (file '("swank-protocol.lisp"
30                "swank-abcl.lisp"
31                "swank.lisp"))
32  (let ((device (pathname-device *load-truename*)))
33    (cond ((and (pathnamep device)
34                (equalp (pathname-type device) "jar"))
35           (sys:load-system-file (pathname-name file)))
36          (t
37           (let* ((source-file (merge-pathnames file *load-truename*))
38                  (binary-file (compile-file-pathname source-file)))
39             (if (and (probe-file binary-file)
40                      (> (file-write-date binary-file) (file-write-date source-file)))
41                 (sys:load-system-file (file-namestring binary-file))
42                 (sys:load-system-file (file-namestring (compile-file source-file)))))))))
43
44#+sbcl
45(dolist (file '("swank-protocol.lisp"
46                "swank-sbcl.lisp"
47                "swank.lisp"))
48  (let* ((source-file (merge-pathnames file *load-truename*))
49         (binary-file (compile-file-pathname source-file)))
50    (if (and (probe-file binary-file)
51             (> (file-write-date binary-file) (file-write-date source-file)))
52        (load binary-file)
53        (load (compile-file source-file)))))
54
55#-j
56(funcall (intern (string '#:start-server) '#:swank))
Note: See TracBrowser for help on using the repository browser.