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:11 tony>
6 ;;; Created: <2005-05-30 17:09:47 blindglobe>
8 ;; (setf *my-base-directory*
9 ;; #p"/home/tony/sandbox/CLS.git/"
10 ;; #p"/Users/ungil/lisp/CommonLispStat/")
12 ;; What package should we be in? Contaminating cl-user is probably EVIL.
16 (defvar *lispstat-home-dir*
17 (directory-namestring (truename (asdf:system-definition-pathname
19 "Value considered \"home\" for our data")
22 (setf *lispstat-home-dir*
23 (directory-namestring (truename (asdf:system-definition-pathname
27 (macrolet ((ls-dir (root-str)
28 `(pathname (concatenate 'string
29 (namestring *lispstat-home-dir*) ,root-str)))
31 (ls-defdir (target-dir-var root-str)
32 `(defvar ,target-dir-var (ls-dir ,root-str))))
34 ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
35 ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
36 ;;(macroexpand-1 '(ls-dir "ASDF"))
38 (ls-defdir *lispstat-asdf-dir* "ASDF/")
39 (ls-defdir *lispstat-data-dir* "data/")
40 (ls-defdir *lispstat-external-dir* "external/")
41 (ls-defdir *lispstat-examples-dir* "examples/"))
43 (pushnew *lispstat-asdf-dir* asdf:*central-registry*)
44 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
46 ;;; back to our regularly scheduled work...
47 ;;; We should not need these, I think, but?
48 ;; (asdf:oos 'asdf:compile-op :cffi) ;; FFI
49 ;; (asdf:oos 'asdf:compile-op :lift) ;; Unit Testing
50 ;; (asdf:oos 'asdf:load-op :cffi) ;; FFI
51 ;; (asdf:oos 'asdf:load-op :lift) ;; Unit Testing
53 ;;; MAJOR HACK, FIXME!
54 ;;(load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
58 (defpackage #:lispstat-system
59 (:use :asdf :common-lisp))
61 (in-package #:lispstat-system)
63 ;;; To avoid renaming everything from *.lsp to *.lisp...
64 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
65 ;;; NOT secure against serving multiple architectures/hardwares from
66 ;;; the same file system (i.e. PPC and x86 would not be
69 (defclass lispstat-lsp-source-file (cl-source-file) ())
70 (defparameter *fasl-directory*
71 (make-pathname :directory '(:relative
73 #+openmcl "openmcl-fasl"
76 #-(or sbcl openmcl clisp cmucl) "fasl"
80 ;;; Handle Luke's *.lsp suffix
81 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
82 (defmethod asdf::output-files :around ((operation compile-op)
83 (c lispstat-lsp-source-file))
84 (list (merge-pathnames *fasl-directory*
85 (compile-file-pathname (component-pathname c)))))
86 ;;; again, thanks to Cyrus for saving me time...
90 :version #.(with-open-file
91 (vers (merge-pathnames "version.lisp-expr" *load-truename*))
93 :author "A.J. Rossini <blindglobe@gmail.com>"
95 :description "CommonLispStat (CLS): A System for Statistical Computing with Common Lisp;
96 based on CLS alpha1 by Luke Tierney <luke@stat.uiowa.edu> (originally written when Luke was at CMU, apparently).
97 Last touched 1991, then in 2005--2008."
99 :depends-on (:cffi :lift) ;; need a matrix library
100 :components ((:static-file "version" :pathname #p"version.lisp-expr")
101 (:module "proto-objects"
102 :pathname "src/objsys/"
103 :components ((:lispstat-lsp-source-file "lsobjects")))
105 (:lispstat-lsp-source-file "cffiglue")
106 (:lispstat-lsp-source-file "defsys")
107 (:lispstat-lsp-source-file "lstypes")
108 (:lispstat-lsp-source-file "lsfloat")
110 (:lispstat-lsp-source-file "compound"
111 :depends-on ("proto-objects"))
112 (:lispstat-lsp-source-file "lsmacros"
113 :depends-on ("compound"))
115 (:lispstat-lsp-source-file "dists"
116 :depends-on ("cffiglue"
119 (:lispstat-lsp-source-file "lsmath"
120 :depends-on ("proto-objects"
126 (:lispstat-lsp-source-file "matrices"
127 :depends-on ("cffiglue"
130 (:lispstat-lsp-source-file "ladata"
131 :depends-on ("cffiglue"
137 (:lispstat-lsp-source-file "linalg"
138 :depends-on ("cffiglue"
146 (:file "data" :depends-on ("proto-objects"
151 ;; there is a circ reference which we need to solve.
152 (:lispstat-lsp-source-file "lsbasics"
153 :depends-on ("proto-objects"
161 (:lispstat-lsp-source-file "statistics"
162 :depends-on ("proto-objects"
165 "ladata" "matrices" "linalg"
169 (:file "optimize" :depends-on ("proto-objects"
181 (:lispstat-lsp-source-file "regression"
182 :depends-on ("proto-objects"
189 ; (:lispstat-lsp-source-file "nonlin"
190 ; :depends-on ("regression"))
192 ; (:lispstat-lsp-source-file "bayes"
193 ; :depends-on ("proto-objects"
200 :depends-on ("proto-objects"
212 :components ((:file "ls-user")))
216 :depends-on ( "lisp-stat-core") ;; shouldn't need :lift!
217 :pathname "src/unittests/"
218 :components ((:file "unittests")
219 (:file "unittests-lstypes")
220 ;; "unittests-arrays.lisp"
221 ;; "unittests-data-clos.lisp"
222 ;; "unittests-proto.lisp"
223 ;; "unittests-regression.lisp"
225 (:static-file "LICENSE")
226 (:static-file "README")