modularized internal numerics using C for probbility and linalg.
[CommonLispStat.git] / lispstat.asd
blobb814f6e7845b86bad23a198a4a79234de30969af
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-18 18:33:01 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 (truename (asdf:system-definition-pathname
14                                    :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 :asdf :common-lisp))
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 ((:lispstat-lsp-source-file "lsobjects")))
104                (:lispstat-lsp-source-file "defsys")
105                (:lispstat-lsp-source-file "lstypes")
106                (:lispstat-lsp-source-file "lsfloat")
108                (:lispstat-lsp-source-file "compound" 
109                                           :depends-on ("proto-objects"))
110                (:lispstat-lsp-source-file "lsmacros" 
111                                           :depends-on ("compound"))
113                (:lispstat-lsp-source-file "lsmath"
114                                           :depends-on ("proto-objects"
115                                                        "compound"
116                                                        "lsmacros"
117                                                        "lsfloat"))
119                (:module "numerics-internal"
120                         :pathname "src/numerics"
121                         :components
122                         ((:lispstat-lsp-source-file "cffiglue")
123                          (:lispstat-lsp-source-file "dists"
124                                                     :depends-on ("cffiglue"
125                                                                  "lsmacros"))
126                          (:lispstat-lsp-source-file "matrices"
127                                                     :depends-on ("cffiglue"
128                                                                  "compound"))
129                          (:lispstat-lsp-source-file "ladata"
130                                                     :depends-on ("cffiglue"
131                                                                  "defsys"
132                                                                  "lstypes"
133                                                                  "compound"
134                                                                  "matrices"))
135                          (:lispstat-lsp-source-file "linalg"
136                                                     :depends-on ("cffiglue"
137                                                                  "lsmath"
138                                                                  "matrices"
139                                                                  "ladata"
140                                                                  "lsfloat"
141                                                                  "lstypes"
142                                                                  "compound"))))
144                (:file "data" :depends-on ("proto-objects"
145                                           "compound"
146                                           "numerics-internal" ;; "matrices" "linalg"
147                                           ))
149                ;; there is a circ reference which we need to solve.
150                (:lispstat-lsp-source-file "lsbasics"
151                                           :depends-on ("proto-objects"
152                                                        "lstypes"
153                                                        "lsmacros"
154                                                        "lsfloat"
155                                                        "numerics-internal"
156                                                        ;; "matrices" "linalg" "dists"
157                                                        ))
159                (:lispstat-lsp-source-file "statistics"
160                                           :depends-on ("proto-objects"
161                                                        "lsbasics"
162                                                        "compound"
163                                                        "ladata" "matrices" "linalg"
164                                                        "lsmath"
165                                                        "data" ))
167                (:file "optimize" :depends-on ("proto-objects"
168                                               "cffiglue"
169                                               "lstypes"
170                                               "compound"
171                                               "lsmath"
172                                               "lsfloat"
173                                               "lsbasics"
174                                               "matrices"
175                                               "ladata"
176                                               "linalg"))
177                
178                ;; Applications
179                (:lispstat-lsp-source-file "regression"
180                                           :depends-on ("proto-objects"
181                                                        "lsbasics"
182                                                        "compound"
183                                                        "lsmath"
184                                                        "matrices"
185                                                        "linalg"
186                                                        "statistics"))
187 ;              (:lispstat-lsp-source-file "nonlin"
188 ;                                         :depends-on ("regression"))
190 ;              (:lispstat-lsp-source-file "bayes"
191 ;                                         :depends-on ("proto-objects"
192 ;                                                      "lsmath"
193 ;                                                      "dists"))
195                (:module
196                 "lisp-stat-core"
197                 :pathname "src/"
198                 :depends-on  ("proto-objects"
199                               "lsbasics"
200                               "compound"
201                               "dists"
202                               "lstypes"
203                               "lsfloat"
204                               "data"
205                               "lsmath"
206                               "matrices"
207                               "linalg"
208                               "statistics"
209                               "regression")
210                 :components ((:file "ls-user")))
212                (:module
213                  "lisp-stat-unittest"
214                  :depends-on ( "lisp-stat-core") ;; shouldn't need :lift!
215                  :pathname "src/unittests/"
216                  :components ((:file "unittests")
217                               (:file "unittests-lstypes")
218                               ;;  "unittests-arrays.lisp"
219                               ;;  "unittests-data-clos.lisp"
220                               ;;  "unittests-proto.lisp"
221                               ;;  "unittests-regression.lisp"
222                               ))
224                ))