1.0.30.35: turn SB-INTROSPECT into an ASDF system
[sbcl.git] / contrib / sb-introspect / sb-introspect.asd
1 ;;; -*-  Lisp -*-
2
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
6 ;;;; This software is derived from the CMU CL system, which was
7 ;;;; written at Carnegie Mellon University and released into the
8 ;;;; public domain. The software is in the public domain and is
9 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
10 ;;;; files for more information.
11
12 (defpackage :sb-introspect-system
13   (:use :asdf :cl))
14
15 (in-package :sb-introspect-system)
16
17 (defsystem :sb-introspect
18   :components ((:file "introspect")))
19
20 (defmethod perform :after ((o load-op) (c (eql (find-system :sb-introspect))))
21   (provide 'sb-introspect))
22
23 (defmethod perform ((o test-op) (c (eql (find-system :sb-introspect))))
24   (operate 'load-op :sb-introspect-tests)
25   (operate 'test-op :sb-introspect-tests))
26
27 (defclass plist-file (cl-source-file)
28   ((source-plist
29     :initform nil
30     :initarg :source-plist
31     :reader plist-file-source-plist)))
32
33 (defmethod perform ((op compile-op) (com plist-file))
34   (with-compilation-unit (:source-plist (plist-file-source-plist com))
35     (call-next-method)))
36
37 (defmethod perform ((op load-op) (com plist-file))
38   (with-compilation-unit (:source-plist (plist-file-source-plist com))
39     (call-next-method)))
40
41 (defsystem :sb-introspect-tests
42   :depends-on (:sb-introspect :sb-rt)
43   :components ((:file "xref-test-data")
44                (:file "xref-test" :depends-on ("xref-test-data"))
45                (:plist-file "test" :source-plist (:test-outer "OUT"))
46                (:file "test-driver" :depends-on ("test"))))
47
48 (defmethod perform ((op test-op) (com (eql (find-system :sb-introspect-tests))))
49   (or (funcall (intern "DO-TESTS" (find-package "SB-RT")))
50       (error "~S failed" 'test-op)))