moved to "models", not "model". We have many.
[CommonLispStat.git] / lispstat.asd
blobeb2c2af747c2ff042066561b6cd0d395b0041b3c
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-08-27 21:34:22 tony>
6 ;;; Created:    <2005-05-30 17:09:47 blindglobe>
8 ;; What package should we be in?  Contaminating cl-user is probably EVIL.
9 (in-package :cl-user)
12 (defvar *lispstat-home-dir*
13   (directory-namestring
14    (truename (asdf:system-definition-pathname :lispstat)))
15   "Value considered \"home\" for our data")
18   (setf *lispstat-home-dir*
19       (directory-namestring (truename (asdf:system-definition-pathname
20                                        :lispstat))))
23 (macrolet ((ls-dir (root-str)
24              `(pathname (concatenate 'string
25                                      (namestring *lispstat-home-dir*) ,root-str)))
27            (ls-defdir (target-dir-var  root-str)
28              `(defvar ,target-dir-var (ls-dir ,root-str))))
30   ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
31   ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
32   ;;(macroexpand-1 '(ls-dir "ASDF"))
34   (ls-defdir *lispstat-asdf-dir* "ASDF/")
35   (ls-defdir *lispstat-data-dir* "data/")
36   (ls-defdir *lispstat-external-dir* "external/")
37   (ls-defdir *lispstat-examples-dir* "examples/"))
39 (pushnew *lispstat-asdf-dir* asdf:*central-registry*)
40 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
42 ;;; back to our regularly scheduled work...
43 ;;; We should not need these, I think, but?
44 ;; (asdf:oos 'asdf:compile-op :cffi)            ;; FFI
45 ;; (asdf:oos 'asdf:compile-op :lift)            ;; Unit Testing 
46 ;; (asdf:oos 'asdf:load-op :cffi)            ;; FFI
47 ;; (asdf:oos 'asdf:load-op :lift)            ;; Unit Testing 
49 ;;; MAJOR HACK, FIXME!
50 ;;(load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
52 (in-package :cl-user)
54 (defpackage #:lispstat-system
55     (:use :common-lisp :asdf))
57 (in-package #:lispstat-system)
59 ;;; To avoid renaming everything from *.lsp to *.lisp...
60 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
61 ;;; NOT secure against serving multiple architectures/hardwares from
62 ;;; the same file system (i.e. PPC and x86 would not be
63 ;;; differentiated). 
65 (defclass lispstat-lsp-source-file (cl-source-file) ())
66 (defparameter *fasl-directory*
67    (make-pathname :directory '(:relative
68                                #+sbcl "sbcl-fasl"
69                                #+openmcl "openmcl-fasl"
70                                #+cmu "cmucl-fasl"
71                                #+clisp "clisp-fasl"
72                                #-(or sbcl openmcl clisp cmucl) "fasl"
73                                )))
76 ;;; Handle Luke's *.lsp suffix
77 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
78 (defmethod asdf::output-files :around ((operation compile-op)
79                                        (c lispstat-lsp-source-file))
80   (list (merge-pathnames *fasl-directory*
81                          (compile-file-pathname (component-pathname c)))))
82 ;;; again, thanks to Cyrus for saving me time...
85 (defsystem "lispstat"
86   :version #.(with-open-file
87                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
88                (read vers))
89   :author "A.J. Rossini <blindglobe@gmail.com>"
90   :license "BSD"
91   :description "CommonLispStat (CLS): A System for Statistical Computing with Common Lisp;
92 based on CLS alpha1 by Luke Tierney <luke@stat.uiowa.edu> (originally written when Luke was at CMU, apparently).
93 Last touched 1991, then in 2005--2008."
94   :serial t
95   :depends-on (:cffi  :lift) ;; need a matrix library
96   :components ((:static-file "version" :pathname #p"version.lisp-expr")
97                (:static-file "LICENSE")
98                (:static-file "README")
100                (:module "proto-objects"
101                         :pathname "src/objsys/"
102                         :components
103                         ((:lispstat-lsp-source-file "lsobjects")))
105                (:module "lispstat-core"
106                         :pathname "src/basics/"
107                         :serial t
108                         :depends-on ("proto-objects")
109                         :components
110                         ((:lispstat-lsp-source-file "defsys")
111                          (:lispstat-lsp-source-file "lstypes")
112                          (:lispstat-lsp-source-file "lsfloat")
113                          
114                          (:lispstat-lsp-source-file "compound")
115                          (:lispstat-lsp-source-file "lsmacros" 
116                                                     :depends-on ("compound"))
117                          
118                          (:lispstat-lsp-source-file "lsmath"
119                                                     :depends-on ("compound"
120                                                                  "lsmacros"
121                                                                  "lsfloat"))))
123                (:module
124                 "numerics-internal"
125                 :pathname "src/numerics/"
126                 :depends-on ("proto-objects" "lispstat-core")
127                 :components
128                 ((:lispstat-lsp-source-file "cffiglue")
129                  (:lispstat-lsp-source-file "dists"
130                                             :depends-on ("cffiglue"))
131                  (:lispstat-lsp-source-file "matrices"
132                                             :depends-on ("cffiglue"))
133                  (:lispstat-lsp-source-file "ladata"
134                                             :depends-on ("cffiglue"
135                                                          "matrices"))
136                  (:lispstat-lsp-source-file "linalg"
137                                             :depends-on ("cffiglue"
138                                                          "matrices"
139                                                          "ladata"))))
141                (:module
142                 "stat-data"
143                 :pathname "src/data/"
144                 :depends-on ("proto-objects"
145                              "lispstat-core"
146                              "numerics-internal")
147                 :components
148                 (;; (:file "data-clos")
149                  (:file "data")))
151                ;; there is a circ reference which we need to solve.
152                (:lispstat-lsp-source-file
153                 "lsbasics"
154                 :depends-on ("proto-objects"
155                              "lispstat-core"
156                              "numerics-internal" ))
157                
158                (:lispstat-lsp-source-file
159                 "statistics"
160                 :depends-on ("proto-objects"
161                              "lispstat-core"
162                              "numerics-internal"
163                              "stat-data"
164                              "lsbasics"))
165                
166                (:file
167                 "optimize"
168                 :depends-on ("proto-objects"
169                              "lispstat-core"
170                              "numerics-internal"))
171                
172                ;; Applications
173                (:module
174                 "stat-models"
175                 :pathname "src/stat-models/"
176                 :depends-on ("proto-objects"
177                              "lispstat-core"
178                              "numerics-internal"
179                              "lsbasics"
180                              "statistics")
181                 :components
182                 ((:lispstat-lsp-source-file "regression")
183                  ;; (:lispstat-lsp-source-file "nonlin"
184                  ;;       :depends-on ("regression"))
185                  ;; (:lispstat-lsp-source-file "bayes"
186                  ;;       :depends-on ("proto-objects"
187                  ;;                    "lsmath"
188                  ;;                    "dists"))
189                  ))
191                (:module
192                 "lisp-stat-one"
193                 :pathname "src/"
194                 :depends-on  ("proto-objects"
195                               "lispstat-core"
196                               "numerics-internal" 
197                               "lsbasics"
198                               "stat-data"
199                               "statistics"
200                               "stat-models")
201                 :components ((:file "ls-user")))
203                (:module
204                  "lisp-stat-unittest"
205                  :depends-on ( "lisp-stat-one" ) ;; shouldn't need :lift!
206                  :pathname "src/unittests/"
207                  :components ((:file "unittests")
208                               (:file "unittests-lstypes")
209                               ;;  "unittests-arrays.lisp"
210                               ;;  "unittests-data-clos.lisp"
211                               ;;  "unittests-proto.lisp"
212                               ;;  "unittests-regression.lisp"
213                               ))))