2 ;;; Time-stamp: <2009-01-07 17:42:26 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 *lispstat-data-dir* *lispstat-examples-dir*))
23 (in-package :lisp-stat-config)
25 (defparameter *lispstat-home-dir*
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
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")
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
79 (defclass lispstat-lsp-source-file (cl-source-file) ())
80 (defparameter *fasl-directory*
81 (make-pathname :directory '(:relative
83 #+openmcl "openmcl-fasl"
86 #-(or sbcl openmcl clisp cmucl) "fasl"
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...
100 :version #.(with-open-file
101 (vers (merge-pathnames "version.lisp-expr" *load-truename*))
103 :author "A.J. Rossini <blindglobe@gmail.com>"
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
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")
119 ((:file "packages")))
121 (:module "proto-objects"
122 :pathname "src/objsys/"
124 :depends-on ("packaging")
126 ((:lispstat-lsp-source-file "lsobjects")))
128 (:module "lispstat-core"
129 :pathname "src/basics/"
131 :depends-on ("packaging" "proto-objects")
133 (; (:lispstat-lsp-source-file "defsys")
134 (:lispstat-lsp-source-file "lstypes")
135 (:lispstat-lsp-source-file "lsfloat")
137 (:lispstat-lsp-source-file "compound")
138 (:lispstat-lsp-source-file "lsmacros"
139 :depends-on ("compound"))
141 (:lispstat-lsp-source-file "lsmath"
142 :depends-on ("compound"
148 :pathname "src/numerics/"
149 :depends-on ("packaging" "proto-objects" "lispstat-core")
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"
161 :depends-on ("cffiglue"
167 ;; reading in DSV files for data access
170 :pathname "src/data/"
172 ((:file "test-cybertiggyr")
173 (:file "dsv-cybertiggyr" :depends-on ( "test-cybertiggyr"))))
175 ;; prototype and CLOS approaches.
178 :pathname "src/data/"
179 :depends-on ("packaging"
189 :pathname "src/basics/"
190 :depends-on ("packaging"
196 ((:lispstat-lsp-source-file "lsbasics")))
202 :pathname "src/describe/"
203 :depends-on ("packaging"
210 ((:lispstat-lsp-source-file "statistics")))
214 :pathname "src/numerics/"
215 :depends-on ("packaging"
222 ((:file "optimize")))
228 :pathname "src/stat-models/"
229 :depends-on ("packaging"
237 ((:file "regression")
238 ;; (:lispstat-lsp-source-file "nonlin"
239 ;; :depends-on ("regression"))
240 ;; (:lispstat-lsp-source-file "bayes"
241 ;; :depends-on ("regression"))
248 :depends-on ("packaging"
257 (:lispstat-lsp-source-file "absorbtion")
258 (:lispstat-lsp-source-file "diabetes")
259 (:lispstat-lsp-source-file "leukemia")
260 (:lispstat-lsp-source-file "randu")
261 (:lispstat-lsp-source-file "aircraft")
262 (:lispstat-lsp-source-file "metabolism")
263 (:lispstat-lsp-source-file "book")
264 (:lispstat-lsp-source-file "heating")
265 (:lispstat-lsp-source-file "oxygen")
266 (:lispstat-lsp-source-file "stackloss")
267 (:lispstat-lsp-source-file "car-prices")
268 (:lispstat-lsp-source-file "iris")
269 (:lispstat-lsp-source-file "puromycin")
270 (:lispstat-lsp-source-file "tutorial")))
274 :depends-on ("packaging" "proto-objects"
283 :pathname "src/unittests/"
284 :components ((:file "unittests")
285 (:file "unittests-lstypes" :depends-on ("unittests"))
286 (:file "unittests-specfn" :depends-on ("unittests"))
287 (:file "unittests-prob" :depends-on ("unittests"))
288 (:file "unittests-proto" :depends-on ("unittests"))
289 (:file "unittests-regression" :depends-on ("unittests"))
291 ;; (:file "unittests-data-clos" :depends-on ("unittests"))
292 ;; changing linear algebra system
293 ;; (:file "unittests-arrays" :depends-on ("unittests"))