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