Use CLS instead of LispStat to describe this system.
[CommonLispStat.git] / cls.asd
blobd5aca2b060c0d70d604185cd1c8015275b21c9d5
1 ;;  -*- mode: lisp -*-
2 ;;; Time-stamp: <2009-07-14 19:01:32 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--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            *cls-home-dir*
21            *cls-data-dir* *cls-examples-dir*))
23 (in-package :lisp-stat-config)
25 (defparameter *cls-home-dir*
26   (directory-namestring
27    (truename (asdf:system-definition-pathname :cls)))
28   "Value considered \"home\" for our data")
30 (macrolet ((ls-dir (root-str)
31              `(pathname (concatenate 'string
32                                      (namestring *cls-home-dir*) ,root-str)))
34            (ls-defdir (target-dir-var  root-str)
35              `(defvar ,target-dir-var (ls-dir ,root-str))))
37   ;; reminder of testing
38   ;;(macroexpand '(ls-defdir *cls-asdf-dir* "ASDF"))
39   ;;(macroexpand-1 '(ls-defdir *cls-asdf-dir* "ASDF"))
40   ;;(macroexpand-1 '(ls-dir "ASDF"))
42   (ls-defdir *cls-asdf-dir* "ASDF/")
43   (ls-defdir *cls-data-dir* "Data/")
44   (ls-defdir *cls-external-dir* "external/")
47 ;;(pushnew *cls-asdf-dir* asdf:*central-registry*)
50 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft
52 ;;; back to our regularly scheduled work...
53 ;;; We should not need these, I think, but?
54 ;; (asdf:oos 'asdf:compile-op :cffi)            ;; FFI
55 ;; (asdf:oos 'asdf:compile-op :lift)            ;; Unit Testing 
56 ;; (asdf:oos 'asdf:load-op :cffi)            ;; FFI
57 ;; (asdf:oos 'asdf:load-op :lift)            ;; Unit Testing 
59 ;;; MAJOR HACK, FIXME!
60 ;;(load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
62 (in-package :cl-user)
64 (defpackage #:cls-system
65     (:use :common-lisp :asdf))
67 (in-package #:cls-system)
69 ;;; To avoid renaming everything from *.lsp to *.lisp...
70 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
71 ;;; NOT secure against serving multiple architectures/hardwares from
72 ;;; the same file system (i.e. PPC and x86 would not be
73 ;;; differentiated). 
75 (defclass cls-lsp-source-file (cl-source-file) ())
76 (defparameter *fasl-directory*
77    (make-pathname :directory '(:relative
78                                #+sbcl "sbcl-fasl"
79                                #+openmcl "openmcl-fasl"
80                                #+cmu "cmucl-fasl"
81                                #+clisp "clisp-fasl"
82                                #-(or sbcl openmcl clisp cmucl) "fasl"
83                                )))
86 ;;; Handle Luke's *.lsp suffix
87 (defmethod source-file-type ((c cls-lsp-source-file) (s module)) "lsp")
88 (defmethod asdf::output-files :around ((operation compile-op)
89                                        (c cls-lsp-source-file))
90   (list (merge-pathnames *fasl-directory*
91                          (compile-file-pathname (component-pathname c)))))
92 ;;; again, thanks to Cyrus for saving me time...
95 (defsystem "cls"
96   :version #.(with-open-file
97                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
98                (read vers))
99   :author "A.J. Rossini <blindglobe@gmail.com>"
100   :license "BSD"
101   :description "Common Lisp Statistics (CLS): A System for Statistical
102   Computing with Common Lisp; based on CLS alpha1 by Luke Tierney
103   <luke@stat.uiowa.edu> (apparently originally written when Luke was
104   at CMU, on leave at Bell Labs?).  Last touched by him in 1991, then
105   by AJR in 2005--2009."
106   :serial t
107   :depends-on (:cffi
108                :xarray
109                :lisp-matrix
110                :lift
111                :rsm-string
112                ;;    :cl-cairo2  :cl-2d
113                )
114   :components ((:static-file "version" :pathname #p"version.lisp-expr")
115                (:static-file "LICENSE")
116                (:static-file "README")
118                ;; reading in DSV files for data access
120                (:module 
121                 "csv-data"
122                 :pathname "src/data/"
123                 :components
124                 ((:file "test-cybertiggyr")
125                  (:file "dsv-cybertiggyr" :depends-on ( "test-cybertiggyr"))))
126 |#             
127                (:module
128                 "packaging"
129                 :pathname #p"src/"
130                 ;; :depends-on ("csv-data")
131                 :components
132                 ((:file "packages")))
134                (:module
135                 "proto-objects"
136                 :pathname "src/objsys/"
137                 :serial t
138                 :depends-on ("packaging")
139                 :components
140                 ((:cls-lsp-source-file "lsobjects")))
142                (:module "cls-core"
143                         :pathname "src/basics/"
144                         :serial t
145                         :depends-on ("packaging" "proto-objects")
146                         :components
147                         (; (:cls-lsp-source-file "defsys")
148                          (:cls-lsp-source-file "lstypes")
149                          (:cls-lsp-source-file "lsfloat")
150                          
151                          (:cls-lsp-source-file "compound")
152                          (:cls-lsp-source-file "lsmacros" 
153                                                     :depends-on ("compound"))
154                          
155                          (:cls-lsp-source-file "lsmath"
156                                                     :depends-on ("compound"
157                                                                  "lsmacros"
158                                                                  "lsfloat"))))
160                (:module
161                 "numerics-internal"
162                 :pathname "src/numerics/"
163                 :depends-on ("packaging" "proto-objects" "cls-core")
164                 :components
165                 ((:cls-lsp-source-file "cffiglue")
166                  (:cls-lsp-source-file "dists"
167                                             :depends-on ("cffiglue"))
169                  (:cls-lsp-source-file "matrices"
170                                             :depends-on ("cffiglue"))
171                  (:cls-lsp-source-file "ladata"
172                                             :depends-on ("cffiglue"
173                                                          "matrices"))
174                  (:file "linalg"
175                         :depends-on ("cffiglue"
176                                      "matrices"
177                                      "ladata"))
179                  ))
182                ;; prototype and CLOS approaches.
183                (:module
184                 "stat-data"
185                 :pathname "src/data/"
186                 :depends-on ("packaging"
187                              "proto-objects"
188                              "cls-core"
189                              "numerics-internal")
190                 :components
191                 ((:file "dataframe")
192                  (:file "data")
193                  (:file "listoflist")))
195                (:module
196                 "cls-basics"
197                 :pathname "src/basics/"
198                 :depends-on ("packaging"
199                              "proto-objects"
200                              "cls-core"
201                              "numerics-internal"
202                              "stat-data")
203                 :components
204                 ((:cls-lsp-source-file "lsbasics")))
207                
208                (:module
209                 "descriptives"
210                 :pathname "src/describe/"
211                 :depends-on ("packaging"
212                              "proto-objects"
213                              "cls-core"
214                              "numerics-internal"
215                              "stat-data"
216                              "cls-basics")
217                 :components
218                 ((:cls-lsp-source-file "statistics")))
220                (:module
221                 "visualize"
222                 :pathname "src/visualize/"
223                 :depends-on ("cls-core")
224                 :components
225                 ((:file "plot")))
227                (:module
228                 "optimization"
229                 :pathname "src/numerics/"
230                 :depends-on ("packaging"
231                              "proto-objects"
232                              "cls-core"
233                              "numerics-internal"
234                              "stat-data"
235                              "cls-basics")
236                 :components
237                 ((:file "optimize")))
238                  
239                
240                ;; Applications
241                (:module
242                 "stat-models"
243                 :pathname "src/stat-models/"
244                 :depends-on ("packaging"
245                              "proto-objects"
246                              "cls-core"
247                              "numerics-internal"
248                              "cls-basics"
249                              "descriptives"
250                              "optimization")
251                 :components
252                 ((:file "regression")
253                  ;; (:cls-lsp-source-file "nonlin"
254                  ;;       :depends-on ("regression"))
255                  ;; (:cls-lsp-source-file "bayes"
256                  ;;       :depends-on ("regression"))
257                  ))
259                ;; Applications
260                (:module
261                 "example-data"
262                 :pathname "Data/"
263                 :depends-on ("packaging"
264                              "proto-objects"
265                              "cls-core"
266                              "numerics-internal"
267                              "cls-basics"
268                              "descriptives"
269                              "optimization")
270                 :components
271                 ((:file "examples")
272                  (:cls-lsp-source-file "absorbtion")
273                  (:cls-lsp-source-file "diabetes")
274                  (:cls-lsp-source-file "leukemia")
275                  (:cls-lsp-source-file "randu")
276                  (:cls-lsp-source-file "aircraft")
277                  (:cls-lsp-source-file "metabolism")
278                  (:cls-lsp-source-file "book")
279                  (:cls-lsp-source-file "heating")
280                  (:cls-lsp-source-file "oxygen")
281                  (:cls-lsp-source-file "stackloss") 
282                  (:cls-lsp-source-file "car-prices")
283                  (:cls-lsp-source-file "iris")
284                  (:cls-lsp-source-file "puromycin")
285                  (:cls-lsp-source-file "tutorial")))
287                (:module
288                  "lisp-stat-unittest"
289                 :depends-on  ("packaging" "proto-objects"
290                               "cls-core"
291                               "numerics-internal" 
292                               "stat-data"
293                               "cls-basics"
294                               "descriptives"
295                               "optimization"
296                               "stat-models"
297                               "example-data")
298                  :pathname "src/unittests/"
299                  :components ((:file "unittests")
300                               (:file "unittests-lstypes" :depends-on ("unittests"))
301                               (:file "unittests-specfn" :depends-on ("unittests"))
302                               (:file "unittests-prob" :depends-on ("unittests"))
303                               (:file "unittests-proto" :depends-on ("unittests"))
304                               (:file "unittests-regression" :depends-on ("unittests"))
305                               (:file "unittests-listoflist" :depends-on ("unittests"))
306                               (:file "unittests-arrays" :depends-on ("unittests"))
307                               (:file "unittests-dataframe" :depends-on ("unittests"))))))