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