2 ;;; Time-stamp: <2009-02-19 17:53:25 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*)
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")
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
81 (defclass lispstat-lsp-source-file (cl-source-file) ())
82 (defparameter *fasl-directory*
83 (make-pathname :directory '(:relative
85 #+openmcl "openmcl-fasl"
88 #-(or sbcl openmcl clisp cmucl) "fasl"
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*))
105 :author "A.J. Rossini <blindglobe@gmail.com>"
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
113 :depends-on (:cffi :lisp-matrix :lift)
114 :components ((:static-file "version" :pathname #p"version.lisp-expr")
115 (:static-file "LICENSE")
116 (:static-file "README")
121 ((:file "packages")))
123 (:module "proto-objects"
124 :pathname "src/objsys/"
126 :depends-on ("packaging")
128 ((:lispstat-lsp-source-file "lsobjects")))
130 (:module "lispstat-core"
131 :pathname "src/basics/"
133 :depends-on ("packaging" "proto-objects")
135 (; (:lispstat-lsp-source-file "defsys")
136 (:lispstat-lsp-source-file "lstypes")
137 (:lispstat-lsp-source-file "lsfloat")
139 (:lispstat-lsp-source-file "compound")
140 (:lispstat-lsp-source-file "lsmacros"
141 :depends-on ("compound"))
143 (:lispstat-lsp-source-file "lsmath"
144 :depends-on ("compound"
150 :pathname "src/numerics/"
151 :depends-on ("packaging" "proto-objects" "lispstat-core")
153 ((:lispstat-lsp-source-file "cffiglue")
154 (:lispstat-lsp-source-file "dists"
155 :depends-on ("cffiglue"))
157 (:lispstat-lsp-source-file "matrices"
158 :depends-on ("cffiglue"))
159 (:lispstat-lsp-source-file "ladata"
160 :depends-on ("cffiglue"
163 :depends-on ("cffiglue"
169 ;; reading in DSV files for data access
172 :pathname "src/data/"
174 ((:file "test-cybertiggyr")
175 (:file "dsv-cybertiggyr" :depends-on ( "test-cybertiggyr"))))
177 ;; prototype and CLOS approaches.
180 :pathname "src/data/"
181 :depends-on ("packaging"
191 :pathname "src/basics/"
192 :depends-on ("packaging"
198 ((:lispstat-lsp-source-file "lsbasics")))
204 :pathname "src/describe/"
205 :depends-on ("packaging"
212 ((:lispstat-lsp-source-file "statistics")))
216 :pathname "src/numerics/"
217 :depends-on ("packaging"
224 ((:file "optimize")))
230 :pathname "src/stat-models/"
231 :depends-on ("packaging"
239 ((:file "regression")
240 ;; (:lispstat-lsp-source-file "nonlin"
241 ;; :depends-on ("regression"))
242 ;; (:lispstat-lsp-source-file "bayes"
243 ;; :depends-on ("regression"))
250 :depends-on ("packaging"
259 (:lispstat-lsp-source-file "absorbtion")
260 (:lispstat-lsp-source-file "diabetes")
261 (:lispstat-lsp-source-file "leukemia")
262 (:lispstat-lsp-source-file "randu")
263 (:lispstat-lsp-source-file "aircraft")
264 (:lispstat-lsp-source-file "metabolism")
265 (:lispstat-lsp-source-file "book")
266 (:lispstat-lsp-source-file "heating")
267 (:lispstat-lsp-source-file "oxygen")
268 (:lispstat-lsp-source-file "stackloss")
269 (:lispstat-lsp-source-file "car-prices")
270 (:lispstat-lsp-source-file "iris")
271 (:lispstat-lsp-source-file "puromycin")
272 (:lispstat-lsp-source-file "tutorial")))
276 :depends-on ("packaging" "proto-objects"
285 :pathname "src/unittests/"
286 :components ((:file "unittests")
287 (:file "unittests-lstypes" :depends-on ("unittests"))
288 (:file "unittests-specfn" :depends-on ("unittests"))
289 (:file "unittests-prob" :depends-on ("unittests"))
290 (:file "unittests-proto" :depends-on ("unittests"))
291 (:file "unittests-regression" :depends-on ("unittests"))
293 ;; (:file "unittests-data-clos" :depends-on ("unittests"))
294 ;; changing linear algebra system
295 ;; (:file "unittests-arrays" :depends-on ("unittests"))