Workarounds fuer Probleme beim Kompilieren unter Allegro
[cxml.git] / cxml.asd
blob51cfb50ef834f9ea18d7c33481468a96fad3027d
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       ((test 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 #+asdf2 "xml/"
51               #-asdf2 (merge-pathnames
52                        "xml/"
53                        (make-pathname :name nil :type nil :defaults *load-truename*))
54     :components
55     ((:file "package")
56      (:file "util"            :depends-on ("package"))
57      (:file "sax-handler")
58      (:file "xml-name-rune-p" :depends-on ("package" "util"))
59      (:file "split-sequence"  :depends-on ("package"))
60      (:file "xml-parse"       :depends-on ("package" "util" "sax-handler" "split-sequence" "xml-name-rune-p"))
61      (:file "unparse"         :depends-on ("xml-parse"))
62      (:file "xmls-compat"     :depends-on ("xml-parse"))
63      (:file "recoder"         :depends-on ("xml-parse"))
64      (:file "xmlns-normalizer" :depends-on ("xml-parse"))
65      (:file "space-normalizer" :depends-on ("xml-parse"))
66      (:file "catalog"         :depends-on ("xml-parse"))
67      (:file "sax-proxy"       :depends-on ("xml-parse"))
68      (:file "atdoc-configuration" :depends-on ("package")))
69     :depends-on (:closure-common :puri #-scl :trivial-gray-streams))
71 (defclass utf8dom-file (closure-source-file) ((of)))
73 (defmethod output-files ((operation compile-op) (c utf8dom-file))
74   (let* ((normal (car (call-next-method)))
75          (name (concatenate 'string (pathname-name normal) "-utf8")))
76     (list (make-pathname :name name :defaults normal))))
78 ;; must be an extra method because of common-lisp-controller's :around method 
79 (defmethod output-files :around ((operation compile-op) (c utf8dom-file))
80   (let ((x (call-next-method)))
81     (setf (slot-value c 'of) (car x))
82     x))
84 (defmethod perform ((o load-op) (c utf8dom-file))
85   (load (slot-value c 'of)))
87 (defmethod perform ((operation compile-op) (c utf8dom-file))
88   (let ((*features* (cons 'utf8dom-file *features*))
89         (*readtable*
90          (symbol-value (find-symbol "*UTF8-RUNES-READTABLE*"
91                                     :closure-common-system))))
92     (call-next-method)))
94 (asdf:defsystem :cxml-dom
95     :default-component-class closure-source-file
96     :pathname #+asdf2 "dom/"
97               #-asdf2 (merge-pathnames
98                        "dom/"
99                        (make-pathname :name nil :type nil :defaults *load-truename*))
100     :components
101     ((:file "package")
102      (:file rune-impl :pathname "dom-impl" :depends-on ("package"))
103      (:file rune-builder :pathname "dom-builder" :depends-on (rune-impl))
104      #+rune-is-integer
105      (utf8dom-file utf8-impl :pathname "dom-impl" :depends-on ("package"))
106      #+rune-is-integer
107      (utf8dom-file utf8-builder :pathname "dom-builder" :depends-on (utf8-impl))
108      (:file "dom-sax"         :depends-on ("package")))
109     :depends-on (:cxml-xml))
111 (asdf:defsystem :cxml-klacks
112     :default-component-class closure-source-file
113     :pathname #+asdf2 "klacks/"
114               #-asdf2 (merge-pathnames
115                        "klacks/"
116                        (make-pathname :name nil :type nil :defaults *load-truename*))
117     :serial t
118     :components
119     ((:file "package")
120      (:file "klacks")
121      (:file "klacks-impl")
122      (:file "tap-source"))
123     :depends-on (:cxml-xml))
125 (asdf:defsystem :cxml-test
126     :default-component-class closure-source-file
127     :pathname #+asdf2 "test/"
128               #-asdf2 (merge-pathnames
129                        "test/"
130                        (make-pathname :name nil :type nil :defaults *load-truename*))
131     :components ((:file "domtest") (:file "xmlconf"))
132     :depends-on (:cxml-xml :cxml-klacks :cxml-dom))
134 (asdf:defsystem :cxml
135     :components ()
136     :depends-on (:cxml-dom :cxml-klacks #-allegro :cxml-test))