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