/[slime]/slime/swank-loader.lisp
ViewVC logotype

Diff of /slime/swank-loader.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.106 by heller, Tue Jun 22 10:02:49 2010 UTC revision 1.107 by alendvai, Fri Oct 15 22:53:45 2010 UTC
# Line 124  Return nil if nothing appropriate is ava Line 124  Return nil if nothing appropriate is ava
124      (and s (symbol-name (read s)))))      (and s (symbol-name (read s)))))
125    
126  (defun default-fasl-dir ()  (defun default-fasl-dir ()
127    (merge-pathnames    (or
128     (make-pathname     ;; If ASDF is available then store Slime's fasl's where ASDF stores them.
129      :directory `(:relative ".slime" "fasl"     (let ((translate-fn (find-symbol "COMPILE-FILE-PATHNAME*" :asdf)))
130                   ,@(if (slime-version-string) (list (slime-version-string)))       (when translate-fn
131                   ,(unique-dir-name)))         (make-pathname
132     (user-homedir-pathname)))          :name nil :type nil
133            :defaults (funcall translate-fn
134                               (make-pathname :name "foo"
135                                              :defaults *source-directory*)))))
136       (merge-pathnames
137        (make-pathname
138         :directory `(:relative ".slime" "fasl"
139                                ,@(if (slime-version-string) (list (slime-version-string)))
140                                ,(unique-dir-name)))
141        (user-homedir-pathname))))
142    
143  (defvar *fasl-directory* (default-fasl-dir)  (defvar *fasl-directory* (default-fasl-dir)
144    "The directory where fasl files should be placed.")    "The directory where fasl files should be placed.")
# Line 234  If LOAD is true, load the fasl file." Line 243  If LOAD is true, load the fasl file."
243    
244  (defun load-swank (&key (src-dir *source-directory*)  (defun load-swank (&key (src-dir *source-directory*)
245                          (fasl-dir *fasl-directory*))                          (fasl-dir *fasl-directory*))
246      (when (find-package :asdf)
247        ;; Make sure our swank.asd is visible to ASDF.
248        (eval
249         (let ((*package* (find-package :swank-loader)))
250           (read-from-string
251            "(let ((swank-system (asdf:find-system :swank nil)))
252              (unless (and swank-system
253                           (equal (asdf:component-pathname swank-system)
254                                  (merge-pathnames \"swank.asd\" *source-directory*)))
255                (push *source-directory* asdf:*central-registry*)))"))))
256    (compile-files (src-files *swank-files* src-dir) fasl-dir t)    (compile-files (src-files *swank-files* src-dir) fasl-dir t)
257    (funcall (q "swank::before-init")    (funcall (q "swank::before-init")
258             (slime-version-string)             (slime-version-string)

Legend:
Removed from v.1.106  
changed lines
  Added in v.1.107

  ViewVC Help
Powered by ViewVC 1.1.5