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.
10 ;;; Time-stamp: <2008-08-27 21:16:50 tony>
11 ;;; Created: <2005-05-30 17:09:47 blindglobe>
13 ;; What package should we be in? Contaminating cl-user is probably EVIL.
17 (defvar *lispstat-home-dir*
19 (truename (asdf:system-definition-pathname :lispstat)))
20 "Value considered \"home\" for our data")
23 (setf *lispstat-home-dir*
24 (directory-namestring (truename (asdf:system-definition-pathname
28 (macrolet ((ls-dir (root-str)
29 `(pathname (concatenate 'string
30 (namestring *lispstat-home-dir*) ,root-str)))
32 (ls-defdir (target-dir-var root-str)
33 `(defvar ,target-dir-var (ls-dir ,root-str))))
35 ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
36 ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
37 ;;(macroexpand-1 '(ls-dir "ASDF"))
39 (ls-defdir *lispstat-asdf-dir* "ASDF/")
40 (ls-defdir *lispstat-data-dir* "data/")
41 (ls-defdir *lispstat-external-dir* "external/")
42 (ls-defdir *lispstat-examples-dir* "examples/"))
44 (pushnew *lispstat-asdf-dir* asdf:*central-registry*)
45 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
47 ;;; back to our regularly scheduled work...
48 ;;; We should not need these, I think, but?
49 ;; (asdf:oos 'asdf:compile-op :cffi) ;; FFI
50 ;; (asdf:oos 'asdf:compile-op :lift) ;; Unit Testing
51 ;; (asdf:oos 'asdf:load-op :cffi) ;; FFI
52 ;; (asdf:oos 'asdf:load-op :lift) ;; Unit Testing
54 ;;; MAJOR HACK, FIXME!
55 ;;(load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
59 (defpackage #:lispstat-system
60 (:use :common-lisp :asdf))
62 (in-package #:lispstat-system)
64 ;;; To avoid renaming everything from *.lsp to *.lisp...
65 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
66 ;;; NOT secure against serving multiple architectures/hardwares from
67 ;;; the same file system (i.e. PPC and x86 would not be
70 (defclass lispstat-lsp-source-file (cl-source-file) ())
71 (defparameter *fasl-directory*
72 (make-pathname :directory '(:relative
74 #+openmcl "openmcl-fasl"
77 #-(or sbcl openmcl clisp cmucl) "fasl"
81 ;;; Handle Luke's *.lsp suffix
82 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
83 (defmethod asdf::output-files :around ((operation compile-op)
84 (c lispstat-lsp-source-file))
85 (list (merge-pathnames *fasl-directory*
86 (compile-file-pathname (component-pathname c)))))
87 ;;; again, thanks to Cyrus for saving me time...
91 :version #.(with-open-file
92 (vers (merge-pathnames "version.lisp-expr" *load-truename*))
94 :author "A.J. Rossini <blindglobe@gmail.com>"
96 :description "CommonLispStat (CLS): A System for Statistical Computing with Common Lisp;
97 based on CLS alpha1 by Luke Tierney <luke@stat.uiowa.edu> (originally written when Luke was at CMU, apparently).
98 Last touched 1991, then in 2005--2008."
100 :depends-on (:cffi :lift) ;; need a matrix library
101 :components ((:static-file "version" :pathname #p"version.lisp-expr")
102 (:static-file "LICENSE")
103 (:static-file "README")
105 (:module "proto-objects"
106 :pathname "src/objsys/"
108 ((:lispstat-lsp-source-file "lsobjects")))
110 (:module "lispstat-core"
111 :pathname "src/basics/"
113 :depends-on ("proto-objects")
115 ((:lispstat-lsp-source-file "defsys")
116 (:lispstat-lsp-source-file "lstypes")
117 (:lispstat-lsp-source-file "lsfloat")
119 (:lispstat-lsp-source-file "compound")
120 (:lispstat-lsp-source-file "lsmacros"
121 :depends-on ("compound"))
123 (:lispstat-lsp-source-file "lsmath"
124 :depends-on ("compound"
128 (:module "numerics-internal"
129 :pathname "src/numerics/"
130 :depends-on ("proto-objects" "lispstat-core")
132 ((:lispstat-lsp-source-file "cffiglue")
133 (:lispstat-lsp-source-file "dists"
134 :depends-on ("cffiglue"))
135 (:lispstat-lsp-source-file "matrices"
136 :depends-on ("cffiglue"))
137 (:lispstat-lsp-source-file "ladata"
138 :depends-on ("cffiglue"
140 (:lispstat-lsp-source-file "linalg"
141 :depends-on ("cffiglue"
146 :pathname "src/data/"
147 :depends-on ("proto-objects"
151 (;; (:file "data-clos")
154 ;; there is a circ reference which we need to solve.
155 (:lispstat-lsp-source-file "lsbasics"
156 :depends-on ("proto-objects"
158 "numerics-internal" ))
160 (:lispstat-lsp-source-file "statistics"
161 :depends-on ("proto-objects"
167 (:file "optimize" :depends-on ("proto-objects"
169 "numerics-internal"))
172 (:lispstat-lsp-source-file "regression"
173 :depends-on ("proto-objects"
178 ; (:lispstat-lsp-source-file "nonlin"
179 ; :depends-on ("regression"))
181 ; (:lispstat-lsp-source-file "bayes"
182 ; :depends-on ("proto-objects"
189 :depends-on ("proto-objects"
196 :components ((:file "ls-user")))
200 :depends-on ( "lisp-stat-one" ) ;; shouldn't need :lift!
201 :pathname "src/unittests/"
202 :components ((:file "unittests")
203 (:file "unittests-lstypes")
204 ;; "unittests-arrays.lisp"
205 ;; "unittests-data-clos.lisp"
206 ;; "unittests-proto.lisp"
207 ;; "unittests-regression.lisp"