-
Notifications
You must be signed in to change notification settings - Fork 2
/
closure-common.asd
69 lines (61 loc) · 2.35 KB
/
closure-common.asd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
(defpackage :closure-common-system
(:use :asdf :cl)
(:export #:*utf8-runes-readtable*))
(in-package :closure-common-system)
(defvar *utf8-runes-readtable*)
(defclass closure-source-file (cl-source-file) ())
#+sbcl
(defmethod perform :around ((o compile-op) (s closure-source-file))
;; shut up already. Correctness first.
(handler-bind ((sb-ext:compiler-note #'muffle-warning))
(let (#+sbcl (*compile-print* nil))
(call-next-method))))
(progn
(format t "~&;;; Checking for wide character support...")
(force-output)
(flet ((test (code)
(and (< code char-code-limit) (code-char code))))
(cond
((not (test 50000))
(format t " no, reverting to octet strings.~%")
#+rune-is-character
(error "conflicting unicode configuration. Please recompile.")
(pushnew :rune-is-integer *features*))
((test 70000)
(when (test #xD800)
(format t " WARNING: Lisp implementation doesn't use UTF-16, ~
but accepts surrogate code points.~%"))
(format t " yes, using code points.~%")
#+(or rune-is-integer rune-is-utf-16)
(error "conflicting unicode configuration. Please recompile.")
(pushnew :rune-is-character *features*))
(t
(format t " yes, using UTF-16.~%")
#+(or rune-is-integer (and rune-is-character (not rune-is-utf-16)))
(error "conflicting unicode configuration. Please recompile.")
(pushnew :rune-is-utf-16 *features*)
(pushnew :rune-is-character *features*)))))
#-rune-is-character
(format t "~&;;; Building Closure with (UNSIGNED-BYTE 16) RUNES~%")
#+rune-is-character
(format t "~&;;; Building Closure with CHARACTER RUNES~%")
(defsystem :closure-common
:default-component-class closure-source-file
:serial t
:components
((:file "package")
(:file "definline")
(:file runes
:pathname
#-rune-is-character "runes"
#+rune-is-character "characters")
#+rune-is-integer (:file "utf8")
(:file "syntax")
#-x&y-streams-are-stream (:file "encodings")
#-x&y-streams-are-stream (:file "encodings-data")
#-x&y-streams-are-stream (:file "xstream")
#-x&y-streams-are-stream (:file "ystream")
#+x&y-streams-are-stream (:file #+scl "stream-scl")
(:file "hax"))
:depends-on (#-scl :trivial-gray-streams
#+rune-is-character :babel))