New package HAX.
[closure-common.git] / closure-common.asd
bloba8a57c9739aa4ad8b858151045e82ff50c36d65a
1 (defpackage :closure-common-system
2   (:use :asdf :cl)
3   (:export #:*utf8-runes-readtable*))
5 (in-package :closure-common-system)
7 (defvar *utf8-runes-readtable*)
9 (defclass closure-source-file (cl-source-file) ())
11 #+sbcl
12 (defmethod perform :around ((o compile-op) (s closure-source-file))
13   ;; shut up already.  Correctness first.
14   (handler-bind ((sb-ext:compiler-note #'muffle-warning))
15     (let (#+sbcl (*compile-print* nil))
16       (call-next-method))))
18 #-(or rune-is-character rune-is-integer)
19 (progn
20   (format t "~&;;; Checking for wide character support...")
21   (force-output)
22   (pushnew (dotimes (x 65536
23                       (progn
24                         (format t " ok, characters have at least 16 bits.~%")
25                         :rune-is-character))
26              (unless (or (<= #xD800 x #xDFFF)
27                          (and (< x char-code-limit) (code-char x)))
28                (print (code-char x))
29                (format t " no, reverting to octet strings.~%")
30                (return :rune-is-integer)))
31            *features*))
33 #-rune-is-character
34 (format t "~&;;; Building Closure with (UNSIGNED-BYTE 16) RUNES~%")
36 #+rune-is-character
37 (format t "~&;;; Building Closure with CHARACTER RUNES~%") 
39 (defsystem :closure-common
40     :default-component-class closure-source-file
41     :serial t
42     :components
43     ((:file "package")
44      (:file "definline")
45      (:file runes
46             :pathname
47              #-rune-is-character "runes"
48              #+rune-is-character "characters")
49      #+rune-is-integer (:file "utf8")
50      (:file "syntax")
51      #-x&y-streams-are-stream (:file "encodings")
52      #-x&y-streams-are-stream (:file "encodings-data")
53      #-x&y-streams-are-stream (:file "xstream")
54      #-x&y-streams-are-stream (:file "ystream")
55      #+x&y-streams-are-stream (:file #+scl "stream-scl")
56      (:file "hax"))
57     :depends-on (#-scl :trivial-gray-streams))