|
6 | 6 | ;; This is only useful if you want to start a Swank server in a Lisp
|
7 | 7 | ;; processes that doesn't run under Emacs. Lisp processes created by
|
8 | 8 | ;; `M-x slime' automatically start the server.
|
9 |
| -;; |
10 |
| -;; If Swank is already loaded (e.g. the Lisp is running under SLIME), |
11 |
| -;; then attempts to load it via asdf do nothing, except for emitting a |
12 |
| -;; warning if Swank is to be loaded from a location that's different |
13 |
| -;; from the location where it was originally loaded from. This |
14 |
| -;; behavior is intended to prevent loading a possibly incompatible |
15 |
| -;; version of Swank with a running SLIME. |
16 | 9 |
|
17 | 10 | ;; Usage:
|
18 | 11 | ;;
|
19 |
| -;; (require :swank) |
| 12 | +;; (asdf:load-system "swank") |
20 | 13 | ;; (swank:create-swank-server PORT) => ACTUAL-PORT
|
21 | 14 | ;;
|
22 | 15 | ;; (PORT can be zero to mean "any available port".)
|
|
26 | 19 | ;; This code has been placed in the Public Domain. All warranties
|
27 | 20 | ;; are disclaimed.
|
28 | 21 |
|
29 |
| -(defclass swank-loader-file (asdf:cl-source-file) ()) |
30 |
| - |
31 |
| -;;;; after loading run init |
32 |
| - |
33 |
| -(defmethod asdf:perform ((o asdf:load-op) (f swank-loader-file)) |
34 |
| - (let ((var (uiop:find-symbol* '#:*source-directory* '#:swank-loader nil))) |
35 |
| - (cond ((and var (boundp var)) |
36 |
| - (let ((loaded (truename (symbol-value var))) |
37 |
| - (requested (truename (asdf:system-source-directory "swank")))) |
38 |
| - (unless (equal requested loaded) |
39 |
| - (warn "~@<Not loading SWANK from ~S because it was ~ |
40 |
| - already loaded from ~S.~:@>" |
41 |
| - requested loaded)))) |
42 |
| - (t |
43 |
| - ;; swank-loader computes its own source/fasl relation based |
44 |
| - ;; on the TRUENAME of the loader file, so we need a "manual" |
45 |
| - ;; CL:LOAD invocation here. |
46 |
| - (load (asdf::component-pathname f)) |
47 |
| - ;; After loading, run the swank-loader init routines. |
48 |
| - (funcall (read-from-string "swank-loader::init") :reload t))))) |
| 22 | +(asdf:defsystem "swank" |
| 23 | + :components ((:file "swank-loader") |
| 24 | + (:file "packages") |
| 25 | + (:file "xref" :if-feature :clisp) |
| 26 | + (:file "metering" :if-feature (:or :clozure :clisp :clasp)) |
| 27 | + (:module "backend" |
| 28 | + :pathname "swank" |
| 29 | + :components ((:file "backend") |
| 30 | + (:file "source-path-parser" :if-feature (:or :cmu :scl :sbcl)) |
| 31 | + (:file "source-file-cache" :if-feature (:or :cmu :scl :sbcl)) |
| 32 | + (:file "cmucl" :if-feature :cmu) |
| 33 | + (:file "scl" :if-feature :scl) |
| 34 | + (:file "sbcl" :if-feature :sbcl) |
| 35 | + (:file "ccl" :if-feature :clozure) |
| 36 | + (:file "lispworks" :if-feature :lispworks) |
| 37 | + (:file "allegro" :if-feature :allegro) |
| 38 | + (:file "clisp" :if-feature :clisp) |
| 39 | + (:file "abcl" :if-feature :armedbear) |
| 40 | + (:file "corman" :if-feature :cormanlisp) |
| 41 | + (:file "ecl" :if-feature :ecl) |
| 42 | + (:file "clasp" :if-feature :clasp) |
| 43 | + (:file "mkcl" :if-feature :mkcl) |
| 44 | + (:file "mezzano" :if-feature :mezzano) |
| 45 | + (:file "gray" :if-feature (:not :armedbear)) |
| 46 | + (:file "match") |
| 47 | + (:file "rpc"))) |
| 48 | + (:file "swank"))) |
49 | 49 |
|
50 |
| -(asdf:defsystem :swank |
51 |
| - :default-component-class swank-loader-file |
52 |
| - :components ((:file "swank-loader"))) |
| 50 | +(asdf:defsystem "swank/exts" |
| 51 | + :depends-on ("swank") |
| 52 | + :pathname "contrib" |
| 53 | + :components ((:file "swank-util") |
| 54 | + (:file "swank-repl") |
| 55 | + (:file "swank-c-p-c") |
| 56 | + (:file "swank-arglists") |
| 57 | + (:file "swank-fuzzy") |
| 58 | + (:file "swank-fancy-inspector") |
| 59 | + (:file "swank-presentations") |
| 60 | + (:file "swank-presentation-streams") |
| 61 | + (:file "swank-asdf" :if-feature (:or :asdf2 :asdf3 :sbcl :ecl)) |
| 62 | + (:file "swank-package-fu") |
| 63 | + (:file "swank-hyperdoc") |
| 64 | + (:file "swank-sbcl-exts" :if-feature :sbcl) |
| 65 | + (:file "swank-mrepl") |
| 66 | + (:file "swank-trace-dialog") |
| 67 | + (:file "swank-macrostep") |
| 68 | + (:file "swank-quicklisp"))) |
0 commit comments