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-07 08:27:42 tony>
6 ;;; Created: <2005-05-30 17:09:47 blindglobe>
9 ;; (setf *my-base-directory*
10 ;; #p"/home/tony/sandbox/CLS.git/"
11 ;; #p"/Users/ungil/lisp/CommonLispStat/")
16 ;; What package should we be in? Contaminating cl-user is probably EVIL.
19 ;; returns location of LISPSTAT ASDF file -- but can't work until
20 ;; we load it. Not going to do the right thing, I think.
21 ;; more importantly we need to think about what it is tht we are doing
22 ;; to self-initialize.
24 (defvar *lispstat-home-dir*
25 ;; #p"/home/tony/sandbox/CommonLispStat.git/"
26 ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"
27 ;; #p"/Users/ungil/lisp/CommonLispStat/")
28 ;; #p"/home/rossini/public_html/GIT.repos/CommonLispStat/"
29 ;; #p"/home/tony/Desktop/sandbox/CLS.git/"
30 (directory-namestring (truename (asdf:system-definition-pathname
32 "Value considered \"home\" for our data")
35 (setf *lispstat-home-dir*
36 ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"
37 ;; #p"/home/tony/sandbox/CommonLispStat.git/"
38 ;; #p"/Users/ungil/lisp/CommonLispStat/")
39 ;; #p"/home/rossini/public_html/GIT.repos/CommonLispStat/"
40 ;; #p"/home/tony/Desktop/sandbox/CLS.git/"
41 (directory-namestring (truename (asdf:system-definition-pathname
45 (macrolet ((ls-dir (root-str)
46 `(pathname (concatenate 'string
47 (namestring *lispstat-home-dir*) ,root-str)))
49 (ls-defdir (target-dir-var root-str)
50 `(defvar ,target-dir-var (ls-dir ,root-str))))
52 ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
53 ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
54 ;;(macroexpand-1 '(ls-dir "ASDF"))
56 (ls-defdir *lispstat-asdf-dir* "ASDF/")
57 (ls-defdir *lispstat-data-dir* "data/")
58 (ls-defdir *lispstat-external-dir* "external/")
59 (ls-defdir *lispstat-examples-dir* "examples/"))
61 (pushnew *lispstat-asdf-dir* asdf:*central-registry*)
62 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
64 ;;; back to our regularly scheduled work...
65 ;;; We should not need these, I think, but?
66 (asdf:oos 'asdf:compile-op :cffi) ;; FFI
67 (asdf:oos 'asdf:compile-op :lift) ;; Unit Testing
68 (asdf:oos 'asdf:load-op :cffi) ;; FFI
69 (asdf:oos 'asdf:load-op :lift) ;; Unit Testing
72 ;;(load "/home/tony/Desktop/sandbox/matlisp.git/start.lisp")
76 (defpackage #:lispstat-system
77 (:use :asdf :common-lisp))
79 (in-package #:lispstat-system)
81 ;;; To avoid renaming everything from *.lsp to *.lisp...
82 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
83 (defclass lispstat-lsp-source-file (cl-source-file) ())
84 (defparameter *fasl-directory*
85 (make-pathname :directory '(:relative
87 #+openmcl "openmcl-fasl"
90 #-(or sbcl openmcl clisp cmucl) "fasl"
93 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
94 (defmethod asdf::output-files :around ((operation compile-op)
95 (c lispstat-lsp-source-file))
96 (list (merge-pathnames *fasl-directory*
97 (compile-file-pathname (component-pathname c)))))
98 ;;; again, thanks to Cyrus for saving me time...
101 (defsystem "lispstat"
102 :version #.(with-open-file
103 (vers (merge-pathnames "version.lisp-expr" *load-truename*))
105 :author "A.J. Rossini <blindglobe@gmail.com>"
107 :description "CommonLispStat (CLS): A System for Statistical Computing with Common Lisp;
108 based on CLS by Luke Tierney <luke@stat.uiowa.edu> (originally written when Luke was at CMU, apparently).
109 Last touched 1991, then in 2005--2008."
111 :depends-on (:cffi :lift) ;; :clem) not yet but soon!
112 :components ((:static-file "version" :pathname #p"version.lisp-expr")
113 (:lispstat-lsp-source-file "lsobjects")
114 (:lispstat-lsp-source-file "cffiglue")
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 :depends-on ("lsobjects"))
121 (:lispstat-lsp-source-file "lsmacros"
122 :depends-on ("compound"))
124 (:lispstat-lsp-source-file "dists"
125 :depends-on ("cffiglue"
128 (:lispstat-lsp-source-file "lsmath"
129 :depends-on ("lsobjects"
135 (:lispstat-lsp-source-file "matrices"
136 :depends-on ("cffiglue"
139 (:lispstat-lsp-source-file "ladata"
140 :depends-on ("cffiglue"
146 (:lispstat-lsp-source-file "linalg"
147 :depends-on ("cffiglue"
155 (:file "data" :depends-on ("lsobjects"
160 ;; there is a circ reference which we need to solve.
161 (:lispstat-lsp-source-file "lsbasics"
162 :depends-on ("lsobjects"
170 (:lispstat-lsp-source-file "statistics"
171 :depends-on ("lsobjects"
174 "ladata" "matrices" "linalg"
178 (:file "optimize" :depends-on ("lsobjects"
190 (:lispstat-lsp-source-file "regression"
191 :depends-on ("lsobjects"
198 ; (:lispstat-lsp-source-file "nonlin"
199 ; :depends-on ("regression"))
201 ; (:lispstat-lsp-source-file "bayes"
202 ; :depends-on ("lsobjects"
207 (:file "ls-user" :depends-on ("lsobjects"
220 (:file "unittests" :depends-on ("ls-user"))
221 (:file "unittests-lstypes" :depends-on ("ls-user"
223 ;; (:file "unittests-data-clos" :depends-on ("ls-user"))
224 ;; (:file "unittests-regression" :depends-on ("ls-user"))
226 (:static-file "LICENSE")
227 (:static-file "README")
231 ;; preparation for modulization...
234 "lisp-stat-proto-objects"
235 :pathname "src/prototype/"
236 :comonents ((:lispstat-lsp-source-file "lsobjects"))))
240 :pathname "src/unittests/"
241 :components ((:file "unittests" :depends-on ("ls-user"))
242 (:file "unittests-lstypes" :depends-on ("ls-user"