| 1 |
(defpackage :cxml-system |
|---|
| 2 |
(:use :asdf :cl)) |
|---|
| 3 |
(in-package :cxml-system) |
|---|
| 4 |
|
|---|
| 5 |
(defclass dummy-cxml-component () ()) |
|---|
| 6 |
|
|---|
| 7 |
(defmethod asdf:component-name ((c dummy-cxml-component)) |
|---|
| 8 |
:cxml) |
|---|
| 9 |
|
|---|
| 10 |
;; force loading of closure-common.asd, which installs *FEATURES* this |
|---|
| 11 |
;; file depends on. Use MISSING-DEPENDENCY for asdf-install. |
|---|
| 12 |
(unless (find-system :closure-common nil) |
|---|
| 13 |
(error 'missing-dependency |
|---|
| 14 |
:required-by (make-instance 'dummy-cxml-component) |
|---|
| 15 |
:version nil |
|---|
| 16 |
:requires :closure-common)) |
|---|
| 17 |
|
|---|
| 18 |
(defclass closure-source-file (cl-source-file) ()) |
|---|
| 19 |
|
|---|
| 20 |
#+scl |
|---|
| 21 |
(pushnew 'uri-is-namestring *features*) |
|---|
| 22 |
|
|---|
| 23 |
#+sbcl |
|---|
| 24 |
(defmethod perform :around ((o compile-op) (s closure-source-file)) |
|---|
| 25 |
;; shut up already. Correctness first. |
|---|
| 26 |
(handler-bind ((sb-ext:compiler-note #'muffle-warning)) |
|---|
| 27 |
(let (#+sbcl (*compile-print* nil)) |
|---|
| 28 |
(call-next-method)))) |
|---|
| 29 |
|
|---|
| 30 |
(asdf:defsystem :cxml-xml |
|---|
| 31 |
:default-component-class closure-source-file |
|---|
| 32 |
:pathname (merge-pathnames |
|---|
| 33 |
"xml/" |
|---|
| 34 |
(make-pathname :name nil :type nil :defaults *load-truename*)) |
|---|
| 35 |
:components |
|---|
| 36 |
((:file "package") |
|---|
| 37 |
(:file "util" :depends-on ("package")) |
|---|
| 38 |
(:file "sax-handler") |
|---|
| 39 |
(:file "xml-name-rune-p" :depends-on ("package" "util")) |
|---|
| 40 |
(:file "split-sequence" :depends-on ("package")) |
|---|
| 41 |
(:file "xml-parse" :depends-on ("package" "util" "sax-handler" "split-sequence" "xml-name-rune-p")) |
|---|
| 42 |
(:file "unparse" :depends-on ("xml-parse")) |
|---|
| 43 |
(:file "xmls-compat" :depends-on ("xml-parse")) |
|---|
| 44 |
(:file "recoder" :depends-on ("xml-parse")) |
|---|
| 45 |
(:file "xmlns-normalizer" :depends-on ("xml-parse")) |
|---|
| 46 |
(:file "space-normalizer" :depends-on ("xml-parse")) |
|---|
| 47 |
(:file "catalog" :depends-on ("xml-parse")) |
|---|
| 48 |
(:file "sax-proxy" :depends-on ("xml-parse"))) |
|---|
| 49 |
:depends-on (:closure-common :puri #-scl :trivial-gray-streams)) |
|---|
| 50 |
|
|---|
| 51 |
(defclass utf8dom-file (closure-source-file) ((of))) |
|---|
| 52 |
|
|---|
| 53 |
(defmethod output-files ((operation compile-op) (c utf8dom-file)) |
|---|
| 54 |
(let* ((normal (car (call-next-method))) |
|---|
| 55 |
(name (concatenate 'string (pathname-name normal) "-utf8"))) |
|---|
| 56 |
(list (make-pathname :name name :defaults normal)))) |
|---|
| 57 |
|
|---|
| 58 |
;; must be an extra method because of common-lisp-controller's :around method |
|---|
| 59 |
(defmethod output-files :around ((operation compile-op) (c utf8dom-file)) |
|---|
| 60 |
(let ((x (call-next-method))) |
|---|
| 61 |
(setf (slot-value c 'of) (car x)) |
|---|
| 62 |
x)) |
|---|
| 63 |
|
|---|
| 64 |
(defmethod perform ((o load-op) (c utf8dom-file)) |
|---|
| 65 |
(load (slot-value c 'of))) |
|---|
| 66 |
|
|---|
| 67 |
(defmethod perform ((operation compile-op) (c utf8dom-file)) |
|---|
| 68 |
(let ((*features* (cons 'utf8dom-file *features*)) |
|---|
| 69 |
(*readtable* |
|---|
| 70 |
(symbol-value (find-symbol "*UTF8-RUNES-READTABLE*" |
|---|
| 71 |
:closure-common-system)))) |
|---|
| 72 |
(call-next-method))) |
|---|
| 73 |
|
|---|
| 74 |
(asdf:defsystem :cxml-dom |
|---|
| 75 |
:default-component-class closure-source-file |
|---|
| 76 |
:pathname (merge-pathnames |
|---|
| 77 |
"dom/" |
|---|
| 78 |
(make-pathname :name nil :type nil :defaults *load-truename*)) |
|---|
| 79 |
:components |
|---|
| 80 |
((:file "package") |
|---|
| 81 |
(:file rune-impl :pathname "dom-impl" :depends-on ("package")) |
|---|
| 82 |
(:file rune-builder :pathname "dom-builder" :depends-on (rune-impl)) |
|---|
| 83 |
#+rune-is-integer |
|---|
| 84 |
(utf8dom-file utf8-impl :pathname "dom-impl" :depends-on ("package")) |
|---|
| 85 |
#+rune-is-integer |
|---|
| 86 |
(utf8dom-file utf8-builder :pathname "dom-builder" :depends-on (utf8-impl)) |
|---|
| 87 |
(:file "dom-sax" :depends-on ("package"))) |
|---|
| 88 |
:depends-on (:cxml-xml)) |
|---|
| 89 |
|
|---|
| 90 |
(asdf:defsystem :cxml-klacks |
|---|
| 91 |
:default-component-class closure-source-file |
|---|
| 92 |
:pathname (merge-pathnames |
|---|
| 93 |
"klacks/" |
|---|
| 94 |
(make-pathname :name nil :type nil :defaults *load-truename*)) |
|---|
| 95 |
:serial t |
|---|
| 96 |
:components |
|---|
| 97 |
((:file "package") |
|---|
| 98 |
(:file "klacks") |
|---|
| 99 |
(:file "klacks-impl") |
|---|
| 100 |
(:file "tap-source")) |
|---|
| 101 |
:depends-on (:cxml-xml)) |
|---|
| 102 |
|
|---|
| 103 |
(asdf:defsystem :cxml-test |
|---|
| 104 |
:default-component-class closure-source-file |
|---|
| 105 |
:pathname (merge-pathnames |
|---|
| 106 |
"test/" |
|---|
| 107 |
(make-pathname :name nil :type nil :defaults *load-truename*)) |
|---|
| 108 |
:components ((:file "domtest") (:file "xmlconf")) |
|---|
| 109 |
:depends-on (:cxml-xml :cxml-klacks :cxml-dom)) |
|---|
| 110 |
|
|---|
| 111 |
(asdf:defsystem :cxml |
|---|
| 112 |
:components () |
|---|
| 113 |
:depends-on (:cxml-dom :cxml-klacks :cxml-test)) |
|---|