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