loader fixes and docs. Most critical was to serializt the config stuff. Gotta,...
[CommonLispStat.git] / cls.asd
blob6cb8b55bdccfa7af3d3aab0010e64aa6bfc0f15d
1 ;;  -*- mode: lisp -*-
2 ;;; Time-stamp: <2010-10-10 16:04:08 tony>
3 ;;; Created:    <2005-05-30 17:09:47 blindglobe>
4 ;;; File:       cls.asd
5 ;;; Author:     AJ Rossini <blindglobe@gmail.com>
6 ;;; Copyright:  (c) 2005--2010, by AJ Rossini <blindglobe@gmail.com>
7 ;;; License:    MIT, see the file LICENSE.mit in this directory for details.
8 ;;; Purpose:    ASDF specification for Common Lisp Statistics
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 ;; Load ASDF if it isn't loaded -- BUT we need to ensure that we sync
15 ;; properly with the new ASDF!  Maybe we should make the git repo a
16 ;; submodule, and tag a particular version to use, pulling that
17 ;; version?
19 #-asdf(load (pathname (concatenate 'string (namestring *cls-external-dir*) "asdf")))
21 (in-package :cl-user)
23 ;;(pushnew *cls-asdf-dir* asdf:*central-registry*)
24 ;;(pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft
26 (cl:defpackage #:cls-system
27     (:use :common-lisp :asdf))
29 (in-package #:cls-system)
31 ;;; To avoid renaming everything from *.lsp to *.lisp...  borrowed
32 ;;; from Cyrus Harmon's work, for example for the ch-util.  NOT secure
33 ;;; against serving multiple architectures/hardwares from the same
34 ;;; file system (i.e. PPC and x86 would not be differentiated).
35 ;;; However, this might be more of a solution for quicklisp?
37 (defclass cls-lsp-source-file (cl-source-file) ())
38 (defparameter *fasl-directory*
39    (make-pathname :directory '(:relative
40                                #+sbcl "fasl-sbcl"
41                                #+openmcl "fasl-ccl"
42                                #+openmcl "fasl-ccl"
43                                #+cmu "fasl-cmucl"
44                                #+clisp "fasl-clisp"
45                                #-(or sbcl openmcl clisp cmucl) "fasl"
46                                )))
48 ;;; Handle Luke's *.lsp suffix
49 (defmethod source-file-type ((c cls-lsp-source-file) (s module)) "lsp")
50 (defmethod asdf::output-files :around ((operation compile-op)
51                                        (c cls-lsp-source-file))
52   (list (merge-pathnames *fasl-directory*
53                          (compile-file-pathname (component-pathname c)))))
54 ;;; again, thanks to Cyrus for saving me time...
57 (defsystem "cls"
58   :version #.(with-open-file
59                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
60                (read vers))
61   :author "A.J. Rossini <blindglobe@gmail.com>"
62   :license "BSD"
63   :description "Common Lisp Statistics (CLS): A System for Statistical
64   Computing with Common Lisp; based on Common LispStat (CLS alpha1) by
65   Luke Tierney <luke@stat.uiowa.edu> (apparently originally written
66   when Luke was at CMU, on leave at Bell Labs?).  Last touched by him
67   in 1991, then by AJR starting in 2005."
68   :serial t
69   :depends-on (:cffi
70                :xarray
71                :lisp-matrix ; on fnv, cl-blapack, ffa
72                :listoflist
73                :lift
74                :rsm-string
75                ;;      :cl-random ;; or cl-variates, or...?
76                ;; :cl-cairo2  :cl-2d
77                )
78   :components ((:static-file "version" :pathname #p"version.lisp-expr")
79                (:static-file "LICENSE.mit")
80                (:static-file "README")
82                (:module
83                 "packaging"
84                 :pathname #p"src/"
85                 :serial t
86                 :components
87                 ((:file "packages")
88                  (:file "config")))
90                (:module
91                 "proto-objects"
92                 :pathname "src/objsys/"
93                 :serial t
94                 :depends-on ("packaging")
95                 :components
96                 ((:cls-lsp-source-file "lsobjects")))
98                (:module "cls-core"
99                         :pathname "src/basics/"
100                         :serial t
101                         :depends-on ("packaging" "proto-objects")
102                         :components
103                         ((:cls-lsp-source-file "lstypes")
104                          (:cls-lsp-source-file "lsfloat")
105                          
106                          (:cls-lsp-source-file "compound")
107                          (:cls-lsp-source-file "lsmacros" 
108                                                     :depends-on ("compound"))
109                          
110                          (:cls-lsp-source-file "lsmath"
111                                                     :depends-on ("compound"
112                                                                  "lsmacros"
113                                                                  "lsfloat"))))
115                (:module
116                 "numerics-internal"
117                 :pathname "src/numerics/"
118                 :depends-on ("packaging" "proto-objects" "cls-core")
119                 :components
120                 ((:cls-lsp-source-file "cffiglue")
121                  (:cls-lsp-source-file "dists"
122                                             :depends-on ("cffiglue"))
124                  (:cls-lsp-source-file "matrices"
125                                             :depends-on ("cffiglue"))
126                  (:cls-lsp-source-file "ladata"
127                                             :depends-on ("cffiglue"
128                                                          "matrices"))
129                  (:file "linalg"
130                         :depends-on ("cffiglue"
131                                      "matrices"
132                                      "ladata"))
134                  ))
137                ;; Dataframes and statistical structures.
138                (:module
139                 "stat-data"
140                 :pathname "src/data/"
141                 :depends-on ("packaging"
142                              "proto-objects"
143                              "cls-core"
144                              "numerics-internal")
145                 :components
146                 ((:file "dataframe")
147                  (:file "dataframe-array")
148                  (:file "dataframe-matrixlike")
149                  (:file "dataframe-listoflist")
150                  (:file "data")
151                  (:file "data-xls-compat")
152                  (:file "import")))
154                (:module
155                 "cls-basics"
156                 :pathname "src/basics/"
157                 :depends-on ("packaging"
158                              "proto-objects"
159                              "cls-core"
160                              "numerics-internal"
161                              "stat-data")
162                 :components
163                 ((:cls-lsp-source-file "lsbasics")))
166                
167                (:module
168                 "descriptives"
169                 :pathname "src/describe/"
170                 :depends-on ("packaging"
171                              "proto-objects"
172                              "cls-core"
173                              "numerics-internal"
174                              "stat-data"
175                              "cls-basics")
176                 :components
177                 ((:cls-lsp-source-file "statistics")))
179                (:module
180                 "visualize"
181                 :pathname "src/visualize/"
182                 :depends-on ("cls-core")
183                 :components
184                 ((:file "plot")))
186                (:module
187                 "optimization"
188                 :pathname "src/numerics/"
189                 :depends-on ("packaging"
190                              "proto-objects"
191                              "cls-core"
192                              "numerics-internal"
193                              "stat-data"
194                              "cls-basics")
195                 :components
196                 ((:file "optimize")))
197                  
198                
199                ;; Applications
200                (:module
201                 "stat-models"
202                 :pathname "src/stat-models/"
203                 :depends-on ("packaging"
204                              "proto-objects"
205                              "cls-core"
206                              "numerics-internal"
207                              "cls-basics"
208                              "descriptives"
209                              "optimization")
210                 :components
211                 ((:file "regression")
212                  ;; (:cls-lsp-source-file "nonlin"
213                  ;;       :depends-on ("regression"))
214                  ;; (:cls-lsp-source-file "bayes"
215                  ;;       :depends-on ("regression"))
216                  ))
218                ;; Applications
219                (:module
220                 "example-data"
221                 :pathname "Data/"
222                 :depends-on ("packaging"
223                              "proto-objects"
224                              "cls-core"
225                              "numerics-internal"
226                              "cls-basics"
227                              "descriptives"
228                              "optimization")
229                 :components
230                 ((:file "examples")
231                  (:cls-lsp-source-file "absorbtion")
232                  (:cls-lsp-source-file "diabetes")
233                  (:cls-lsp-source-file "leukemia")
234                  (:cls-lsp-source-file "randu")
235                  (:cls-lsp-source-file "aircraft")
236                  (:cls-lsp-source-file "metabolism")
237                  (:cls-lsp-source-file "book")
238                  (:cls-lsp-source-file "heating")
239                  (:cls-lsp-source-file "oxygen")
240                  (:cls-lsp-source-file "stackloss") 
241                  (:cls-lsp-source-file "car-prices")
242                  (:cls-lsp-source-file "iris")
243                  (:cls-lsp-source-file "puromycin")
244                  (:cls-lsp-source-file "tutorial")))
246                (:module
247                  "lisp-stat-unittest"
248                 :depends-on  ("packaging" "proto-objects"
249                               "cls-core"
250                               "numerics-internal" 
251                               "stat-data"
252                               "cls-basics"
253                               "descriptives"
254                               "optimization"
255                               "stat-models"
256                               "example-data")
257                  :pathname "src/unittests/"
258                  :components ((:file "unittests")
259                               (:file "unittests-lstypes" :depends-on ("unittests"))
260                               (:file "unittests-specfn" :depends-on ("unittests"))
261                               (:file "unittests-prob" :depends-on ("unittests"))
262                               (:file "unittests-proto" :depends-on ("unittests"))
263                               (:file "unittests-regression" :depends-on ("unittests"))
264                               (:file "unittests-listoflist" :depends-on ("unittests"))
265                               (:file "unittests-arrays" :depends-on ("unittests"))
266                               (:file "unittests-dataframe" :depends-on ("unittests"))))))
269  (defmethod perform ((o test-op) (c (eql (find-system :cls))))
270     (describe (lift:run-tests :suite 'lisp-stat-unittests::lisp-stat-ut)))