typo fixes and whitespae.
[CommonLispStat.git] / lispstat.asd
blobf6b0296c052a8906b268cf0f2fff9999765ff976
1 ;;  -*- mode: lisp -*-
2 ;;; Time-stamp: <2009-03-11 20:06:32 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*)
56 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft
58 ;;; back to our regularly scheduled work...
59 ;;; We should not need these, I think, but?
60 ;; (asdf:oos 'asdf:compile-op :cffi)            ;; FFI
61 ;; (asdf:oos 'asdf:compile-op :lift)            ;; Unit Testing 
62 ;; (asdf:oos 'asdf:load-op :cffi)            ;; FFI
63 ;; (asdf:oos 'asdf:load-op :lift)            ;; Unit Testing 
65 ;;; MAJOR HACK, FIXME!
66 ;;(load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
68 (in-package :cl-user)
70 (defpackage #:lispstat-system
71     (:use :common-lisp :asdf))
73 (in-package #:lispstat-system)
75 ;;; To avoid renaming everything from *.lsp to *.lisp...
76 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
77 ;;; NOT secure against serving multiple architectures/hardwares from
78 ;;; the same file system (i.e. PPC and x86 would not be
79 ;;; differentiated). 
81 (defclass lispstat-lsp-source-file (cl-source-file) ())
82 (defparameter *fasl-directory*
83    (make-pathname :directory '(:relative
84                                #+sbcl "sbcl-fasl"
85                                #+openmcl "openmcl-fasl"
86                                #+cmu "cmucl-fasl"
87                                #+clisp "clisp-fasl"
88                                #-(or sbcl openmcl clisp cmucl) "fasl"
89                                )))
92 ;;; Handle Luke's *.lsp suffix
93 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
94 (defmethod asdf::output-files :around ((operation compile-op)
95                                        (c lispstat-lsp-source-file))
96   (list (merge-pathnames *fasl-directory*
97                          (compile-file-pathname (component-pathname c)))))
98 ;;; again, thanks to Cyrus for saving me time...
101 (defsystem "lispstat"
102   :version #.(with-open-file
103                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
104                (read vers))
105   :author "A.J. Rossini <blindglobe@gmail.com>"
106   :license "BSD"
107   :description "CommonLispStat (CLS): A System for Statistical
108   Computing with Common Lisp; based on CLS alpha1 by Luke Tierney
109   <luke@stat.uiowa.edu> (apparently originally written when Luke was
110   at CMU, on leave somewhere?).   Last touched by him in 1991, then in
111   2005--2009." 
112   :serial t
113   :depends-on (:cffi :lisp-matrix :lift)
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
119                (:module 
120                 "csv-data"
121                 :pathname "src/data/"
122                 :components
123                 ((:file "test-cybertiggyr")
124                  (:file "dsv-cybertiggyr" :depends-on ( "test-cybertiggyr"))))
125                
126                (:module
127                 "packaging"
128                 :pathname #p"src/"
129                 :depends-on ("csv-data")
130                 :components
131                 ((:file "packages")))
133                (:module
134                 "proto-objects"
135                 :pathname "src/objsys/"
136                 :serial t
137                 :depends-on ("packaging")
138                 :components
139                 ((:lispstat-lsp-source-file "lsobjects")))
141                (:module "lispstat-core"
142                         :pathname "src/basics/"
143                         :serial t
144                         :depends-on ("packaging" "proto-objects")
145                         :components
146                         (; (:lispstat-lsp-source-file "defsys")
147                          (:lispstat-lsp-source-file "lstypes")
148                          (:lispstat-lsp-source-file "lsfloat")
149                          
150                          (:lispstat-lsp-source-file "compound")
151                          (:lispstat-lsp-source-file "lsmacros" 
152                                                     :depends-on ("compound"))
153                          
154                          (:lispstat-lsp-source-file "lsmath"
155                                                     :depends-on ("compound"
156                                                                  "lsmacros"
157                                                                  "lsfloat"))))
159                (:module
160                 "numerics-internal"
161                 :pathname "src/numerics/"
162                 :depends-on ("packaging" "proto-objects" "lispstat-core")
163                 :components
164                 ((:lispstat-lsp-source-file "cffiglue")
165                  (:lispstat-lsp-source-file "dists"
166                                             :depends-on ("cffiglue"))
168                  (:lispstat-lsp-source-file "matrices"
169                                             :depends-on ("cffiglue"))
170                  (:lispstat-lsp-source-file "ladata"
171                                             :depends-on ("cffiglue"
172                                                          "matrices"))
173                  (:file "linalg"
174                         :depends-on ("cffiglue"
175                                      "matrices"
176                                      "ladata"))
178                  ))
181                ;; prototype and CLOS approaches.
182                (:module
183                 "stat-data"
184                 :pathname "src/data/"
185                 :depends-on ("packaging"
186                              "proto-objects"
187                              "lispstat-core"
188                              "numerics-internal")
189                 :components
190                 ((:file "data-clos")
191                  (:file "data")))
193                (:module
194                 "lispstat-basics"
195                 :pathname "src/basics/"
196                 :depends-on ("packaging"
197                              "proto-objects"
198                              "lispstat-core"
199                              "numerics-internal"
200                              "stat-data")
201                 :components
202                 ((:lispstat-lsp-source-file "lsbasics")))
205                
206                (:module
207                 "descriptives"
208                 :pathname "src/describe/"
209                 :depends-on ("packaging"
210                              "proto-objects"
211                              "lispstat-core"
212                              "numerics-internal"
213                              "stat-data"
214                              "lispstat-basics")
215                 :components
216                 ((:lispstat-lsp-source-file "statistics")))
218                (:module
219                 "optimization"
220                 :pathname "src/numerics/"
221                 :depends-on ("packaging"
222                              "proto-objects"
223                              "lispstat-core"
224                              "numerics-internal"
225                              "stat-data"
226                              "lispstat-basics")
227                 :components
228                 ((:file "optimize")))
229                  
230                
231                ;; Applications
232                (:module
233                 "stat-models"
234                 :pathname "src/stat-models/"
235                 :depends-on ("packaging"
236                              "proto-objects"
237                              "lispstat-core"
238                              "numerics-internal"
239                              "lispstat-basics"
240                              "descriptives"
241                              "optimization")
242                 :components
243                 ((:file "regression")
244                  ;; (:lispstat-lsp-source-file "nonlin"
245                  ;;       :depends-on ("regression"))
246                  ;; (:lispstat-lsp-source-file "bayes"
247                  ;;       :depends-on ("regression"))
248                  ))
250                ;; Applications
251                (:module
252                 "example-data"
253                 :pathname "Data/"
254                 :depends-on ("packaging"
255                              "proto-objects"
256                              "lispstat-core"
257                              "numerics-internal"
258                              "lispstat-basics"
259                              "descriptives"
260                              "optimization")
261                 :components
262                 ((:file "examples")
263                  (:lispstat-lsp-source-file "absorbtion")
264                  (:lispstat-lsp-source-file "diabetes")
265                  (:lispstat-lsp-source-file "leukemia")
266                  (:lispstat-lsp-source-file "randu")
267                  (:lispstat-lsp-source-file "aircraft")
268                  (:lispstat-lsp-source-file "metabolism")
269                  (:lispstat-lsp-source-file "book")
270                  (:lispstat-lsp-source-file "heating")
271                  (:lispstat-lsp-source-file "oxygen")
272                  (:lispstat-lsp-source-file "stackloss") 
273                  (:lispstat-lsp-source-file "car-prices")
274                  (:lispstat-lsp-source-file "iris")
275                  (:lispstat-lsp-source-file "puromycin")
276                  (:lispstat-lsp-source-file "tutorial")))
278                (:module
279                  "lisp-stat-unittest"
280                 :depends-on  ("packaging" "proto-objects"
281                               "lispstat-core"
282                               "numerics-internal" 
283                               "stat-data"
284                               "lispstat-basics"
285                               "descriptives"
286                               "optimization"
287                               "stat-models"
288                               "example-data")
289                  :pathname "src/unittests/"
290                  :components ((:file "unittests")
291                               (:file "unittests-lstypes" :depends-on ("unittests"))
292                               (:file "unittests-specfn" :depends-on ("unittests"))
293                               (:file "unittests-prob" :depends-on ("unittests"))
294                               (:file "unittests-proto" :depends-on ("unittests"))
295                               (:file "unittests-regression" :depends-on ("unittests"))
296                               ;; not ready yet:
297                               ;; (:file "unittests-data-clos" :depends-on ("unittests"))
298                               ;; changing linear algebra system
299                               ;; (:file "unittests-arrays" :depends-on ("unittests"))
300                               ))))