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-07-22 13:14:04 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/")
13 ;; What package should we be in? Contaminating cl-user is probably EVIL.
16 ;; returns location of LISPSTAT ASDF file -- but can't work until
17 ;; we load it. Not going to do the right thing, I think.
18 ;; more importantly we need to think about what it is tht we are doing
19 ;; to self-initialize.
21 (defvar *lispstat-home-dir*
22 ;; #p"/home/tony/sandbox/CommonLispStat.git/"
23 ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"
24 ;; #p"/Users/ungil/lisp/CommonLispStat/")
25 ;; #p"/home/rossini/public_html/GIT.repos/CommonLispStat/"
26 ;; #p"/home/tony/Desktop/sandbox/CLS.git/"
27 (directory-namestring (truename (asdf:system-definition-pathname
29 "Value considered \"home\" for our data")
32 (setf *lispstat-home-dir*
33 ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"
34 ;; #p"/home/tony/sandbox/CommonLispStat.git/"
35 ;; #p"/Users/ungil/lisp/CommonLispStat/")
36 ;; #p"/home/rossini/public_html/GIT.repos/CommonLispStat/"
37 ;; #p"/home/tony/Desktop/sandbox/CLS.git/"
38 (directory-namestring (truename (asdf:system-definition-pathname
42 (macrolet ((ls-dir (root-str)
43 `(pathname (concatenate 'string
44 (namestring *lispstat-home-dir*) ,root-str)))
46 (ls-defdir (target-dir-var root-str)
47 `(defvar ,target-dir-var (ls-dir ,root-str))))
49 ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
50 ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
51 ;;(macroexpand-1 '(ls-dir "ASDF"))
53 (ls-defdir *lispstat-asdf-dir* "ASDF/")
54 (ls-defdir *lispstat-data-dir* "data/")
55 (ls-defdir *lispstat-external-dir* "external/")
56 (ls-defdir *lispstat-examples-dir* "examples/"))
58 (pushnew *lispstat-asdf-dir* asdf:*central-registry*)
59 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
61 ;;; back to our regularly scheduled work...
62 ;;; We should not need these, I think, but?
63 ;; (asdf:oos 'asdf:compile-op :cffi) ;; FFI
64 ;; (asdf:oos 'asdf:compile-op :lift) ;; Unit Testing
65 ;; (asdf:oos 'asdf:load-op :cffi) ;; FFI
66 ;; (asdf:oos 'asdf:load-op :lift) ;; Unit Testing
68 ;;; MAJOR HACK, FIXME!
69 (load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
73 (defpackage #:lispstat-system
74 (:use :asdf :common-lisp))
76 (in-package #:lispstat-system)
78 ;;; To avoid renaming everything from *.lsp to *.lisp...
79 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
80 (defclass lispstat-lsp-source-file (cl-source-file) ())
81 (defparameter *fasl-directory*
82 (make-pathname :directory '(:relative
84 #+openmcl "openmcl-fasl"
87 #-(or sbcl openmcl clisp cmucl) "fasl"
90 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
91 (defmethod asdf::output-files :around ((operation compile-op)
92 (c lispstat-lsp-source-file))
93 (list (merge-pathnames *fasl-directory*
94 (compile-file-pathname (component-pathname c)))))
95 ;;; again, thanks to Cyrus for saving me time...
99 :version #.(with-open-file
100 (vers (merge-pathnames "version.lisp-expr" *load-truename*))
102 :author "A.J. Rossini <blindglobe@gmail.com>"
104 :description "CommonLispStat (CLS): A System for Statistical Computing with Common Lisp;
105 based on CLS by Luke Tierney <luke@stat.uiowa.edu> (originally written when Luke was at CMU, apparently).
106 Last touched 1991, then in 2005--2008."
108 :depends-on (:cffi :lift) ;; need a matrix library
109 :components ((:static-file "version" :pathname #p"version.lisp-expr")
110 (:module "proto-objects"
111 :pathname "src/objsys/"
112 :components ((: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 ("proto-objects"))
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 ("proto-objects"
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 ("proto-objects"
160 ;; there is a circ reference which we need to solve.
161 (:lispstat-lsp-source-file "lsbasics"
162 :depends-on ("proto-objects"
170 (:lispstat-lsp-source-file "statistics"
171 :depends-on ("proto-objects"
174 "ladata" "matrices" "linalg"
178 (:file "optimize" :depends-on ("proto-objects"
190 (:lispstat-lsp-source-file "regression"
191 :depends-on ("proto-objects"
198 ; (:lispstat-lsp-source-file "nonlin"
199 ; :depends-on ("regression"))
201 ; (:lispstat-lsp-source-file "bayes"
202 ; :depends-on ("proto-objects"
208 :depends-on ("proto-objects"
224 :depends-on ( :lift "proto-objects" "ls-user" )
225 :pathname "src/unittests/"
226 :components ((:file "unittests")
227 (:file "unittests-lstypes" :depends-on ("lstypes"))
228 ;; -rw-r--r-- 1 tony tony 5839 2008-07-22 12:22 unittests-arrays.lisp
229 ;; -rw-r--r-- 1 tony tony 4756 2008-07-22 12:22 unittests-data-clos.lisp
230 ;; -rw-r--r-- 1 tony tony 1577 2008-07-22 12:22 unittests-proto.lisp
231 ;; -rw-r--r-- 1 tony tony 1814 2008-07-22 12:22 unittests-regression.lisp
235 (:static-file "LICENSE")
236 (:static-file "README")
240 ;; preparation for modulization...