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-08-27 21:34:22 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*
14 (truename (asdf:system-definition-pathname :lispstat)))
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 :common-lisp :asdf))
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/"
103 ((:lispstat-lsp-source-file "lsobjects")))
105 (:module "lispstat-core"
106 :pathname "src/basics/"
108 :depends-on ("proto-objects")
110 ((:lispstat-lsp-source-file "defsys")
111 (:lispstat-lsp-source-file "lstypes")
112 (:lispstat-lsp-source-file "lsfloat")
114 (:lispstat-lsp-source-file "compound")
115 (:lispstat-lsp-source-file "lsmacros"
116 :depends-on ("compound"))
118 (:lispstat-lsp-source-file "lsmath"
119 :depends-on ("compound"
125 :pathname "src/numerics/"
126 :depends-on ("proto-objects" "lispstat-core")
128 ((:lispstat-lsp-source-file "cffiglue")
129 (:lispstat-lsp-source-file "dists"
130 :depends-on ("cffiglue"))
131 (:lispstat-lsp-source-file "matrices"
132 :depends-on ("cffiglue"))
133 (:lispstat-lsp-source-file "ladata"
134 :depends-on ("cffiglue"
136 (:lispstat-lsp-source-file "linalg"
137 :depends-on ("cffiglue"
143 :pathname "src/data/"
144 :depends-on ("proto-objects"
148 (;; (:file "data-clos")
151 ;; there is a circ reference which we need to solve.
152 (:lispstat-lsp-source-file
154 :depends-on ("proto-objects"
156 "numerics-internal" ))
158 (:lispstat-lsp-source-file
160 :depends-on ("proto-objects"
168 :depends-on ("proto-objects"
170 "numerics-internal"))
175 :pathname "src/stat-models/"
176 :depends-on ("proto-objects"
182 ((:lispstat-lsp-source-file "regression")
183 ;; (:lispstat-lsp-source-file "nonlin"
184 ;; :depends-on ("regression"))
185 ;; (:lispstat-lsp-source-file "bayes"
186 ;; :depends-on ("proto-objects"
194 :depends-on ("proto-objects"
201 :components ((:file "ls-user")))
205 :depends-on ( "lisp-stat-one" ) ;; shouldn't need :lift!
206 :pathname "src/unittests/"
207 :components ((:file "unittests")
208 (:file "unittests-lstypes")
209 ;; "unittests-arrays.lisp"
210 ;; "unittests-data-clos.lisp"
211 ;; "unittests-proto.lisp"
212 ;; "unittests-regression.lisp"