File: roslisp-sbcl-init

package info (click to toggle)
ros-roslisp 1.9.25-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 836 kB
  • sloc: lisp: 5,271; python: 632; xml: 511; sh: 192; makefile: 48
file content (26 lines) | stat: -rw-r--r-- 1,142 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
;; Initialization for sbcl when compiling roslisp

(require :asdf)

;;; Handle recompilation of fasls with wrong version.
(defmethod asdf:perform :around ((o asdf:load-op)
                                 (c asdf:cl-source-file))
  (handler-case (call-next-method o c)
    ;; If a fasl was stale, try to recompile and load (once).
    (sb-ext:invalid-fasl ()
      (asdf:perform (make-instance 'asdf:compile-op) c)
      (call-next-method))))

;;; Add appropriate paths for asdf to look for ros-load-manifest. We
;;; use the path of this file as base.
(unless (asdf:find-system :ros-load-manifest nil)
  (unless *load-truename*
    (error 'simple-error
           :format-control "*LOAD-TRUENAME* not bound. This script needs to be loaded with the --load parameter."))
  (let ((load-manifest-directory (parse-namestring
                                  (concatenate 'string
                                               (directory-namestring *load-truename*)
                                               "../load-manifest/"))))
    (push load-manifest-directory asdf:*central-registry*)))

(asdf:operate 'asdf:load-op :ros-load-manifest)