Eliminate the separately maintained Lisp system version number.
[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 Sensble 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 "auto.lisp")
33
34 ;;;--------------------------------------------------------------------------
35 ;;; Definition.
36
37 (defsystem sod
38
39 ;; Boring copyright stuff.
40 :version #.*sysdef-version*
41 :author "Mark Wooding"
42 :license "GNU General Public License, version 2 or later"
43 #|@-path-@|# :pathname "@srcdir@"
44
45 ;; Documentation.
46 :description "A Sensible Object Design for C."
47
48 :long-description
49 "This system implements a fairly simple, yet powerful, object system for
50 plain old C. Its main features are as follows.
51
52 * Multiple inheritance, done properly (unlike C++, say), with a
53 superclass linearlization algorithm, and exactly one copy of any
54 superclass's slots.
55
56 * Method combinations, and multiple flavours of methods, to make mixin
57 classes more useful.
58
59 * The default method combination doesn't depend on the programmer
60 statically predicting which superclass's method to delegate to.
61 Multiple inheritance makes this approach (taken by C++) fail: the
62 right next method might be an unknown sibling, and two siblings might
63 be in either order depending on descendents.
64
65 * Minimal runtime support requirements, so that it's suitable for use
66 wherever C is -- e.g., interfacing to other languages."
67
68 :components
69 ((:file "utilities")
70
71 ;; Parser equipment. This is way more elaborate than it needs to be, but
72 ;; it was interesting, and it may well get split off into a separate
73 ;; library.
74 (:module "parser" :depends-on ("utilities") :components
75 ((:file "package")
76
77 ;; File location protocol (including error reporting).
78 (:file "floc-proto" :depends-on ("package"))
79 (:file "floc-impl" :depends-on ("floc-proto"))
80
81 ;; Position-aware streams.
82 (:file "streams-proto" :depends-on ("package"))
83 (:file "streams-impl" :depends-on ("streams-proto" "floc-proto"))
84
85 ;; Scanner protocol, and various scanner implementations.
86 (:file "scanner-proto" :depends-on ("package"))
87 (:file "scanner-impl" :depends-on ("scanner-proto"))
88 (:file "scanner-charbuf-impl" :depends-on
89 ("scanner-proto" "floc-proto" "streams-proto"))
90 (:file "scanner-token-impl" :depends-on ("scanner-proto"))
91
92 ;; Parser notation macro support.
93 (:file "parser-proto" :depends-on ("package"))
94 (:file "parser-impl" :depends-on ("parser-proto"))
95
96 ;; Expression parser support.
97 (:file "parser-expr-proto" :depends-on ("parser-proto"))
98 (:file "parser-expr-impl" :depends-on ("parser-expr-proto"))
99
100 ;; Stitching parsers to scanners.
101 (:file "scanner-context-impl" :depends-on
102 ("parser-proto" "scanner-proto"))))
103
104 (:file "package" :depends-on ("utilities" "parser"))
105
106 ;; Lexical analysis.
107 (:file "lexer-proto" :depends-on ("package" "parser"))
108 (:file "lexer-impl" :depends-on ("lexer-proto"))
109 (:file "fragment-parse" :depends-on ("lexer-proto"))
110
111 ;; C type representation protocol.
112 (:file "c-types-proto" :depends-on ("package"))
113 (:file "c-types-impl" :depends-on ("c-types-proto"))
114 (:file "c-types-parse" :depends-on
115 ("c-types-proto" "c-types-class-impl" "fragment-parse"))
116
117 ;; Property set protocol.
118 (:file "pset-proto" :depends-on ("package"))
119 (:file "pset-impl" :depends-on ("pset-proto"))
120 (:file "pset-parse" :depends-on ("pset-proto" "lexer-proto"))
121
122 ;; Code generation protocol.
123 (:file "codegen-proto" :depends-on ("module-proto"))
124 (:file "codegen-impl" :depends-on ("codegen-proto"))
125
126 ;; Modules.
127 (:file "module-proto" :depends-on ("package"))
128 (:file "module-impl" :depends-on
129 ("module-proto" "pset-proto" "c-types-class-impl" "builtin"))
130 (:file "builtin" :depends-on
131 ("module-proto" "pset-proto" "c-types-impl" "c-types-class-impl"
132 "classes" "class-layout-proto"))
133 (:file "module-parse" :depends-on
134 ("class-make-proto" "class-finalize-proto"
135 "fragment-parse" "lexer-proto" "module-impl"))
136 (:file "module-output" :depends-on ("module-impl" "output-proto"))
137
138 ;; Output.
139 (:file "output-proto" :depends-on ("package"))
140 (:file "output-impl" :depends-on ("output-proto"))
141
142 ;; Class representation.
143 (:file "classes" :depends-on ("package" "c-types-proto"))
144 (:file "c-types-class-impl" :depends-on ("classes" "module-proto"))
145 (:file "class-utilities" :depends-on
146 ("classes" "codegen-impl" "pset-impl"
147 "c-types-impl" "c-types-class-impl"))
148
149 ;; Class construction.
150 (:file "class-make-proto" :depends-on ("class-utilities"))
151 (:file "class-make-impl" :depends-on ("class-make-proto"))
152
153 ;; Class layout.
154 (:file "class-layout-proto" :depends-on ("class-utilities"))
155 (:file "class-layout-impl" :depends-on
156 ("class-layout-proto" "method-proto"))
157
158 ;; Class finalization.
159 (:file "class-finalize-proto" :depends-on ("class-utilities"))
160 (:file "class-finalize-impl" :depends-on ("class-finalize-proto"))
161
162 ;; Method generation.
163 (:file "method-proto" :depends-on ("class-make-proto"))
164 (:file "method-impl" :depends-on ("method-proto"))
165 (:file "method-aggregate" :depends-on ("method-impl"))
166
167 ;; Class output.
168 (:file "class-output" :depends-on
169 ("classes" "class-layout-impl" "method-impl" "output-proto"))
170
171 ;; Finishing touches of various kinds.
172 (:file "final" :depends-on ("builtin" "module-output"))))
173
174 ;;;--------------------------------------------------------------------------
175 ;;; Testing.
176
177 (defmethod perform ((op test-op) (component (eql (find-system "sod"))))
178 (declare (ignore op component))
179 (handler-bind (((or warning style-warning)
180 (lambda (cond)
181 (declare (ignore cond))
182 (invoke-restart 'muffle-warning))))
183 (operate 'test-op "sod-test")))
184
185 ;;;----- That's all, folks --------------------------------------------------