unit tests segmented out; small matrix cleanup
[CommonLispStat.git] / lispstat.asd
blobb84f7b3b19719fb5f5dce5f8d4912f5ca8c4e1c1
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-09-17 20:09:46 tony>
6 ;;; Created:    <2005-05-30 17:09:47 blindglobe>
8 ;; (setf *my-base-directory*
9 ;;       #p"/home/tony/sandbox/CLS.git/"
10 ;;       #p"/Users/ungil/lisp/CommonLispStat/")
12 ;; What package should we be in?  Contaminating cl-user is probably EVIL.
13 (in-package :cl-user)
15 ;; returns location of LISPSTAT ASDF file -- but can't work until 
16 ;; we load it.   Not going to do the right thing, I think.  
17 ;; more importantly we need to think about what it is tht we are doing
18 ;; to self-initialize.
20 (defvar *lispstat-home-dir*
21   ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"
22   ;; #p"/Users/ungil/lisp/CommonLispStat/")
23   (directory-namestring (truename (asdf:system-definition-pathname
24                                    :lispstat)))
25   "Value considered \"home\" for our data")
28   (setf *lispstat-home-dir*
29       ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"
30       ;; #p"/Users/ungil/lisp/CommonLispStat/")
31       (directory-namestring (truename (asdf:system-definition-pathname
32                                        :lispstat))))
35 (macrolet ((ls-dir (root-str)
36              `(pathname (concatenate 'string
37                                      (namestring *lispstat-home-dir*) ,root-str)))
39            (ls-defdir (target-dir-var  root-str)
40              `(defvar ,target-dir-var (ls-dir ,root-str))))
42   ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
43   ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
44   ;;(macroexpand-1 '(ls-dir "ASDF"))
46   (ls-defdir *lispstat-asdf-dir* "ASDF/")
47   (ls-defdir *lispstat-data-dir* "data/")
48   (ls-defdir *lispstat-external-dir* "external/")
49   (ls-defdir *lispstat-examples-dir* "examples/"))
51 (pushnew *lispstat-asdf-dir* asdf:*central-registry*)
52 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
54 ;;; back to our regularly scheduled work...
55 ;;; We should not need these, I think, but?
56 ;; (asdf:oos 'asdf:compile-op :cffi)            ;; FFI
57 ;; (asdf:oos 'asdf:compile-op :lift)            ;; Unit Testing 
58 ;; (asdf:oos 'asdf:load-op :cffi)            ;; FFI
59 ;; (asdf:oos 'asdf:load-op :lift)            ;; Unit Testing 
61 ;;; MAJOR HACK, FIXME!
62 (load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
64 (in-package :cl-user)
66 (defpackage #:lispstat-system
67     (:use :asdf :common-lisp))
69 (in-package #:lispstat-system)
71 ;;; To avoid renaming everything from *.lsp to *.lisp...
72 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
73 (defclass lispstat-lsp-source-file (cl-source-file) ())
74 (defparameter *fasl-directory*
75    (make-pathname :directory '(:relative
76                                #+sbcl "sbcl-fasl"
77                                #+openmcl "openmcl-fasl"
78                                #+cmu "cmucl-fasl"
79                                #+clisp "clisp-fasl"
80                                #-(or sbcl openmcl clisp cmucl) "fasl"
81                                )))
83 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
84 (defmethod asdf::output-files :around ((operation compile-op)
85                                        (c lispstat-lsp-source-file))
86   (list (merge-pathnames *fasl-directory*
87                          (compile-file-pathname (component-pathname c)))))
88 ;;; again, thanks to Cyrus for saving me time...
91 (defsystem "lispstat"
92   :version #.(with-open-file
93                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
94                (read vers))
95   :author "A.J. Rossini <blindglobe@gmail.com>"
96   :license "BSD"
97   :description "CommonLispStat (CLS): A System for Statistical Computing with Common Lisp;
98 based on CLS by Luke Tierney <luke@stat.uiowa.edu> (originally written when Luke was at CMU, apparently).
99 Last touched 1991, then in 2005--2008."
100   :serial t
101   :depends-on (:cffi :lift) ;; need a matrix library
102   :components ((:static-file "version" :pathname #p"version.lisp-expr")
103                (:module "proto-objects"
104                         :pathname "src/objsys/"
105                         :components ((:lispstat-lsp-source-file "lsobjects")))
107                (:lispstat-lsp-source-file "cffiglue")
108                (:lispstat-lsp-source-file "defsys")
109                (:lispstat-lsp-source-file "lstypes")
110                (:lispstat-lsp-source-file "lsfloat")
112                (:lispstat-lsp-source-file "compound" 
113                                           :depends-on ("proto-objects"))
114                (:lispstat-lsp-source-file "lsmacros" 
115                                           :depends-on ("compound"))
117                (:lispstat-lsp-source-file "dists"
118                                           :depends-on ("cffiglue"
119                                                        "lsmacros"))
121                (:lispstat-lsp-source-file "lsmath"
122                                           :depends-on ("proto-objects"
123                                                        "compound"
124                                                        "lsmacros"
125                                                        "lsfloat"))
128                (:lispstat-lsp-source-file "matrices"
129                                           :depends-on ("cffiglue"
130                                                        "compound"))
132                (:lispstat-lsp-source-file "ladata"
133                                           :depends-on ("cffiglue"
134                                                        "defsys"
135                                                        "lstypes"
136                                                        "compound"
137                                                        "matrices"))
139                (:lispstat-lsp-source-file "linalg"
140                                           :depends-on ("cffiglue"
141                                                        "lsmath"
142                                                        "matrices"
143                                                        "ladata"
144                                                        "lsfloat"
145                                                        "lstypes"
146                                                        "compound"))
148                (:file "data" :depends-on ("proto-objects"
149                                           "compound"
150                                           "matrices"
151                                           "linalg"))
153                ;; there is a circ reference which we need to solve.
154                (:lispstat-lsp-source-file "lsbasics"
155                                           :depends-on ("proto-objects"
156                                                        "lstypes"
157                                                        "lsmacros"
158                                                        "lsfloat"
159                                                        "matrices"
160                                                        "linalg"
161                                                        "dists"))
163                (:lispstat-lsp-source-file "statistics"
164                                           :depends-on ("proto-objects"
165                                                        "lsbasics"
166                                                        "compound"
167                                                        "ladata" "matrices" "linalg"
168                                                        "lsmath"
169                                                        "data" ))
171                (:file "optimize" :depends-on ("proto-objects"
172                                               "cffiglue"
173                                               "lstypes"
174                                               "compound"
175                                               "lsmath"
176                                               "lsfloat"
177                                               "lsbasics"
178                                               "matrices"
179                                               "ladata"
180                                               "linalg"))
181                
182                ;; Applications
183                (:lispstat-lsp-source-file "regression"
184                                           :depends-on ("proto-objects"
185                                                        "lsbasics"
186                                                        "compound"
187                                                        "lsmath"
188                                                        "matrices"
189                                                        "linalg"
190                                                        "statistics"))
191 ;              (:lispstat-lsp-source-file "nonlin"
192 ;                                         :depends-on ("regression"))
194 ;              (:lispstat-lsp-source-file "bayes"
195 ;                                         :depends-on ("proto-objects"
196 ;                                                      "lsmath"
197 ;                                                      "dists"))
199                (:module
200                 "lisp-stat-core"
201                 :depends-on  ("proto-objects"
202                               "lsbasics"
203                               "compound"
204                               "dists"
205                               "lstypes"
206                               "lsfloat"
207                               "data"
208                               "lsmath"
209                               "matrices"
210                               "linalg"
211                               "statistics"
212                               "regression")
213                 :file "ls-user")
215                (:module
216                  "lisp-stat-testing"
217                  :depends-on ( :lift "proto-objects" "ls-user" )
218                  :pathname "src/unittests/"
219                  :components ((:file "unittests")
220                               (:file "unittests-lstypes" :depends-on ("lstypes"))
221 ;;   -rw-r--r-- 1 tony tony  5839 2008-07-22 12:22 unittests-arrays.lisp
222 ;;   -rw-r--r-- 1 tony tony  4756 2008-07-22 12:22 unittests-data-clos.lisp
223 ;;   -rw-r--r-- 1 tony tony  1577 2008-07-22 12:22 unittests-proto.lisp
224 ;;   -rw-r--r-- 1 tony tony  1814 2008-07-22 12:22 unittests-regression.lisp
225                               ))
228                (:static-file "LICENSE")
229                (:static-file "README")
230                ))
233 ;; preparation for modulization...