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:09:46 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.
15 ;; returns location of LISPSTAT ASDF file -- but can't work until
16 ;; we load it. Not going to do the right thing, I think.
17 ;; more importantly we need to think about what it is tht we are doing
18 ;; to self-initialize.
20 (defvar *lispstat-home-dir*
21 ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"
22 ;; #p"/Users/ungil/lisp/CommonLispStat/")
23 (directory-namestring (truename (asdf:system-definition-pathname
25 "Value considered \"home\" for our data")
28 (setf *lispstat-home-dir*
29 ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"
30 ;; #p"/Users/ungil/lisp/CommonLispStat/")
31 (directory-namestring (truename (asdf:system-definition-pathname
35 (macrolet ((ls-dir (root-str)
36 `(pathname (concatenate 'string
37 (namestring *lispstat-home-dir*) ,root-str)))
39 (ls-defdir (target-dir-var root-str)
40 `(defvar ,target-dir-var (ls-dir ,root-str))))
42 ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
43 ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
44 ;;(macroexpand-1 '(ls-dir "ASDF"))
46 (ls-defdir *lispstat-asdf-dir* "ASDF/")
47 (ls-defdir *lispstat-data-dir* "data/")
48 (ls-defdir *lispstat-external-dir* "external/")
49 (ls-defdir *lispstat-examples-dir* "examples/"))
51 (pushnew *lispstat-asdf-dir* asdf:*central-registry*)
52 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
54 ;;; back to our regularly scheduled work...
55 ;;; We should not need these, I think, but?
56 ;; (asdf:oos 'asdf:compile-op :cffi) ;; FFI
57 ;; (asdf:oos 'asdf:compile-op :lift) ;; Unit Testing
58 ;; (asdf:oos 'asdf:load-op :cffi) ;; FFI
59 ;; (asdf:oos 'asdf:load-op :lift) ;; Unit Testing
61 ;;; MAJOR HACK, FIXME!
62 (load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
66 (defpackage #:lispstat-system
67 (:use :asdf :common-lisp))
69 (in-package #:lispstat-system)
71 ;;; To avoid renaming everything from *.lsp to *.lisp...
72 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
73 (defclass lispstat-lsp-source-file (cl-source-file) ())
74 (defparameter *fasl-directory*
75 (make-pathname :directory '(:relative
77 #+openmcl "openmcl-fasl"
80 #-(or sbcl openmcl clisp cmucl) "fasl"
83 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
84 (defmethod asdf::output-files :around ((operation compile-op)
85 (c lispstat-lsp-source-file))
86 (list (merge-pathnames *fasl-directory*
87 (compile-file-pathname (component-pathname c)))))
88 ;;; again, thanks to Cyrus for saving me time...
92 :version #.(with-open-file
93 (vers (merge-pathnames "version.lisp-expr" *load-truename*))
95 :author "A.J. Rossini <blindglobe@gmail.com>"
97 :description "CommonLispStat (CLS): A System for Statistical Computing with Common Lisp;
98 based on CLS by Luke Tierney <luke@stat.uiowa.edu> (originally written when Luke was at CMU, apparently).
99 Last touched 1991, then in 2005--2008."
101 :depends-on (:cffi :lift) ;; need a matrix library
102 :components ((:static-file "version" :pathname #p"version.lisp-expr")
103 (:module "proto-objects"
104 :pathname "src/objsys/"
105 :components ((:lispstat-lsp-source-file "lsobjects")))
107 (:lispstat-lsp-source-file "cffiglue")
108 (:lispstat-lsp-source-file "defsys")
109 (:lispstat-lsp-source-file "lstypes")
110 (:lispstat-lsp-source-file "lsfloat")
112 (:lispstat-lsp-source-file "compound"
113 :depends-on ("proto-objects"))
114 (:lispstat-lsp-source-file "lsmacros"
115 :depends-on ("compound"))
117 (:lispstat-lsp-source-file "dists"
118 :depends-on ("cffiglue"
121 (:lispstat-lsp-source-file "lsmath"
122 :depends-on ("proto-objects"
128 (:lispstat-lsp-source-file "matrices"
129 :depends-on ("cffiglue"
132 (:lispstat-lsp-source-file "ladata"
133 :depends-on ("cffiglue"
139 (:lispstat-lsp-source-file "linalg"
140 :depends-on ("cffiglue"
148 (:file "data" :depends-on ("proto-objects"
153 ;; there is a circ reference which we need to solve.
154 (:lispstat-lsp-source-file "lsbasics"
155 :depends-on ("proto-objects"
163 (:lispstat-lsp-source-file "statistics"
164 :depends-on ("proto-objects"
167 "ladata" "matrices" "linalg"
171 (:file "optimize" :depends-on ("proto-objects"
183 (:lispstat-lsp-source-file "regression"
184 :depends-on ("proto-objects"
191 ; (:lispstat-lsp-source-file "nonlin"
192 ; :depends-on ("regression"))
194 ; (:lispstat-lsp-source-file "bayes"
195 ; :depends-on ("proto-objects"
201 :depends-on ("proto-objects"
217 :depends-on ( :lift "proto-objects" "ls-user" )
218 :pathname "src/unittests/"
219 :components ((:file "unittests")
220 (:file "unittests-lstypes" :depends-on ("lstypes"))
221 ;; -rw-r--r-- 1 tony tony 5839 2008-07-22 12:22 unittests-arrays.lisp
222 ;; -rw-r--r-- 1 tony tony 4756 2008-07-22 12:22 unittests-data-clos.lisp
223 ;; -rw-r--r-- 1 tony tony 1577 2008-07-22 12:22 unittests-proto.lisp
224 ;; -rw-r--r-- 1 tony tony 1814 2008-07-22 12:22 unittests-regression.lisp
228 (:static-file "LICENSE")
229 (:static-file "README")
233 ;; preparation for modulization...