cl-pdf and cl-typesetting examples.
[CommonLispStat.git] / lispstat.asd
blobe8c7111be1de7fc0a133f385f271ee9657ba8639
1 ;;  -*- mode: lisp -*-
2 ;;; Time-stamp: <2009-07-06 17:25: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")
30 (macrolet ((ls-dir (root-str)
31              `(pathname (concatenate 'string
32                                      (namestring *lispstat-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 *lispstat-asdf-dir* "ASDF"))
39   ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
40   ;;(macroexpand-1 '(ls-dir "ASDF"))
42   (ls-defdir *lispstat-asdf-dir* "ASDF/")
43   (ls-defdir *lispstat-data-dir* "Data/")
44   (ls-defdir *lispstat-external-dir* "external/")
47 ;;(pushnew *lispstat-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 #:lispstat-system
65     (:use :common-lisp :asdf))
67 (in-package #:lispstat-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 lispstat-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 lispstat-lsp-source-file) (s module)) "lsp")
88 (defmethod asdf::output-files :around ((operation compile-op)
89                                        (c lispstat-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 "lispstat"
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                :lisp-matrix
109                :lift
110                :xarray
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
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 "dataframe")
191                  (:file "data")
192                  (:file "listoflist")))
194                (:module
195                 "lispstat-basics"
196                 :pathname "src/basics/"
197                 :depends-on ("packaging"
198                              "proto-objects"
199                              "lispstat-core"
200                              "numerics-internal"
201                              "stat-data")
202                 :components
203                 ((:lispstat-lsp-source-file "lsbasics")))
206                
207                (:module
208                 "descriptives"
209                 :pathname "src/describe/"
210                 :depends-on ("packaging"
211                              "proto-objects"
212                              "lispstat-core"
213                              "numerics-internal"
214                              "stat-data"
215                              "lispstat-basics")
216                 :components
217                 ((:lispstat-lsp-source-file "statistics")))
219                (:module
220                 "visualize"
221                 :pathname "src/visualize/"
222                 :depends-on ("lispstat-core")
223                 :components
224                 ((:file "plot")))
226                (:module
227                 "optimization"
228                 :pathname "src/numerics/"
229                 :depends-on ("packaging"
230                              "proto-objects"
231                              "lispstat-core"
232                              "numerics-internal"
233                              "stat-data"
234                              "lispstat-basics")
235                 :components
236                 ((:file "optimize")))
237                  
238                
239                ;; Applications
240                (:module
241                 "stat-models"
242                 :pathname "src/stat-models/"
243                 :depends-on ("packaging"
244                              "proto-objects"
245                              "lispstat-core"
246                              "numerics-internal"
247                              "lispstat-basics"
248                              "descriptives"
249                              "optimization")
250                 :components
251                 ((:file "regression")
252                  ;; (:lispstat-lsp-source-file "nonlin"
253                  ;;       :depends-on ("regression"))
254                  ;; (:lispstat-lsp-source-file "bayes"
255                  ;;       :depends-on ("regression"))
256                  ))
258                ;; Applications
259                (:module
260                 "example-data"
261                 :pathname "Data/"
262                 :depends-on ("packaging"
263                              "proto-objects"
264                              "lispstat-core"
265                              "numerics-internal"
266                              "lispstat-basics"
267                              "descriptives"
268                              "optimization")
269                 :components
270                 ((:file "examples")
271                  (:lispstat-lsp-source-file "absorbtion")
272                  (:lispstat-lsp-source-file "diabetes")
273                  (:lispstat-lsp-source-file "leukemia")
274                  (:lispstat-lsp-source-file "randu")
275                  (:lispstat-lsp-source-file "aircraft")
276                  (:lispstat-lsp-source-file "metabolism")
277                  (:lispstat-lsp-source-file "book")
278                  (:lispstat-lsp-source-file "heating")
279                  (:lispstat-lsp-source-file "oxygen")
280                  (:lispstat-lsp-source-file "stackloss") 
281                  (:lispstat-lsp-source-file "car-prices")
282                  (:lispstat-lsp-source-file "iris")
283                  (:lispstat-lsp-source-file "puromycin")
284                  (:lispstat-lsp-source-file "tutorial")))
286                (:module
287                  "lisp-stat-unittest"
288                 :depends-on  ("packaging" "proto-objects"
289                               "lispstat-core"
290                               "numerics-internal" 
291                               "stat-data"
292                               "lispstat-basics"
293                               "descriptives"
294                               "optimization"
295                               "stat-models"
296                               "example-data")
297                  :pathname "src/unittests/"
298                  :components ((:file "unittests")
299                               (:file "unittests-lstypes" :depends-on ("unittests"))
300                               (:file "unittests-specfn" :depends-on ("unittests"))
301                               (:file "unittests-prob" :depends-on ("unittests"))
302                               (:file "unittests-proto" :depends-on ("unittests"))
303                               (:file "unittests-regression" :depends-on ("unittests"))
304                               (:file "unittests-listoflist" :depends-on ("unittests"))
305                               (:file "unittests-arrays" :depends-on ("unittests"))
306                               (:file "unittests-dataframe" :depends-on ("unittests"))))))