More mudballs cruft. Need to refactor, see ditz.
[CommonLispStat.git] / lispstat.asd
blobb8b9d4f7ce1d85faaab02f02d7dd3d155f97aba6
1 ;;  -*- mode: lisp -*-
2 ;;; Time-stamp: <2009-04-21 08:11:06 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
114                :cl-plplot  ;; FIXME: conditionally load only, not always simple to install?
115                :lisp-matrix
116                :lift
117                :rsm-string)
118   :components ((:static-file "version" :pathname #p"version.lisp-expr")
119                (:static-file "LICENSE")
120                (:static-file "README")
122                ;; reading in DSV files for data access
123                (:module 
124                 "csv-data"
125                 :pathname "src/data/"
126                 :components
127                 ((:file "test-cybertiggyr")
128                  (:file "dsv-cybertiggyr" :depends-on ( "test-cybertiggyr"))))
129                
130                (:module
131                 "packaging"
132                 :pathname #p"src/"
133                 :depends-on ("csv-data")
134                 :components
135                 ((:file "packages")))
137                (:module
138                 "proto-objects"
139                 :pathname "src/objsys/"
140                 :serial t
141                 :depends-on ("packaging")
142                 :components
143                 ((:lispstat-lsp-source-file "lsobjects")))
145                (:module "lispstat-core"
146                         :pathname "src/basics/"
147                         :serial t
148                         :depends-on ("packaging" "proto-objects")
149                         :components
150                         (; (:lispstat-lsp-source-file "defsys")
151                          (:lispstat-lsp-source-file "lstypes")
152                          (:lispstat-lsp-source-file "lsfloat")
153                          
154                          (:lispstat-lsp-source-file "compound")
155                          (:lispstat-lsp-source-file "lsmacros" 
156                                                     :depends-on ("compound"))
157                          
158                          (:lispstat-lsp-source-file "lsmath"
159                                                     :depends-on ("compound"
160                                                                  "lsmacros"
161                                                                  "lsfloat"))))
163                (:module
164                 "numerics-internal"
165                 :pathname "src/numerics/"
166                 :depends-on ("packaging" "proto-objects" "lispstat-core")
167                 :components
168                 ((:lispstat-lsp-source-file "cffiglue")
169                  (:lispstat-lsp-source-file "dists"
170                                             :depends-on ("cffiglue"))
172                  (:lispstat-lsp-source-file "matrices"
173                                             :depends-on ("cffiglue"))
174                  (:lispstat-lsp-source-file "ladata"
175                                             :depends-on ("cffiglue"
176                                                          "matrices"))
177                  (:file "linalg"
178                         :depends-on ("cffiglue"
179                                      "matrices"
180                                      "ladata"))
182                  ))
185                ;; prototype and CLOS approaches.
186                (:module
187                 "stat-data"
188                 :pathname "src/data/"
189                 :depends-on ("packaging"
190                              "proto-objects"
191                              "lispstat-core"
192                              "numerics-internal")
193                 :components
194                 ((:file "dataframe")
195                  (:file "data")
196                  (:file "listoflist")))
198                (:module
199                 "lispstat-basics"
200                 :pathname "src/basics/"
201                 :depends-on ("packaging"
202                              "proto-objects"
203                              "lispstat-core"
204                              "numerics-internal"
205                              "stat-data")
206                 :components
207                 ((:lispstat-lsp-source-file "lsbasics")))
210                
211                (:module
212                 "descriptives"
213                 :pathname "src/describe/"
214                 :depends-on ("packaging"
215                              "proto-objects"
216                              "lispstat-core"
217                              "numerics-internal"
218                              "stat-data"
219                              "lispstat-basics")
220                 :components
221                 ((:lispstat-lsp-source-file "statistics")))
223                (:module
224                 "visualize"
225                 :pathname "src/visualize/"
226                 :depends-on ("lispstat-core")
227                 :components
228                 ((:file "plot")))
230                (:module
231                 "optimization"
232                 :pathname "src/numerics/"
233                 :depends-on ("packaging"
234                              "proto-objects"
235                              "lispstat-core"
236                              "numerics-internal"
237                              "stat-data"
238                              "lispstat-basics")
239                 :components
240                 ((:file "optimize")))
241                  
242                
243                ;; Applications
244                (:module
245                 "stat-models"
246                 :pathname "src/stat-models/"
247                 :depends-on ("packaging"
248                              "proto-objects"
249                              "lispstat-core"
250                              "numerics-internal"
251                              "lispstat-basics"
252                              "descriptives"
253                              "optimization")
254                 :components
255                 ((:file "regression")
256                  ;; (:lispstat-lsp-source-file "nonlin"
257                  ;;       :depends-on ("regression"))
258                  ;; (:lispstat-lsp-source-file "bayes"
259                  ;;       :depends-on ("regression"))
260                  ))
262                ;; Applications
263                (:module
264                 "example-data"
265                 :pathname "Data/"
266                 :depends-on ("packaging"
267                              "proto-objects"
268                              "lispstat-core"
269                              "numerics-internal"
270                              "lispstat-basics"
271                              "descriptives"
272                              "optimization")
273                 :components
274                 ((:file "examples")
275                  (:lispstat-lsp-source-file "absorbtion")
276                  (:lispstat-lsp-source-file "diabetes")
277                  (:lispstat-lsp-source-file "leukemia")
278                  (:lispstat-lsp-source-file "randu")
279                  (:lispstat-lsp-source-file "aircraft")
280                  (:lispstat-lsp-source-file "metabolism")
281                  (:lispstat-lsp-source-file "book")
282                  (:lispstat-lsp-source-file "heating")
283                  (:lispstat-lsp-source-file "oxygen")
284                  (:lispstat-lsp-source-file "stackloss") 
285                  (:lispstat-lsp-source-file "car-prices")
286                  (:lispstat-lsp-source-file "iris")
287                  (:lispstat-lsp-source-file "puromycin")
288                  (:lispstat-lsp-source-file "tutorial")))
290                (:module
291                  "lisp-stat-unittest"
292                 :depends-on  ("packaging" "proto-objects"
293                               "lispstat-core"
294                               "numerics-internal" 
295                               "stat-data"
296                               "lispstat-basics"
297                               "descriptives"
298                               "optimization"
299                               "stat-models"
300                               "example-data")
301                  :pathname "src/unittests/"
302                  :components ((:file "unittests")
303                               (:file "unittests-lstypes" :depends-on ("unittests"))
304                               (:file "unittests-specfn" :depends-on ("unittests"))
305                               (:file "unittests-prob" :depends-on ("unittests"))
306                               (:file "unittests-proto" :depends-on ("unittests"))
307                               (:file "unittests-regression" :depends-on ("unittests"))
308                               (:file "unittests-listoflist" :depends-on ("unittests"))
309                               (:file "unittests-arrays" :depends-on ("unittests"))
310                               (:file "unittests-dataframe" :depends-on ("unittests"))))))