Comment-doc -- at least for now, LISTS-OF-LISTS are ROW-MAJOR, NOT COLUMN-MAJOR AS...
[CommonLispStat.git] / lispstat.asd
blobe75ed50906a915e2e17b31624ecfc72345e5c6f5
1 ;;  -*- mode: lisp -*-
2 ;;; Time-stamp: <2009-01-07 17:42:26 tony>
3 ;;; Created:    <2005-05-30 17:09:47 blindglobe>
4 ;;; File:       lispstat.asd
5 ;;; Author:     AJ Rossini <blindglobe@gmail.com>
6 ;;; Copyright:  (c) 2005--2008, by AJ Rossini <blindglobe@gmail.com>
7 ;;; License:    BSD, see the top level directory file LICENSE for details.
8 ;;; Purpose:    ASDF packaging for CommonLisp Stat
10 ;;; What is this talk of 'release'? Klingons do not make software
11 ;;; 'releases'.  Our software 'escapes', leaving a bloody trail of
12 ;;; designers and quality assurance people in its wake.
14 (in-package :cl-user)
16 (defpackage :lisp-stat-config
17   (:use :common-lisp)
18   (:export *default-path*
19            *lsos-files* *basic-files* *ls-files*
20            *lispstat-home-dir*
21            *lispstat-data-dir* *lispstat-examples-dir*))
23 (in-package :lisp-stat-config)
25 (defparameter *lispstat-home-dir*
26   (directory-namestring
27    (truename (asdf:system-definition-pathname :lispstat)))
28   "Value considered \"home\" for our data")
31   (setf *lispstat-home-dir*
32       (directory-namestring (truename (asdf:system-definition-pathname
33                                        :lispstat))))
36 (macrolet ((ls-dir (root-str)
37              `(pathname (concatenate 'string
38                                      (namestring *lispstat-home-dir*) ,root-str)))
40            (ls-defdir (target-dir-var  root-str)
41              `(defvar ,target-dir-var (ls-dir ,root-str))))
43   ;; reminder of testing
44   ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
45   ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
46   ;;(macroexpand-1 '(ls-dir "ASDF"))
48   (ls-defdir *lispstat-asdf-dir* "ASDF/")
49   (ls-defdir *lispstat-data-dir* "Data/")
50   (ls-defdir *lispstat-external-dir* "external/")
53 (pushnew *lispstat-asdf-dir* asdf:*central-registry*)
54 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft
56 ;;; back to our regularly scheduled work...
57 ;;; We should not need these, I think, but?
58 ;; (asdf:oos 'asdf:compile-op :cffi)            ;; FFI
59 ;; (asdf:oos 'asdf:compile-op :lift)            ;; Unit Testing 
60 ;; (asdf:oos 'asdf:load-op :cffi)            ;; FFI
61 ;; (asdf:oos 'asdf:load-op :lift)            ;; Unit Testing 
63 ;;; MAJOR HACK, FIXME!
64 ;;(load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
66 (in-package :cl-user)
68 (defpackage #:lispstat-system
69     (:use :common-lisp :asdf))
71 (in-package #:lispstat-system)
73 ;;; To avoid renaming everything from *.lsp to *.lisp...
74 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
75 ;;; NOT secure against serving multiple architectures/hardwares from
76 ;;; the same file system (i.e. PPC and x86 would not be
77 ;;; differentiated). 
79 (defclass lispstat-lsp-source-file (cl-source-file) ())
80 (defparameter *fasl-directory*
81    (make-pathname :directory '(:relative
82                                #+sbcl "sbcl-fasl"
83                                #+openmcl "openmcl-fasl"
84                                #+cmu "cmucl-fasl"
85                                #+clisp "clisp-fasl"
86                                #-(or sbcl openmcl clisp cmucl) "fasl"
87                                )))
90 ;;; Handle Luke's *.lsp suffix
91 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
92 (defmethod asdf::output-files :around ((operation compile-op)
93                                        (c lispstat-lsp-source-file))
94   (list (merge-pathnames *fasl-directory*
95                          (compile-file-pathname (component-pathname c)))))
96 ;;; again, thanks to Cyrus for saving me time...
99 (defsystem "lispstat"
100   :version #.(with-open-file
101                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
102                (read vers))
103   :author "A.J. Rossini <blindglobe@gmail.com>"
104   :license "BSD"
105   :description "CommonLispStat (CLS): A System for Statistical
106   Computing with Common Lisp; based on CLS alpha1 by Luke Tierney
107   <luke@stat.uiowa.edu> (apparently originally written when Luke was
108   at CMU, on leave somewhere?).   Last touched by him in 1991, then in
109   2005--2009." 
110   :serial t
111   :depends-on (:cffi :lisp-matrix :lift)
112   :components ((:static-file "version" :pathname #p"version.lisp-expr")
113                (:static-file "LICENSE")
114                (:static-file "README")
115                
116                (:module "packaging"
117                         :pathname #p"src/"
118                         :components
119                         ((:file "packages")))
121                (:module "proto-objects"
122                         :pathname "src/objsys/"
123                         :serial t
124                         :depends-on ("packaging")
125                         :components
126                         ((:lispstat-lsp-source-file "lsobjects")))
128                (:module "lispstat-core"
129                         :pathname "src/basics/"
130                         :serial t
131                         :depends-on ("packaging" "proto-objects")
132                         :components
133                         (; (:lispstat-lsp-source-file "defsys")
134                          (:lispstat-lsp-source-file "lstypes")
135                          (:lispstat-lsp-source-file "lsfloat")
136                          
137                          (:lispstat-lsp-source-file "compound")
138                          (:lispstat-lsp-source-file "lsmacros" 
139                                                     :depends-on ("compound"))
140                          
141                          (:lispstat-lsp-source-file "lsmath"
142                                                     :depends-on ("compound"
143                                                                  "lsmacros"
144                                                                  "lsfloat"))))
146                (:module
147                 "numerics-internal"
148                 :pathname "src/numerics/"
149                 :depends-on ("packaging" "proto-objects" "lispstat-core")
150                 :components
151                 ((:lispstat-lsp-source-file "cffiglue")
152                  (:lispstat-lsp-source-file "dists"
153                                             :depends-on ("cffiglue"))
155                  (:lispstat-lsp-source-file "matrices"
156                                             :depends-on ("cffiglue"))
157                  (:lispstat-lsp-source-file "ladata"
158                                             :depends-on ("cffiglue"
159                                                          "matrices"))
160                  (:file "linalg"
161                         :depends-on ("cffiglue"
162                                      "matrices"
163                                      "ladata"))
165                  ))
167                ;; reading in DSV files for data access
168                (:module 
169                 "csv-data"
170                 :pathname "src/data/"
171                 :components
172                 ((:file "test-cybertiggyr")
173                  (:file "dsv-cybertiggyr" :depends-on ( "test-cybertiggyr"))))
175                ;; prototype and CLOS approaches.
176                (:module
177                 "stat-data"
178                 :pathname "src/data/"
179                 :depends-on ("packaging"
180                              "proto-objects"
181                              "lispstat-core"
182                              "numerics-internal")
183                 :components
184                 ((:file "data-clos")
185                  (:file "data")))
187                (:module
188                 "lispstat-basics"
189                 :pathname "src/basics/"
190                 :depends-on ("packaging"
191                              "proto-objects"
192                              "lispstat-core"
193                              "numerics-internal"
194                              "stat-data")
195                 :components
196                 ((:lispstat-lsp-source-file "lsbasics")))
199                
200                (:module
201                 "descriptives"
202                 :pathname "src/describe/"
203                 :depends-on ("packaging"
204                              "proto-objects"
205                              "lispstat-core"
206                              "numerics-internal"
207                              "stat-data"
208                              "lispstat-basics")
209                 :components
210                 ((:lispstat-lsp-source-file "statistics")))
212                (:module
213                 "optimization"
214                 :pathname "src/numerics/"
215                 :depends-on ("packaging"
216                              "proto-objects"
217                              "lispstat-core"
218                              "numerics-internal"
219                              "stat-data"
220                              "lispstat-basics")
221                 :components
222                 ((:file "optimize")))
223                  
224                
225                ;; Applications
226                (:module
227                 "stat-models"
228                 :pathname "src/stat-models/"
229                 :depends-on ("packaging"
230                              "proto-objects"
231                              "lispstat-core"
232                              "numerics-internal"
233                              "lispstat-basics"
234                              "descriptives"
235                              "optimization")
236                 :components
237                 ((:file "regression")
238                  ;; (:lispstat-lsp-source-file "nonlin"
239                  ;;       :depends-on ("regression"))
240                  ;; (:lispstat-lsp-source-file "bayes"
241                  ;;       :depends-on ("regression"))
242                  ))
244                ;; Applications
245                (:module
246                 "example-data"
247                 :pathname "Data/"
248                 :depends-on ("packaging"
249                              "proto-objects"
250                              "lispstat-core"
251                              "numerics-internal"
252                              "lispstat-basics"
253                              "descriptives"
254                              "optimization")
255                 :components
256                 ((:file "examples")
257                  (:lispstat-lsp-source-file "absorbtion")
258                  (:lispstat-lsp-source-file "diabetes")
259                  (:lispstat-lsp-source-file "leukemia")
260                  (:lispstat-lsp-source-file "randu")
261                  (:lispstat-lsp-source-file "aircraft")
262                  (:lispstat-lsp-source-file "metabolism")
263                  (:lispstat-lsp-source-file "book")
264                  (:lispstat-lsp-source-file "heating")
265                  (:lispstat-lsp-source-file "oxygen")
266                  (:lispstat-lsp-source-file "stackloss") 
267                  (:lispstat-lsp-source-file "car-prices")
268                  (:lispstat-lsp-source-file "iris")
269                  (:lispstat-lsp-source-file "puromycin")
270                  (:lispstat-lsp-source-file "tutorial")))
272                (:module
273                  "lisp-stat-unittest"
274                 :depends-on  ("packaging" "proto-objects"
275                               "lispstat-core"
276                               "numerics-internal" 
277                               "stat-data"
278                               "lispstat-basics"
279                               "descriptives"
280                               "optimization"
281                               "stat-models"
282                               "example-data")
283                  :pathname "src/unittests/"
284                  :components ((:file "unittests")
285                               (:file "unittests-lstypes" :depends-on ("unittests"))
286                               (:file "unittests-specfn" :depends-on ("unittests"))
287                               (:file "unittests-prob" :depends-on ("unittests"))
288                               (:file "unittests-proto" :depends-on ("unittests"))
289                               (:file "unittests-regression" :depends-on ("unittests"))
290                               ;; not ready yet:
291                               ;; (:file "unittests-data-clos" :depends-on ("unittests"))
292                               ;; changing linear algebra system
293                               ;; (:file "unittests-arrays" :depends-on ("unittests"))
294                               ))))