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