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