Remove the at-system-definition-load-time closure-common dependency
[cxml.git] / cxml.asd
blobfa834ffef4de73c73d8568c8df0a1f18b130ac70
1 (defpackage :cxml-system
2   (:use :asdf :cl))
3 (in-package :cxml-system)
5 (defclass dummy-cxml-component () ())
7 (defmethod asdf:component-name ((c dummy-cxml-component))
8   :cxml)
10 (progn
11   (format t "~&;;; Checking for wide character support...")
12   (force-output)
13   (flet ((test (code)
14            (and (< code char-code-limit) (code-char code))))
15     (cond
16       ((not (test 50000))
17        (format t " no, reverting to octet strings.~%")
18        #+rune-is-character
19        (error "conflicting unicode configuration.  Please recompile.")
20        (pushnew :rune-is-integer *features*))
21       ((code-char 70000)
22        (when (test #xD800)
23          (format t " WARNING: Lisp implementation doesn't use UTF-16, ~
24                      but accepts surrogate code points.~%"))
25        (format t " yes, using code points.~%")
26        #+(or rune-is-integer rune-is-utf-16)
27        (error "conflicting unicode configuration.  Please recompile.")
28        (pushnew :rune-is-character *features*))
29       (t
30        (format t " yes, using UTF-16.~%")
31        #+(or rune-is-integer (and rune-is-character (not rune-is-utf-16)))
32        (error "conflicting unicode configuration.  Please recompile.")
33        (pushnew :rune-is-utf-16 *features*)
34        (pushnew :rune-is-character *features*)))))
36 (defclass closure-source-file (cl-source-file) ())
38 #+scl
39 (pushnew 'uri-is-namestring *features*)
41 #+sbcl
42 (defmethod perform :around ((o compile-op) (s closure-source-file))
43   ;; shut up already.  Correctness first.
44   (handler-bind ((sb-ext:compiler-note #'muffle-warning))
45     (let (#+sbcl (*compile-print* nil))
46       (call-next-method))))
48 (asdf:defsystem :cxml-xml
49     :default-component-class closure-source-file
50     :pathname (merge-pathnames
51                "xml/"
52                (make-pathname :name nil :type nil :defaults *load-truename*))
53     :components
54     ((:file "package")
55      (:file "util"            :depends-on ("package"))
56      (:file "sax-handler")
57      (:file "xml-name-rune-p" :depends-on ("package" "util"))
58      (:file "split-sequence"  :depends-on ("package"))
59      (:file "xml-parse"       :depends-on ("package" "util" "sax-handler" "split-sequence" "xml-name-rune-p"))
60      (:file "unparse"         :depends-on ("xml-parse"))
61      (:file "xmls-compat"     :depends-on ("xml-parse"))
62      (:file "recoder"         :depends-on ("xml-parse"))
63      (:file "xmlns-normalizer" :depends-on ("xml-parse"))
64      (:file "space-normalizer" :depends-on ("xml-parse"))
65      (:file "catalog"         :depends-on ("xml-parse"))
66      (:file "sax-proxy"       :depends-on ("xml-parse"))
67      (:file "atdoc-configuration" :depends-on ("package")))
68     :depends-on (:closure-common :puri #-scl :trivial-gray-streams))
70 (defclass utf8dom-file (closure-source-file) ((of)))
72 (defmethod output-files ((operation compile-op) (c utf8dom-file))
73   (let* ((normal (car (call-next-method)))
74          (name (concatenate 'string (pathname-name normal) "-utf8")))
75     (list (make-pathname :name name :defaults normal))))
77 ;; must be an extra method because of common-lisp-controller's :around method 
78 (defmethod output-files :around ((operation compile-op) (c utf8dom-file))
79   (let ((x (call-next-method)))
80     (setf (slot-value c 'of) (car x))
81     x))
83 (defmethod perform ((o load-op) (c utf8dom-file))
84   (load (slot-value c 'of)))
86 (defmethod perform ((operation compile-op) (c utf8dom-file))
87   (let ((*features* (cons 'utf8dom-file *features*))
88         (*readtable*
89          (symbol-value (find-symbol "*UTF8-RUNES-READTABLE*"
90                                     :closure-common-system))))
91     (call-next-method)))
93 (asdf:defsystem :cxml-dom
94     :default-component-class closure-source-file
95     :pathname (merge-pathnames
96                "dom/"
97                (make-pathname :name nil :type nil :defaults *load-truename*))
98     :components
99     ((:file "package")
100      (:file rune-impl :pathname "dom-impl" :depends-on ("package"))
101      (:file rune-builder :pathname "dom-builder" :depends-on (rune-impl))
102      #+rune-is-integer
103      (utf8dom-file utf8-impl :pathname "dom-impl" :depends-on ("package"))
104      #+rune-is-integer
105      (utf8dom-file utf8-builder :pathname "dom-builder" :depends-on (utf8-impl))
106      (:file "dom-sax"         :depends-on ("package")))
107     :depends-on (:cxml-xml))
109 (asdf:defsystem :cxml-klacks
110     :default-component-class closure-source-file
111     :pathname (merge-pathnames
112                "klacks/"
113                (make-pathname :name nil :type nil :defaults *load-truename*))
114     :serial t
115     :components
116     ((:file "package")
117      (:file "klacks")
118      (:file "klacks-impl")
119      (:file "tap-source"))
120     :depends-on (:cxml-xml))
122 (asdf:defsystem :cxml-test
123     :default-component-class closure-source-file
124     :pathname (merge-pathnames
125                "test/"
126                (make-pathname :name nil :type nil :defaults *load-truename*))
127     :components ((:file "domtest") (:file "xmlconf"))
128     :depends-on (:cxml-xml :cxml-klacks :cxml-dom))
130 (asdf:defsystem :cxml
131     :components ()
132     :depends-on (:cxml-dom :cxml-klacks :cxml-test))