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 12:06:22 tony>
6 ;;; Created: <2005-05-30 17:09:47 blindglobe>
10 (defvar *lispstat-home-dir*
12 (truename (asdf:system-definition-pathname :lispstat)))
13 "Value considered \"home\" for our data")
16 (setf *lispstat-home-dir*
17 (directory-namestring (truename (asdf:system-definition-pathname
21 (macrolet ((ls-dir (root-str)
22 `(pathname (concatenate 'string
23 (namestring *lispstat-home-dir*) ,root-str)))
25 (ls-defdir (target-dir-var root-str)
26 `(defvar ,target-dir-var (ls-dir ,root-str))))
28 ;; reminder of testing
29 ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
30 ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
31 ;;(macroexpand-1 '(ls-dir "ASDF"))
33 (ls-defdir *lispstat-asdf-dir* "ASDF/")
34 (ls-defdir *lispstat-data-dir* "data/")
35 (ls-defdir *lispstat-external-dir* "external/")
36 (ls-defdir *lispstat-examples-dir* "examples/"))
38 (pushnew *lispstat-asdf-dir* asdf:*central-registry*)
39 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft
41 ;;; back to our regularly scheduled work...
42 ;;; We should NOT need these, but have in the past due to errors...
43 ;; (asdf:oos 'asdf:compile-op :cffi) ;; FFI
44 ;; (asdf:oos 'asdf:compile-op :lift) ;; Unit Testing
45 ;; (asdf:oos 'asdf:load-op :cffi) ;; FFI
46 ;; (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
92 Computing with Common Lisp; based on CLS alpha1 by Luke Tierney
93 <luke@stat.uiowa.edu> (apparently originally written when Luke was
94 at CMU, on leave somewhere?). Last touched by him in 1991, then in
97 :depends-on (:cffi :lift :lisp-matrix) ;; need a matrix library
98 :components ((:static-file "version" :pathname #p"version.lisp-expr")
99 (:static-file "LICENSE")
100 (:static-file "README")
102 (:module "proto-objects"
103 :pathname "src/objsys/"
105 ((:lispstat-lsp-source-file "lsobjects")))
107 (:module "lispstat-core"
108 :pathname "src/basics/"
110 :depends-on ("proto-objects")
112 ((:lispstat-lsp-source-file "defsys")
113 (:lispstat-lsp-source-file "lstypes")
114 (:lispstat-lsp-source-file "lsfloat")
116 (:lispstat-lsp-source-file "compound")
117 (:lispstat-lsp-source-file "lsmacros"
118 :depends-on ("compound"))
120 (:lispstat-lsp-source-file "lsmath"
121 :depends-on ("compound"
127 :pathname "src/numerics/"
128 :depends-on ("proto-objects" "lispstat-core")
130 ((:lispstat-lsp-source-file "cffiglue")
131 (:lispstat-lsp-source-file "dists"
132 :depends-on ("cffiglue"))
133 (:lispstat-lsp-source-file "matrices"
134 :depends-on ("cffiglue"))
135 (:lispstat-lsp-source-file "ladata"
136 :depends-on ("cffiglue"
138 (:lispstat-lsp-source-file "linalg"
139 :depends-on ("cffiglue"
145 :pathname "src/data/"
146 :depends-on ("proto-objects"
150 (;; (:file "data-clos")
155 :pathname "src/basics/"
156 :depends-on ("proto-objects"
158 "numerics-internal" )
160 ((:lispstat-lsp-source-file "lsbasics")))
164 :pathname "src/describe/"
165 :depends-on ("proto-objects"
171 ((:lispstat-lsp-source-file "statistics")))
175 :pathname "src/numerics/"
176 :depends-on ("proto-objects"
179 :components ((:file "optimize")))
185 :pathname "src/stat-models/"
186 :depends-on ("proto-objects"
192 ((:lispstat-lsp-source-file "regression")
193 ;; (:lispstat-lsp-source-file "nonlin"
194 ;; :depends-on ("regression"))
195 ;; (:lispstat-lsp-source-file "bayes"
196 ;; :depends-on ("proto-objects"
204 :depends-on ("proto-objects"
211 :components ((:file "ls-user")))
215 :depends-on ( "lisp-stat-one" ) ;; shouldn't need :lift!
216 :pathname "src/unittests/"
217 :components ((:file "unittests")
218 (:file "unittests-lstypes")
219 ;; "unittests-arrays.lisp"
220 ;; "unittests-data-clos.lisp"
221 ;; "unittests-proto.lisp"
222 ;; "unittests-regression.lisp"