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-09-17 20:11:50 tony>
6 ;;; Created: <2005-05-30 17:09:47 blindglobe>
8 ;; What package should we be in? Contaminating cl-user is probably EVIL.
12 (defvar *lispstat-home-dir*
13 (directory-namestring (truename (asdf:system-definition-pathname
15 "Value considered \"home\" for our data")
18 (setf *lispstat-home-dir*
19 (directory-namestring (truename (asdf:system-definition-pathname
23 (macrolet ((ls-dir (root-str)
24 `(pathname (concatenate 'string
25 (namestring *lispstat-home-dir*) ,root-str)))
27 (ls-defdir (target-dir-var root-str)
28 `(defvar ,target-dir-var (ls-dir ,root-str))))
30 ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
31 ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
32 ;;(macroexpand-1 '(ls-dir "ASDF"))
34 (ls-defdir *lispstat-asdf-dir* "ASDF/")
35 (ls-defdir *lispstat-data-dir* "data/")
36 (ls-defdir *lispstat-external-dir* "external/")
37 (ls-defdir *lispstat-examples-dir* "examples/"))
39 (pushnew *lispstat-asdf-dir* asdf:*central-registry*)
40 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
42 ;;; back to our regularly scheduled work...
43 ;;; We should not need these, I think, but?
44 ;; (asdf:oos 'asdf:compile-op :cffi) ;; FFI
45 ;; (asdf:oos 'asdf:compile-op :lift) ;; Unit Testing
46 ;; (asdf:oos 'asdf:load-op :cffi) ;; FFI
47 ;; (asdf:oos 'asdf:load-op :lift) ;; Unit Testing
49 ;;; MAJOR HACK, FIXME!
50 ;;(load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
54 (defpackage #:lispstat-system
55 (:use :asdf :common-lisp))
57 (in-package #:lispstat-system)
59 ;;; To avoid renaming everything from *.lsp to *.lisp...
60 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
61 ;;; NOT secure against serving multiple architectures/hardwares from
62 ;;; the same file system (i.e. PPC and x86 would not be
65 (defclass lispstat-lsp-source-file (cl-source-file) ())
66 (defparameter *fasl-directory*
67 (make-pathname :directory '(:relative
69 #+openmcl "openmcl-fasl"
72 #-(or sbcl openmcl clisp cmucl) "fasl"
76 ;;; Handle Luke's *.lsp suffix
77 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
78 (defmethod asdf::output-files :around ((operation compile-op)
79 (c lispstat-lsp-source-file))
80 (list (merge-pathnames *fasl-directory*
81 (compile-file-pathname (component-pathname c)))))
82 ;;; again, thanks to Cyrus for saving me time...
86 :version #.(with-open-file
87 (vers (merge-pathnames "version.lisp-expr" *load-truename*))
89 :author "A.J. Rossini <blindglobe@gmail.com>"
91 :description "CommonLispStat (CLS): A System for Statistical Computing with Common Lisp;
92 based on CLS alpha1 by Luke Tierney <luke@stat.uiowa.edu> (originally written when Luke was at CMU, apparently).
93 Last touched 1991, then in 2005--2008."
95 :depends-on (:cffi :lift) ;; need a matrix library
96 :components ((:static-file "version" :pathname #p"version.lisp-expr")
97 (:static-file "LICENSE")
98 (:static-file "README")
100 (:module "proto-objects"
101 :pathname "src/objsys/"
102 :components ((:lispstat-lsp-source-file "lsobjects")))
104 (:lispstat-lsp-source-file "defsys")
105 (:lispstat-lsp-source-file "lstypes")
106 (:lispstat-lsp-source-file "lsfloat")
108 (:lispstat-lsp-source-file "compound"
109 :depends-on ("proto-objects"))
110 (:lispstat-lsp-source-file "lsmacros"
111 :depends-on ("compound"))
113 (:lispstat-lsp-source-file "lsmath"
114 :depends-on ("proto-objects"
119 (:module "numerics-internal"
120 :pathname "src/numerics"
122 ((:lispstat-lsp-source-file "cffiglue")
123 (:lispstat-lsp-source-file "dists"
124 :depends-on ("cffiglue"
126 (:lispstat-lsp-source-file "matrices"
127 :depends-on ("cffiglue"
129 (:lispstat-lsp-source-file "ladata"
130 :depends-on ("cffiglue"
135 (:lispstat-lsp-source-file "linalg"
136 :depends-on ("cffiglue"
144 (:file "data" :depends-on ("proto-objects"
146 "numerics-internal" ;; "matrices" "linalg"
149 ;; there is a circ reference which we need to solve.
150 (:lispstat-lsp-source-file "lsbasics"
151 :depends-on ("proto-objects"
156 ;; "matrices" "linalg" "dists"
159 (:lispstat-lsp-source-file "statistics"
160 :depends-on ("proto-objects"
163 "ladata" "matrices" "linalg"
167 (:file "optimize" :depends-on ("proto-objects"
179 (:lispstat-lsp-source-file "regression"
180 :depends-on ("proto-objects"
187 ; (:lispstat-lsp-source-file "nonlin"
188 ; :depends-on ("regression"))
190 ; (:lispstat-lsp-source-file "bayes"
191 ; :depends-on ("proto-objects"
198 :depends-on ("proto-objects"
210 :components ((:file "ls-user")))
214 :depends-on ( "lisp-stat-core") ;; shouldn't need :lift!
215 :pathname "src/unittests/"
216 :components ((:file "unittests")
217 (:file "unittests-lstypes")
218 ;; "unittests-arrays.lisp"
219 ;; "unittests-data-clos.lisp"
220 ;; "unittests-proto.lisp"
221 ;; "unittests-regression.lisp"