lib/sod-hosted.c (sod_makev): Use two statements rather than tricky expression.
[sod] / src / sod.asd.in
1 ;;; -*-lisp-*-
2 ;;;
3 ;;; System definition for the Sensible Object Design translator
4 ;;;
5 ;;; (c) 2009 Straylight/Edgeware
6 ;;;
7
8 ;;;----- Licensing notice ---------------------------------------------------
9 ;;;
10 ;;; This file is part of the Sensible Object Design, an object system for C.
11 ;;;
12 ;;; SOD is free software; you can redistribute it and/or modify
13 ;;; it under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 2 of the License, or
15 ;;; (at your option) any later version.
16 ;;;
17 ;;; SOD is distributed in the hope that it will be useful,
18 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with SOD; if not, write to the Free Software Foundation,
24 ;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26 (cl:defpackage #:sod-sysdef
27 (:use #:common-lisp #:asdf)
28 (:export #:*version*))
29
30 (cl:in-package #:sod-sysdef)
31
32 #|@-auto-@|# (load (merge-pathnames "auto.lisp" *load-pathname*))
33
34 #+cmu (require :gray-streams)
35
36 ;;;--------------------------------------------------------------------------
37 ;;; Definition.
38
39 (defsystem sod
40
41 ;; Boring copyright stuff.
42 :version #.*sysdef-version*
43 :author "Mark Wooding"
44 :license "GNU General Public License, version 2 or later"
45 #|@-path-@|# :pathname "@srcdir@"
46
47 ;; Documentation.
48 :description "A Sensible Object Design for C."
49
50 :long-description
51 "This system implements a fairly simple, yet powerful, object system for
52 plain old C. Its main features are as follows.
53
54 * Multiple inheritance, done properly (unlike C++, say), with a
55 superclass linearlization algorithm, and exactly one copy of any
56 superclass's slots.
57
58 * Method combinations, and multiple flavours of methods, to make mixin
59 classes more useful.
60
61 * The default method combination doesn't depend on the programmer
62 statically predicting which superclass's method to delegate to.
63 Multiple inheritance makes this approach (taken by C++) fail: the
64 right next method might be an unknown sibling, and two siblings might
65 be in either order depending on descendents.
66
67 * Minimal runtime support requirements, so that it's suitable for use
68 wherever C is -- e.g., interfacing to other languages."
69
70 :components
71 ((:file "utilities")
72 (:file "optparse")
73
74 ;; Parser equipment. This is way more elaborate than it needs to be, but
75 ;; it was interesting, and it may well get split off into a separate
76 ;; library.
77 (:module "parser" :depends-on ("utilities") :components
78 ((:file "package")
79
80 ;; File location protocol (including error reporting).
81 (:file "floc-proto" :depends-on ("package"))
82 (:file "floc-impl" :depends-on ("floc-proto"))
83
84 ;; Position-aware streams.
85 (:file "streams-proto" :depends-on ("package"))
86 (:file "streams-impl" :depends-on ("streams-proto" "floc-proto"))
87
88 ;; Scanner protocol, and various scanner implementations.
89 (:file "scanner-proto" :depends-on ("package"))
90 (:file "scanner-impl" :depends-on ("scanner-proto"))
91 (:file "scanner-charbuf-impl" :depends-on
92 ("scanner-proto" "floc-proto" "streams-proto"))
93 (:file "scanner-token-impl" :depends-on ("scanner-proto"))
94
95 ;; Parser notation macro support.
96 (:file "parser-proto" :depends-on ("package"))
97 (:file "parser-impl" :depends-on ("parser-proto"))
98
99 ;; Expression parser support.
100 (:file "parser-expr-proto" :depends-on ("parser-proto"))
101 (:file "parser-expr-impl" :depends-on ("parser-expr-proto"))
102
103 ;; Stitching parsers to scanners.
104 (:file "scanner-context-impl" :depends-on
105 ("parser-proto" "scanner-proto"))))
106
107 (:file "package" :depends-on ("utilities" "parser"))
108
109 ;; Lexical analysis.
110 (:file "lexer-proto" :depends-on ("package" "parser"))
111 (:file "lexer-impl" :depends-on ("lexer-proto"))
112 (:file "fragment-parse" :depends-on ("lexer-proto"))
113
114 ;; C type representation protocol.
115 (:file "c-types-proto" :depends-on ("package"))
116 (:file "c-types-impl" :depends-on ("c-types-proto" "codegen-proto"))
117 (:file "c-types-parse" :depends-on
118 ("c-types-proto" "c-types-class-impl" "fragment-parse"))
119
120 ;; Property set protocol.
121 (:file "pset-proto" :depends-on ("package" "c-types-proto"))
122 (:file "pset-impl" :depends-on ("pset-proto" "module-proto"))
123 (:file "pset-parse" :depends-on ("pset-proto" "lexer-proto"))
124
125 ;; Code generation protocol.
126 (:file "codegen-proto" :depends-on ("module-proto"))
127 (:file "codegen-impl" :depends-on ("codegen-proto"))
128
129 ;; Modules.
130 (:file "module-proto" :depends-on ("pset-proto" "package"))
131 (:file "module-impl" :depends-on
132 ("module-proto" "pset-proto" "c-types-class-impl" "builtin"))
133 (:file "builtin" :depends-on
134 ("module-proto" "pset-proto" "c-types-impl" "c-types-class-impl"
135 "classes" "class-layout-proto" "method-proto"))
136 (:file "module-parse" :depends-on
137 ("class-make-proto" "class-finalize-proto"
138 "fragment-parse" "lexer-proto" "module-impl"))
139 (:file "module-output" :depends-on ("module-impl" "output-proto"))
140
141 ;; Output.
142 (:file "output-proto" :depends-on ("package"))
143 (:file "output-impl" :depends-on ("output-proto"))
144
145 ;; Class representation.
146 (:file "classes" :depends-on ("package" "c-types-proto"))
147 (:file "c-types-class-impl" :depends-on ("classes" "module-proto"))
148 (:file "class-utilities" :depends-on
149 ("classes" "codegen-impl" "pset-impl"
150 "c-types-impl" "c-types-class-impl"))
151
152 ;; Class construction.
153 (:file "class-make-proto" :depends-on ("class-utilities"))
154 (:file "class-make-impl" :depends-on ("class-make-proto"))
155
156 ;; Class layout.
157 (:file "class-layout-proto" :depends-on ("class-utilities"))
158 (:file "class-layout-impl" :depends-on
159 ("class-layout-proto" "method-proto"))
160
161 ;; Class finalization.
162 (:file "class-finalize-proto" :depends-on ("class-utilities"))
163 (:file "class-finalize-impl" :depends-on ("class-finalize-proto"))
164
165 ;; Method generation.
166 (:file "method-proto" :depends-on ("class-make-proto"))
167 (:file "method-impl" :depends-on ("method-proto"))
168 (:file "method-aggregate" :depends-on ("method-impl"))
169
170 ;; Class output.
171 (:file "class-output" :depends-on
172 ("classes" "class-layout-impl" "method-impl" "output-proto"))
173
174 ;; Finishing touches of various kinds.
175 (:file "final" :depends-on ("builtin" "module-output" "class-output"))))
176
177 ;;;--------------------------------------------------------------------------
178 ;;; Testing.
179
180 (defmethod perform ((op test-op) (component (eql (find-system "sod"))))
181 (declare (ignore op component))
182 (handler-bind (((or warning style-warning) #'muffle-warning))
183 (operate 'test-op "sod-test")))
184
185 ;;;----- That's all, folks --------------------------------------------------