clarify the current problem point; document the exact point to eval to set up the...
[CommonLispStat.git] / lispstat.asd
blobb39322ce55621426d03cd980bbb11d045af243dd
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-09-05 08:13:26 tony>
6 ;;; Created:    <2005-05-30 17:09:47 blindglobe>
8 (in-package :cl-user)
10 (defvar *lispstat-home-dir*
11   (directory-namestring
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
18                                        :lispstat))))
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 
48 ;;; MAJOR HACK, FIXME!
49 ;;(load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
51 (in-package :cl-user)
53 (defpackage #:lispstat-system
54     (:use :common-lisp :asdf))
56 (in-package #:lispstat-system)
58 ;;; To avoid renaming everything from *.lsp to *.lisp...
59 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
60 ;;; NOT secure against serving multiple architectures/hardwares from
61 ;;; the same file system (i.e. PPC and x86 would not be
62 ;;; differentiated). 
64 (defclass lispstat-lsp-source-file (cl-source-file) ())
65 (defparameter *fasl-directory*
66    (make-pathname :directory '(:relative
67                                #+sbcl "sbcl-fasl"
68                                #+openmcl "openmcl-fasl"
69                                #+cmu "cmucl-fasl"
70                                #+clisp "clisp-fasl"
71                                #-(or sbcl openmcl clisp cmucl) "fasl"
72                                )))
75 ;;; Handle Luke's *.lsp suffix
76 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
77 (defmethod asdf::output-files :around ((operation compile-op)
78                                        (c lispstat-lsp-source-file))
79   (list (merge-pathnames *fasl-directory*
80                          (compile-file-pathname (component-pathname c)))))
81 ;;; again, thanks to Cyrus for saving me time...
84 (defsystem "lispstat"
85   :version #.(with-open-file
86                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
87                (read vers))
88   :author "A.J. Rossini <blindglobe@gmail.com>"
89   :license "BSD"
90   :description "CommonLispStat (CLS): A System for Statistical
91   Computing with Common Lisp; based on CLS alpha1 by Luke Tierney
92   <luke@stat.uiowa.edu> (apparently originally written when Luke was
93   at CMU, on leave somewhere?).   Last touched by him in 1991, then in
94   2005--2008." 
95   :serial t
96   :depends-on (:cffi  :lift) ;; need a matrix library
97   :components ((:static-file "version" :pathname #p"version.lisp-expr")
98                (:static-file "LICENSE")
99                (:static-file "README")
101                (:module "proto-objects"
102                         :pathname "src/objsys/"
103                         :components
104                         ((:lispstat-lsp-source-file "lsobjects")))
106                (:module "lispstat-core"
107                         :pathname "src/basics/"
108                         :serial t
109                         :depends-on ("proto-objects")
110                         :components
111                         ((:lispstat-lsp-source-file "defsys")
112                          (:lispstat-lsp-source-file "lstypes")
113                          (:lispstat-lsp-source-file "lsfloat")
114                          
115                          (:lispstat-lsp-source-file "compound")
116                          (:lispstat-lsp-source-file "lsmacros" 
117                                                     :depends-on ("compound"))
118                          
119                          (:lispstat-lsp-source-file "lsmath"
120                                                     :depends-on ("compound"
121                                                                  "lsmacros"
122                                                                  "lsfloat"))))
124                (:module
125                 "numerics-internal"
126                 :pathname "src/numerics/"
127                 :depends-on ("proto-objects" "lispstat-core")
128                 :components
129                 ((:lispstat-lsp-source-file "cffiglue")
130                  (:lispstat-lsp-source-file "dists"
131                                             :depends-on ("cffiglue"))
132                  (:lispstat-lsp-source-file "matrices"
133                                             :depends-on ("cffiglue"))
134                  (:lispstat-lsp-source-file "ladata"
135                                             :depends-on ("cffiglue"
136                                                          "matrices"))
137                  (:lispstat-lsp-source-file "linalg"
138                                             :depends-on ("cffiglue"
139                                                          "matrices"
140                                                          "ladata"))))
142                (:module
143                 "stat-data"
144                 :pathname "src/data/"
145                 :depends-on ("proto-objects"
146                              "lispstat-core"
147                              "numerics-internal")
148                 :components
149                 (;; (:file "data-clos")
150                  (:file "data")))
152                (:module
153                 "cls-basics"
154                 :pathname "src/basics/"
155                 :depends-on ("proto-objects"
156                              "lispstat-core"
157                              "numerics-internal" )
158                 :components
159                 ((:lispstat-lsp-source-file "lsbasics")))
160                
161                (:module
162                 "describe"
163                 :pathname "src/describe/"
164                 :depends-on ("proto-objects"
165                              "lispstat-core"
166                              "numerics-internal"
167                              "stat-data"
168                              "cls-basics")
169                 :components
170                 ((:lispstat-lsp-source-file "statistics")))
171                
172                (:module
173                 "optimization"
174                 :pathname "src/numerics/"
175                 :depends-on ("proto-objects"
176                              "lispstat-core"
177                              "numerics-internal")
178                 :components ((:file "optimize")))
179                
180                
181                ;; Applications
182                (:module
183                 "stat-models"
184                 :pathname "src/stat-models/"
185                 :depends-on ("proto-objects"
186                              "lispstat-core"
187                              "numerics-internal"
188                              "cls-basics"
189                              "describe")
190                 :components
191                 ((:lispstat-lsp-source-file "regression")
192                  ;; (:lispstat-lsp-source-file "nonlin"
193                  ;;       :depends-on ("regression"))
194                  ;; (:lispstat-lsp-source-file "bayes"
195                  ;;       :depends-on ("proto-objects"
196                  ;;                    "lsmath"
197                  ;;                    "dists"))
198                  ))
200                (:module
201                 "lisp-stat-one"
202                 :pathname "src/"
203                 :depends-on  ("proto-objects"
204                               "lispstat-core"
205                               "numerics-internal" 
206                               "cls-basics"
207                               "stat-data"
208                               "describe"
209                               "stat-models")
210                 :components ((:file "ls-user")))
212                (:module
213                  "lisp-stat-unittest"
214                  :depends-on ( "lisp-stat-one" ) ;; shouldn't need :lift!
215                  :pathname "src/unittests/"
216                  :components ((:file "unittests")
217                               (:file "unittests-lstypes")
218                               ;;  "unittests-arrays.lisp"
219                               ;;  "unittests-data-clos.lisp"
220                               ;;  "unittests-proto.lisp"
221                               ;;  "unittests-regression.lisp"
222                               ))))