documentation edits, some clarifying, some whitespace.
[CommonLispStat.git] / lispstat.asd
blobc90fb6ed8109d6a9bcbb4b136a4e7aee6fbd41c8
1 ;;  -*- mode: lisp -*-
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-05-23 17:40:10 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.
17 (in-package :cl-user)
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
31                                    :lispstat)))
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
42                                        :lispstat))))
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 
71 ;; MAJOR HACK, FIXME!
72 (load "/home/tony/Desktop/sandbox/matlisp.git/start.lisp")
74 (in-package :cl-user)
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
86                                #+sbcl "sbcl-fasl"
87                                #+openmcl "openmcl-fasl"
88                                #+cmu "cmucl-fasl"
89                                #+clisp "clisp-fasl"
90                                #-(or sbcl openmcl clisp cmucl) "fasl"
91                                )))
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*))
104                (read vers))
105   :author "A.J. Rossini <blindglobe@gmail.com>"
106   :license "BSD"
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."
110   :serial t
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"
126                                                        "lsmacros"))
128                (:lispstat-lsp-source-file "lsmath"
129                                           :depends-on ("lsobjects"
130                                                        "compound"
131                                                        "lsmacros"
132                                                        "lsfloat"))
135                (:lispstat-lsp-source-file "matrices"
136                                           :depends-on ("cffiglue"
137                                                        "compound"))
139                (:lispstat-lsp-source-file "ladata"
140                                           :depends-on ("cffiglue"
141                                                        "defsys"
142                                                        "lstypes"
143                                                        "compound"
144                                                        "matrices"))
146                (:lispstat-lsp-source-file "linalg"
147                                           :depends-on ("cffiglue"
148                                                        "lsmath"
149                                                        "matrices"
150                                                        "ladata"
151                                                        "lsfloat"
152                                                        "lstypes"
153                                                        "compound"))
155                (:file "data" :depends-on ("lsobjects"
156                                           "compound"
157                                           "matrices"
158                                           "linalg"))
160                ;; there is a circ reference which we need to solve.
161                (:lispstat-lsp-source-file "lsbasics"
162                                           :depends-on ("lsobjects"
163                                                        "lstypes"
164                                                        "lsmacros"
165                                                        "lsfloat"
166                                                        "matrices"
167                                                        "linalg"
168                                                        "dists"))
170                (:lispstat-lsp-source-file "statistics"
171                                           :depends-on ("lsobjects"
172                                                        "lsbasics"
173                                                        "compound"
174                                                        "ladata" "matrices" "linalg"
175                                                        "lsmath"
176                                                        "data" ))
178                (:file "optimize" :depends-on ("lsobjects"
179                                               "cffiglue"
180                                               "lstypes"
181                                               "compound"
182                                               "lsmath"
183                                               "lsfloat"
184                                               "lsbasics"
185                                               "matrices"
186                                               "ladata"
187                                               "linalg"))
188                
189                ;; Applications
190                (:lispstat-lsp-source-file "regression"
191                                           :depends-on ("lsobjects"
192                                                        "lsbasics"
193                                                        "compound"
194                                                        "lsmath"
195                                                        "matrices"
196                                                        "linalg"
197                                                        "statistics"))
198 ;              (:lispstat-lsp-source-file "nonlin"
199 ;                                         :depends-on ("regression"))
201 ;              (:lispstat-lsp-source-file "bayes"
202 ;                                         :depends-on ("lsobjects"
203 ;                                                      "lsmath"
204 ;                                                      "dists"))
207                (:file "ls-user" :depends-on ("lsobjects"
208                                              "lsbasics"
209                                              "compound"
210                                              "dists"
211                                              "lstypes"
212                                              "lsfloat"
213                                              "data"
214                                              "lsmath"
215                                              "matrices"
216                                              "linalg"
217                                              "statistics"
218                                              "regression"))
220                (:file "unittests" :depends-on ("ls-user"))
221                (:file "unittests-lstypes" :depends-on ("ls-user"
222                                                        "lstypes"))
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")
228                ))
231 ;; preparation for modulization...
233 ((:module
234   "lisp-stat-proto-objects"
235   :pathname "src/prototype/"
236   :comonents ((:lispstat-lsp-source-file "lsobjects"))))
238 ((:module
239   "lisp-stat-testing"
240   :pathname "src/unittests/"
241   :components ((:file "unittests" :depends-on ("ls-user"))
242                (:file "unittests-lstypes" :depends-on ("ls-user"
243                                                        "lstypes")))))