refactored proto object system into src dir
[CommonLispStat.git] / lispstat.asd
blob1f0e367b8916594d0f32645602f7df07b9115997
1 ;;  -*- mode: lisp -*-
2 ;;; Copyright (c) 2005--2008, by AJ Rossini <blindglobe@gmail.com>
3 ;;; ASDF packaging for CommonLisp Stat
4 ;;; License: BSD, see the top level directory file LICENSE for details.
5 ;;; Time-stamp: <2008-07-22 12:15:34 tony>
6 ;;; Created:    <2005-05-30 17:09:47 blindglobe>
8 (in-package :cl-user)
10 (defvar *lispstat-home-dir*
11   (directory-namestring
12    (truename (asdf:system-definition-pathname :lispstat)))
13   "Value considered \"home\" for our data")
16   (setf *lispstat-home-dir*
17       (directory-namestring (truename (asdf:system-definition-pathname
18                                        :lispstat))))
21 (macrolet ((ls-dir (root-str)
22              `(pathname (concatenate 'string
23                                      (namestring *lispstat-home-dir*) ,root-str)))
25            (ls-defdir (target-dir-var  root-str)
26              `(defvar ,target-dir-var (ls-dir ,root-str))))
28   ;; reminder of testing
29   ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
30   ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
31   ;;(macroexpand-1 '(ls-dir "ASDF"))
33   (ls-defdir *lispstat-asdf-dir* "ASDF/")
34   (ls-defdir *lispstat-data-dir* "data/")
35   (ls-defdir *lispstat-external-dir* "external/")
36   (ls-defdir *lispstat-examples-dir* "examples/"))
38 (pushnew *lispstat-asdf-dir* asdf:*central-registry*)
39 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft
41 ;;; back to our regularly scheduled work...
42 ;;; We should not need these, I think, but?
43 ;; (asdf:oos 'asdf:compile-op :cffi)            ;; FFI
44 ;; (asdf:oos 'asdf:compile-op :lift)            ;; Unit Testing 
45 ;; (asdf:oos 'asdf:load-op :cffi)            ;; FFI
46 ;; (asdf:oos 'asdf:load-op :lift)            ;; Unit Testing 
48 ;;; MAJOR HACK, FIXME!
49 ;;(load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
51 (in-package :cl-user)
53 (defpackage #:lispstat-system
54     (:use :common-lisp :asdf))
56 (in-package #:lispstat-system)
58 ;;; To avoid renaming everything from *.lsp to *.lisp...
59 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
60 ;;; NOT secure against serving multiple architectures/hardwares from
61 ;;; the same file system (i.e. PPC and x86 would not be
62 ;;; differentiated). 
64 (defclass lispstat-lsp-source-file (cl-source-file) ())
65 (defparameter *fasl-directory*
66    (make-pathname :directory '(:relative
67                                #+sbcl "sbcl-fasl"
68                                #+openmcl "openmcl-fasl"
69                                #+cmu "cmucl-fasl"
70                                #+clisp "clisp-fasl"
71                                #-(or sbcl openmcl clisp cmucl) "fasl"
72                                )))
75 ;;; Handle Luke's *.lsp suffix
76 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
77 (defmethod asdf::output-files :around ((operation compile-op)
78                                        (c lispstat-lsp-source-file))
79   (list (merge-pathnames *fasl-directory*
80                          (compile-file-pathname (component-pathname c)))))
81 ;;; again, thanks to Cyrus for saving me time...
84 (defsystem "lispstat"
85   :version #.(with-open-file
86                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
87                (read vers))
88   :author "A.J. Rossini <blindglobe@gmail.com>"
89   :license "BSD"
90   :description "CommonLispStat (CLS): A System for Statistical
91   Computing with Common Lisp; based on CLS alpha1 by Luke Tierney
92   <luke@stat.uiowa.edu> (apparently originally written when Luke was
93   at CMU, on leave somewhere?).   Last touched by him in 1991, then in
94   2005--2008." 
95   :serial t
96 <<<<<<< HEAD:lispstat.asd
97   :depends-on (:cffi  :lift :lisp-matrix) ;; need a matrix library
98   :components ((:static-file "version" :pathname #p"version.lisp-expr")
99 =======
100   :depends-on (:cffi :lift) ;; need a matrix library
101   :components ((:static-file "version" :pathname #p"version.lisp-expr")
102                (:module "proto-objects"
103                         :pathname "src/objsys/"
104                         :components ((:lispstat-lsp-source-file "lsobjects")))
106                (:lispstat-lsp-source-file "cffiglue")
107                (:lispstat-lsp-source-file "defsys")
108                (:lispstat-lsp-source-file "lstypes")
109                (:lispstat-lsp-source-file "lsfloat")
111                (:lispstat-lsp-source-file "compound" 
112                                           :depends-on ("proto-objects"))
113                (:lispstat-lsp-source-file "lsmacros" 
114                                           :depends-on ("compound"))
116                (:lispstat-lsp-source-file "dists"
117                                           :depends-on ("cffiglue"
118                                                        "lsmacros"))
120                (:lispstat-lsp-source-file "lsmath"
121                                           :depends-on ("proto-objects"
122                                                        "compound"
123                                                        "lsmacros"
124                                                        "lsfloat"))
127                (:lispstat-lsp-source-file "matrices"
128                                           :depends-on ("cffiglue"
129                                                        "compound"))
131                (:lispstat-lsp-source-file "ladata"
132                                           :depends-on ("cffiglue"
133                                                        "defsys"
134                                                        "lstypes"
135                                                        "compound"
136                                                        "matrices"))
138                (:lispstat-lsp-source-file "linalg"
139                                           :depends-on ("cffiglue"
140                                                        "lsmath"
141                                                        "matrices"
142                                                        "ladata"
143                                                        "lsfloat"
144                                                        "lstypes"
145                                                        "compound"))
147                (:file "data" :depends-on ("proto-objects"
148                                           "compound"
149                                           "matrices"
150                                           "linalg"))
152                ;; there is a circ reference which we need to solve.
153                (:lispstat-lsp-source-file "lsbasics"
154                                           :depends-on ("proto-objects"
155                                                        "lstypes"
156                                                        "lsmacros"
157                                                        "lsfloat"
158                                                        "matrices"
159                                                        "linalg"
160                                                        "dists"))
162                (:lispstat-lsp-source-file "statistics"
163                                           :depends-on ("proto-objects"
164                                                        "lsbasics"
165                                                        "compound"
166                                                        "ladata" "matrices" "linalg"
167                                                        "lsmath"
168                                                        "data" ))
170                (:file "optimize" :depends-on ("proto-objects"
171                                               "cffiglue"
172                                               "lstypes"
173                                               "compound"
174                                               "lsmath"
175                                               "lsfloat"
176                                               "lsbasics"
177                                               "matrices"
178                                               "ladata"
179                                               "linalg"))
180                
181                ;; Applications
182                (:lispstat-lsp-source-file "regression"
183                                           :depends-on ("proto-objects"
184                                                        "lsbasics"
185                                                        "compound"
186                                                        "lsmath"
187                                                        "matrices"
188                                                        "linalg"
189                                                        "statistics"))
190 ;              (:lispstat-lsp-source-file "nonlin"
191 ;                                         :depends-on ("regression"))
193 ;              (:lispstat-lsp-source-file "bayes"
194 ;                                         :depends-on ("proto-objects"
195 ;                                                      "lsmath"
196 ;                                                      "dists"))
199                (:file "ls-user" :depends-on ("proto-objects"
200                                              "lsbasics"
201                                              "compound"
202                                              "dists"
203                                              "lstypes"
204                                              "lsfloat"
205                                              "data"
206                                              "lsmath"
207                                              "matrices"
208                                              "linalg"
209                                              "statistics"
210                                              "regression"))
212                (:file "unittests" :depends-on ("ls-user"))
213                (:file "unittests-lstypes" :depends-on ("ls-user"
214                                                        "lstypes"))
215                ;; (:file "unittests-data-clos" :depends-on ("ls-user"))
216                ;; (:file "unittests-regression" :depends-on ("ls-user"))
218 >>>>>>> refactored proto object system into src dir:lispstat.asd
219                (:static-file "LICENSE")
220                (:static-file "README")
222 <<<<<<< HEAD:lispstat.asd
223                (:module "proto-objects"
224                         :pathname "src/objsys/"
225                         :components
226                         ((:lispstat-lsp-source-file "lsobjects")))
228                (:module "lispstat-core"
229                         :pathname "src/basics/"
230                         :serial t
231                         :depends-on ("proto-objects")
232                         :components
233                         ((:lispstat-lsp-source-file "defsys")
234                          (:lispstat-lsp-source-file "lstypes")
235                          (:lispstat-lsp-source-file "lsfloat")
236                          
237                          (:lispstat-lsp-source-file "compound")
238                          (:lispstat-lsp-source-file "lsmacros" 
239                                                     :depends-on ("compound"))
240                          
241                          (:lispstat-lsp-source-file "lsmath"
242                                                     :depends-on ("compound"
243                                                                  "lsmacros"
244                                                                  "lsfloat"))))
246                (:module
247                 "numerics-internal"
248                 :pathname "src/numerics/"
249                 :depends-on ("proto-objects" "lispstat-core")
250                 :components
251                 ((:lispstat-lsp-source-file "cffiglue")
252                  (:lispstat-lsp-source-file "dists"
253                                             :depends-on ("cffiglue"))
254                  (:lispstat-lsp-source-file "matrices"
255                                             :depends-on ("cffiglue"))
256                  (:lispstat-lsp-source-file "ladata"
257                                             :depends-on ("cffiglue"
258                                                          "matrices"))
259                  (:lispstat-lsp-source-file "linalg"
260                                             :depends-on ("cffiglue"
261                                                          "matrices"
262                                                          "ladata"))))
264                (:module
265                 "stat-data"
266                 :pathname "src/data/"
267                 :depends-on ("proto-objects"
268                              "lispstat-core"
269                              "numerics-internal")
270                 :components
271                 (;; (:file "data-clos")
272                  (:file "data")))
274                (:module
275                 "cls-basics"
276                 :pathname "src/basics/"
277                 :depends-on ("proto-objects"
278                              "lispstat-core"
279                              "numerics-internal" )
280                 :components
281                 ((:lispstat-lsp-source-file "lsbasics")))
282                
283                (:module
284                 "describe"
285                 :pathname "src/describe/"
286                 :depends-on ("proto-objects"
287                              "lispstat-core"
288                              "numerics-internal"
289                              "stat-data"
290                              "cls-basics")
291                 :components
292                 ((:lispstat-lsp-source-file "statistics")))
293                
294                (:module
295                 "optimization"
296                 :pathname "src/numerics/"
297                 :depends-on ("proto-objects"
298                              "lispstat-core"
299                              "numerics-internal")
300                 :components ((:file "optimize")))
301                
302                
303                ;; Applications
304                (:module
305                 "stat-models"
306                 :pathname "src/stat-models/"
307                 :depends-on ("proto-objects"
308                              "lispstat-core"
309                              "numerics-internal"
310                              "cls-basics"
311                              "describe")
312                 :components
313                 ((:lispstat-lsp-source-file "regression")
314                  ;; (:lispstat-lsp-source-file "nonlin"
315                  ;;       :depends-on ("regression"))
316                  ;; (:lispstat-lsp-source-file "bayes"
317                  ;;       :depends-on ("proto-objects"
318                  ;;                    "lsmath"
319                  ;;                    "dists"))
320                  ))
322                (:module
323                 "lisp-stat-one"
324                 :pathname "src/"
325                 :depends-on  ("proto-objects"
326                               "lispstat-core"
327                               "numerics-internal" 
328                               "cls-basics"
329                               "stat-data"
330                               "describe"
331                               "stat-models")
332                 :components ((:file "ls-user")))
334                (:module
335                  "lisp-stat-unittest"
336                  :depends-on ( "lisp-stat-one" ) ;; shouldn't need :lift!
337                  :pathname "src/unittests/"
338                  :components ((:file "unittests")
339                               (:file "unittests-lstypes")
340                               ;;  "unittests-arrays.lisp"
341                               ;;  "unittests-data-clos.lisp"
342                               ;;  "unittests-proto.lisp"
343                               ;;  "unittests-regression.lisp"
344                               ))))
345 =======
346 ((:module
347   "lisp-stat-testing"
348   :pathname "src/unittests/"
349   :components ((:file "unittests" :depends-on ("ls-user"))
350                (:file "unittests-lstypes" :depends-on ("ls-user"
351                                                        "lstypes")))))
354 >>>>>>> refactored proto object system into src dir:lispstat.asd