2 ;;; Time-stamp: <2009-10-02 09:00:12 tony>
3 ;;; Created: <2005-05-30 17:09:47 blindglobe>
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.
16 (defpackage :lisp-stat-config
18 (:export *default-path*
19 *lsos-files* *basic-files* *ls-files*
21 *cls-data-dir* *cls-examples-dir*))
23 (in-package :lisp-stat-config)
25 (defparameter *cls-home-dir*
27 (truename (asdf:system-definition-pathname :cls)))
28 "Value considered \"home\" for our data")
30 (macrolet ((ls-dir (root-str)
31 `(pathname (concatenate 'string
32 (namestring *cls-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 *cls-asdf-dir* "ASDF"))
39 ;;(macroexpand-1 '(ls-defdir *cls-asdf-dir* "ASDF"))
40 ;;(macroexpand-1 '(ls-dir "ASDF"))
42 (ls-defdir *cls-asdf-dir* "ASDF/")
43 (ls-defdir *cls-data-dir* "Data/")
44 (ls-defdir *cls-external-dir* "external/")
47 ;;(pushnew *cls-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")
64 (defpackage #:cls-system
65 (:use :common-lisp :asdf))
67 (in-package #:cls-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
75 (defclass cls-lsp-source-file (cl-source-file) ())
76 (defparameter *fasl-directory*
77 (make-pathname :directory '(:relative
83 #-(or sbcl openmcl clisp cmucl) "fasl"
87 ;;; Handle Luke's *.lsp suffix
88 (defmethod source-file-type ((c cls-lsp-source-file) (s module)) "lsp")
89 (defmethod asdf::output-files :around ((operation compile-op)
90 (c cls-lsp-source-file))
91 (list (merge-pathnames *fasl-directory*
92 (compile-file-pathname (component-pathname c)))))
93 ;;; again, thanks to Cyrus for saving me time...
97 :version #.(with-open-file
98 (vers (merge-pathnames "version.lisp-expr" *load-truename*))
100 :author "A.J. Rossini <blindglobe@gmail.com>"
102 :description "Common Lisp Statistics (CLS): A System for Statistical
103 Computing with Common Lisp; based on CLS alpha1 by Luke Tierney
104 <luke@stat.uiowa.edu> (apparently originally written when Luke was
105 at CMU, on leave at Bell Labs?). Last touched by him in 1991, then
106 by AJR in 2005--2009."
115 :components ((:static-file "version" :pathname #p"version.lisp-expr")
116 (:static-file "LICENSE")
117 (:static-file "README")
119 ;; reading in DSV files for data access
123 :pathname "src/data/"
125 ((:file "test-cybertiggyr")
126 (:file "dsv-cybertiggyr" :depends-on ( "test-cybertiggyr"))))
131 ;; :depends-on ("csv-data")
133 ((:file "packages")))
137 :pathname "src/objsys/"
139 :depends-on ("packaging")
141 ((:cls-lsp-source-file "lsobjects")))
144 :pathname "src/basics/"
146 :depends-on ("packaging" "proto-objects")
148 (; (:cls-lsp-source-file "defsys")
149 (:cls-lsp-source-file "lstypes")
150 (:cls-lsp-source-file "lsfloat")
152 (:cls-lsp-source-file "compound")
153 (:cls-lsp-source-file "lsmacros"
154 :depends-on ("compound"))
156 (:cls-lsp-source-file "lsmath"
157 :depends-on ("compound"
163 :pathname "src/numerics/"
164 :depends-on ("packaging" "proto-objects" "cls-core")
166 ((:cls-lsp-source-file "cffiglue")
167 (:cls-lsp-source-file "dists"
168 :depends-on ("cffiglue"))
170 (:cls-lsp-source-file "matrices"
171 :depends-on ("cffiglue"))
172 (:cls-lsp-source-file "ladata"
173 :depends-on ("cffiglue"
176 :depends-on ("cffiglue"
183 ;; Dataframes and statistical structures.
186 :pathname "src/data/"
187 :depends-on ("packaging"
193 (:file "dataframe-array")
194 (:file "dataframe-matrixlike")
195 (:file "dataframe-listoflist")
198 ;;(:file "listoflist")
203 :pathname "src/basics/"
204 :depends-on ("packaging"
210 ((:cls-lsp-source-file "lsbasics")))
216 :pathname "src/describe/"
217 :depends-on ("packaging"
224 ((:cls-lsp-source-file "statistics")))
228 :pathname "src/visualize/"
229 :depends-on ("cls-core")
235 :pathname "src/numerics/"
236 :depends-on ("packaging"
243 ((:file "optimize")))
249 :pathname "src/stat-models/"
250 :depends-on ("packaging"
258 ((:file "regression")
259 ;; (:cls-lsp-source-file "nonlin"
260 ;; :depends-on ("regression"))
261 ;; (:cls-lsp-source-file "bayes"
262 ;; :depends-on ("regression"))
269 :depends-on ("packaging"
278 (:cls-lsp-source-file "absorbtion")
279 (:cls-lsp-source-file "diabetes")
280 (:cls-lsp-source-file "leukemia")
281 (:cls-lsp-source-file "randu")
282 (:cls-lsp-source-file "aircraft")
283 (:cls-lsp-source-file "metabolism")
284 (:cls-lsp-source-file "book")
285 (:cls-lsp-source-file "heating")
286 (:cls-lsp-source-file "oxygen")
287 (:cls-lsp-source-file "stackloss")
288 (:cls-lsp-source-file "car-prices")
289 (:cls-lsp-source-file "iris")
290 (:cls-lsp-source-file "puromycin")
291 (:cls-lsp-source-file "tutorial")))
295 :depends-on ("packaging" "proto-objects"
304 :pathname "src/unittests/"
305 :components ((:file "unittests")
306 (:file "unittests-lstypes" :depends-on ("unittests"))
307 (:file "unittests-specfn" :depends-on ("unittests"))
308 (:file "unittests-prob" :depends-on ("unittests"))
309 (:file "unittests-proto" :depends-on ("unittests"))
310 (:file "unittests-regression" :depends-on ("unittests"))
311 (:file "unittests-listoflist" :depends-on ("unittests"))
312 (:file "unittests-arrays" :depends-on ("unittests"))
313 (:file "unittests-dataframe" :depends-on ("unittests"))))))