2 ;;; Time-stamp: <2009-03-21 09:27:37 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
114 :cl-plplot ;; FIXME: conditionally load only, not always simple to install?
117 :components ((:static-file "version" :pathname #p"version.lisp-expr")
118 (:static-file "LICENSE")
119 (:static-file "README")
121 ;; reading in DSV files for data access
124 :pathname "src/data/"
126 ((:file "test-cybertiggyr")
127 (:file "dsv-cybertiggyr" :depends-on ( "test-cybertiggyr"))))
132 :depends-on ("csv-data")
134 ((:file "packages")))
138 :pathname "src/objsys/"
140 :depends-on ("packaging")
142 ((:lispstat-lsp-source-file "lsobjects")))
144 (:module "lispstat-core"
145 :pathname "src/basics/"
147 :depends-on ("packaging" "proto-objects")
149 (; (:lispstat-lsp-source-file "defsys")
150 (:lispstat-lsp-source-file "lstypes")
151 (:lispstat-lsp-source-file "lsfloat")
153 (:lispstat-lsp-source-file "compound")
154 (:lispstat-lsp-source-file "lsmacros"
155 :depends-on ("compound"))
157 (:lispstat-lsp-source-file "lsmath"
158 :depends-on ("compound"
164 :pathname "src/numerics/"
165 :depends-on ("packaging" "proto-objects" "lispstat-core")
167 ((:lispstat-lsp-source-file "cffiglue")
168 (:lispstat-lsp-source-file "dists"
169 :depends-on ("cffiglue"))
171 (:lispstat-lsp-source-file "matrices"
172 :depends-on ("cffiglue"))
173 (:lispstat-lsp-source-file "ladata"
174 :depends-on ("cffiglue"
177 :depends-on ("cffiglue"
184 ;; prototype and CLOS approaches.
187 :pathname "src/data/"
188 :depends-on ("packaging"
195 (:file "listoflist")))
199 :pathname "src/basics/"
200 :depends-on ("packaging"
206 ((:lispstat-lsp-source-file "lsbasics")))
212 :pathname "src/describe/"
213 :depends-on ("packaging"
220 ((:lispstat-lsp-source-file "statistics")))
224 :pathname "src/visualize/"
225 :depends-on ("lispstat-core")
231 :pathname "src/numerics/"
232 :depends-on ("packaging"
239 ((:file "optimize")))
245 :pathname "src/stat-models/"
246 :depends-on ("packaging"
254 ((:file "regression")
255 ;; (:lispstat-lsp-source-file "nonlin"
256 ;; :depends-on ("regression"))
257 ;; (:lispstat-lsp-source-file "bayes"
258 ;; :depends-on ("regression"))
265 :depends-on ("packaging"
274 (:lispstat-lsp-source-file "absorbtion")
275 (:lispstat-lsp-source-file "diabetes")
276 (:lispstat-lsp-source-file "leukemia")
277 (:lispstat-lsp-source-file "randu")
278 (:lispstat-lsp-source-file "aircraft")
279 (:lispstat-lsp-source-file "metabolism")
280 (:lispstat-lsp-source-file "book")
281 (:lispstat-lsp-source-file "heating")
282 (:lispstat-lsp-source-file "oxygen")
283 (:lispstat-lsp-source-file "stackloss")
284 (:lispstat-lsp-source-file "car-prices")
285 (:lispstat-lsp-source-file "iris")
286 (:lispstat-lsp-source-file "puromycin")
287 (:lispstat-lsp-source-file "tutorial")))
291 :depends-on ("packaging" "proto-objects"
300 :pathname "src/unittests/"
301 :components ((:file "unittests")
302 (:file "unittests-lstypes" :depends-on ("unittests"))
303 (:file "unittests-specfn" :depends-on ("unittests"))
304 (:file "unittests-prob" :depends-on ("unittests"))
305 (:file "unittests-proto" :depends-on ("unittests"))
306 (:file "unittests-regression" :depends-on ("unittests"))
307 (:file "unittests-arrays" :depends-on ("unittests"))
308 (:file "unittests-data-clos" :depends-on ("unittests"))))))