2 ;;; Copyright (c) 2005--2008, by AJ Rossini <blindglobe@gmail.com>
3 ;;; ASDF packaging for CommonLisp Stat
4 ;;; License: BSD, see the top level directory file LICENSE for details.
5 ;;; Time-stamp: <2008-11-25 19:08:23 tony>
6 ;;; Created: <2005-05-30 17:09:47 blindglobe>
10 (defpackage :lisp-stat-config
12 (:export *default-path*
13 *lsos-files* *basic-files* *ls-files*
15 *lispstat-data-dir* *lispstat-examples-dir*))
17 (in-package :lisp-stat-config)
19 (defparameter *lispstat-home-dir*
21 (truename (asdf:system-definition-pathname :lispstat)))
22 "Value considered \"home\" for our data")
25 (setf *lispstat-home-dir*
26 (directory-namestring (truename (asdf:system-definition-pathname
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*)
48 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft
50 ;;; back to our regularly scheduled work...
51 ;;; We should not need these, I think, but?
52 ;; (asdf:oos 'asdf:compile-op :cffi) ;; FFI
53 ;; (asdf:oos 'asdf:compile-op :lift) ;; Unit Testing
54 ;; (asdf:oos 'asdf:load-op :cffi) ;; FFI
55 ;; (asdf:oos 'asdf:load-op :lift) ;; Unit Testing
57 ;;; MAJOR HACK, FIXME!
58 ;;(load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
62 (defpackage #:lispstat-system
63 (:use :common-lisp :asdf))
65 (in-package #:lispstat-system)
67 ;;; To avoid renaming everything from *.lsp to *.lisp...
68 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
69 ;;; NOT secure against serving multiple architectures/hardwares from
70 ;;; the same file system (i.e. PPC and x86 would not be
73 (defclass lispstat-lsp-source-file (cl-source-file) ())
74 (defparameter *fasl-directory*
75 (make-pathname :directory '(:relative
77 #+openmcl "openmcl-fasl"
80 #-(or sbcl openmcl clisp cmucl) "fasl"
84 ;;; Handle Luke's *.lsp suffix
85 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
86 (defmethod asdf::output-files :around ((operation compile-op)
87 (c lispstat-lsp-source-file))
88 (list (merge-pathnames *fasl-directory*
89 (compile-file-pathname (component-pathname c)))))
90 ;;; again, thanks to Cyrus for saving me time...
94 :version #.(with-open-file
95 (vers (merge-pathnames "version.lisp-expr" *load-truename*))
97 :author "A.J. Rossini <blindglobe@gmail.com>"
99 :description "CommonLispStat (CLS): A System for Statistical
100 Computing with Common Lisp; based on CLS alpha1 by Luke Tierney
101 <luke@stat.uiowa.edu> (apparently originally written when Luke was
102 at CMU, on leave somewhere?). Last touched by him in 1991, then in
105 :depends-on (:cffi :lift :lisp-matrix) ;; need a matrix library
106 :components ((:static-file "version" :pathname #p"version.lisp-expr")
107 (:static-file "LICENSE")
108 (:static-file "README")
113 ((:file "packages")))
115 (:module "proto-objects"
116 :pathname "src/objsys/"
118 :depends-on ("packaging")
120 ((:lispstat-lsp-source-file "lsobjects")))
122 (:module "lispstat-core"
123 :pathname "src/basics/"
125 :depends-on ("packaging" "proto-objects")
127 (; (:lispstat-lsp-source-file "defsys")
128 (:lispstat-lsp-source-file "lstypes")
129 (:lispstat-lsp-source-file "lsfloat")
131 (:lispstat-lsp-source-file "compound")
132 (:lispstat-lsp-source-file "lsmacros"
133 :depends-on ("compound"))
135 (:lispstat-lsp-source-file "lsmath"
136 :depends-on ("compound"
142 :pathname "src/numerics/"
143 :depends-on ("packaging" "proto-objects" "lispstat-core")
145 ((:lispstat-lsp-source-file "cffiglue")
146 (:lispstat-lsp-source-file "dists"
147 :depends-on ("cffiglue"))
148 (:lispstat-lsp-source-file "matrices"
149 :depends-on ("cffiglue"))
150 (:lispstat-lsp-source-file "ladata"
151 :depends-on ("cffiglue"
153 (:lispstat-lsp-source-file "linalg"
154 :depends-on ("cffiglue"
158 ;; prototype and CLOS approaches.
161 :pathname "src/data/"
162 :depends-on ("packaging"
172 :pathname "src/basics/"
173 :depends-on ("packaging"
179 ((:lispstat-lsp-source-file "lsbasics")))
184 :pathname "src/describe/"
185 :depends-on ("packaging"
192 ((:lispstat-lsp-source-file "statistics")))
196 :pathname "src/numerics/"
197 :depends-on ("packaging"
204 ((:file "optimize")))
210 :pathname "src/stat-models/"
211 :depends-on ("packaging"
219 ((:file "regression")
220 ;; (:lispstat-lsp-source-file "nonlin"
221 ;; :depends-on ("regression"))
222 ;; (:lispstat-lsp-source-file "bayes"
223 ;; :depends-on ("regression"))
230 :depends-on ("packaging"
239 (:lispstat-lsp-source-file "absorbtion")
240 (:lispstat-lsp-source-file "diabetes")
241 (:lispstat-lsp-source-file "leukemia")
242 (:lispstat-lsp-source-file "randu")
243 (:lispstat-lsp-source-file "aircraft")
244 (:lispstat-lsp-source-file "metabolism")
245 (:lispstat-lsp-source-file "book")
246 (:lispstat-lsp-source-file "heating")
247 (:lispstat-lsp-source-file "oxygen")
248 (:lispstat-lsp-source-file "stackloss")
249 (:lispstat-lsp-source-file "car-prices")
250 (:lispstat-lsp-source-file "iris")
251 (:lispstat-lsp-source-file "puromycin")
252 (:lispstat-lsp-source-file "tutorial")))
256 :depends-on ("packaging" "proto-objects"
265 :pathname "src/unittests/"
266 :components ((:file "unittests")
267 (:file "unittests-lstypes" :depends-on ("unittests"))
268 (:file "unittests-specfn" :depends-on ("unittests"))
269 (:file "unittests-prob" :depends-on ("unittests"))
270 (:file "unittests-proto" :depends-on ("unittests"))
271 (:file "unittests-regression" :depends-on ("unittests"))
273 ;; (:file "unittests-data-clos" :depends-on ("unittests"))
274 (:file "unittests-arrays" :depends-on ("unittests"))))))