many things moved around in a "by system" format. We could start thinking about...
[CommonLispStat.git] / lispstat.asd
blob9b657ebffcc5a5e5ceaa22962c1243af716f4544
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-08-27 18:51:23 tony>
6 ;;; Created:    <2005-05-30 17:09:47 blindglobe>
8 ;; What package should we be in?  Contaminating cl-user is probably EVIL.
9 (in-package :cl-user)
12 (defvar *lispstat-home-dir*
13   (directory-namestring
14    (truename (asdf:system-definition-pathname :lispstat)))
15   "Value considered \"home\" for our data")
18   (setf *lispstat-home-dir*
19       (directory-namestring (truename (asdf:system-definition-pathname
20                                        :lispstat))))
23 (macrolet ((ls-dir (root-str)
24              `(pathname (concatenate 'string
25                                      (namestring *lispstat-home-dir*) ,root-str)))
27            (ls-defdir (target-dir-var  root-str)
28              `(defvar ,target-dir-var (ls-dir ,root-str))))
30   ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
31   ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
32   ;;(macroexpand-1 '(ls-dir "ASDF"))
34   (ls-defdir *lispstat-asdf-dir* "ASDF/")
35   (ls-defdir *lispstat-data-dir* "data/")
36   (ls-defdir *lispstat-external-dir* "external/")
37   (ls-defdir *lispstat-examples-dir* "examples/"))
39 (pushnew *lispstat-asdf-dir* asdf:*central-registry*)
40 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
42 ;;; back to our regularly scheduled work...
43 ;;; We should not need these, I think, but?
44 ;; (asdf:oos 'asdf:compile-op :cffi)            ;; FFI
45 ;; (asdf:oos 'asdf:compile-op :lift)            ;; Unit Testing 
46 ;; (asdf:oos 'asdf:load-op :cffi)            ;; FFI
47 ;; (asdf:oos 'asdf:load-op :lift)            ;; Unit Testing 
49 ;;; MAJOR HACK, FIXME!
50 ;;(load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
52 (in-package :cl-user)
54 (defpackage #:lispstat-system
55     (:use :common-lisp :asdf))
57 (in-package #:lispstat-system)
59 ;;; To avoid renaming everything from *.lsp to *.lisp...
60 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
61 ;;; NOT secure against serving multiple architectures/hardwares from
62 ;;; the same file system (i.e. PPC and x86 would not be
63 ;;; differentiated). 
65 (defclass lispstat-lsp-source-file (cl-source-file) ())
66 (defparameter *fasl-directory*
67    (make-pathname :directory '(:relative
68                                #+sbcl "sbcl-fasl"
69                                #+openmcl "openmcl-fasl"
70                                #+cmu "cmucl-fasl"
71                                #+clisp "clisp-fasl"
72                                #-(or sbcl openmcl clisp cmucl) "fasl"
73                                )))
76 ;;; Handle Luke's *.lsp suffix
77 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
78 (defmethod asdf::output-files :around ((operation compile-op)
79                                        (c lispstat-lsp-source-file))
80   (list (merge-pathnames *fasl-directory*
81                          (compile-file-pathname (component-pathname c)))))
82 ;;; again, thanks to Cyrus for saving me time...
85 (defsystem "lispstat"
86   :version #.(with-open-file
87                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
88                (read vers))
89   :author "A.J. Rossini <blindglobe@gmail.com>"
90   :license "BSD"
91   :description "CommonLispStat (CLS): A System for Statistical Computing with Common Lisp;
92 based on CLS alpha1 by Luke Tierney <luke@stat.uiowa.edu> (originally written when Luke was at CMU, apparently).
93 Last touched 1991, then in 2005--2008."
94   :serial t
95   :depends-on (:cffi  :lift) ;; need a matrix library
96   :components ((:static-file "version" :pathname #p"version.lisp-expr")
97                (:static-file "LICENSE")
98                (:static-file "README")
100                (:module "proto-objects"
101                         :pathname "src/objsys/"
102                         :components
103                         ((:lispstat-lsp-source-file "lsobjects")))
105                (:module "lispstat-core"
106                         :pathname "src/basics/"
107                         :serial t
108                         :depends-on ("proto-objects")
109                         :components
110                         ((:lispstat-lsp-source-file "defsys")
111                          (:lispstat-lsp-source-file "lstypes")
112                          (:lispstat-lsp-source-file "lsfloat")
113                          
114                          (:lispstat-lsp-source-file "compound")
115                          (:lispstat-lsp-source-file "lsmacros" 
116                                                     :depends-on ("compound"))
117                          
118                          (:lispstat-lsp-source-file "lsmath"
119                                                     :depends-on ("compound"
120                                                                  "lsmacros"
121                                                                  "lsfloat"))))
123                (:module "numerics-internal"
124                         :pathname "src/numerics/"
125                         :depends-on ("proto-objects" "lispstat-core")
126                         :components
127                         ((:lispstat-lsp-source-file "cffiglue")
128                          (:lispstat-lsp-source-file "dists"
129                                                     :depends-on ("cffiglue"))
130                          (:lispstat-lsp-source-file "matrices"
131                                                     :depends-on ("cffiglue"))
132                          (:lispstat-lsp-source-file "ladata"
133                                                     :depends-on ("cffiglue"
134                                                                  "matrices"))
135                          (:lispstat-lsp-source-file "linalg"
136                                                     :depends-on ("cffiglue"
137                                                                  "matrices"
138                                                                  "ladata"))))
140                (:file "data" :depends-on ("proto-objects"
141                                           "lispstat-core"
142                                           "numerics-internal"))  ;; "matrices" "linalg"
144                ;; there is a circ reference which we need to solve.
145                (:lispstat-lsp-source-file "lsbasics"
146                                           :depends-on ("proto-objects"
147                                                        "lispstat-core"
148                                                        "numerics-internal" ))
150                (:lispstat-lsp-source-file "statistics"
151                                           :depends-on ("proto-objects"
152                                                        "lispstat-core"
153                                                        "numerics-internal" 
154                                                        "lsbasics"
155                                                        "data" ))
157                (:file "optimize" :depends-on ("proto-objects"
158                                               "lispstat-core"
159                                               "numerics-internal"))
160                
161                ;; Applications
162                (:lispstat-lsp-source-file "regression"
163                                           :depends-on ("proto-objects"
164                                                        "lispstat-core"
165                                                        "numerics-internal" 
166                                                        "lsbasics"
167                                                        "statistics"))
168 ;              (:lispstat-lsp-source-file "nonlin"
169 ;                                         :depends-on ("regression"))
171 ;              (:lispstat-lsp-source-file "bayes"
172 ;                                         :depends-on ("proto-objects"
173 ;                                                      "lsmath"
174 ;                                                      "dists"))
176                (:module
177                 "lisp-stat-one"
178                 :pathname "src/"
179                 :depends-on  ("proto-objects"
180                               "lispstat-core"
181                               "numerics-internal" 
182                               "lsbasics"
183                               "data"
184                               "statistics"
185                               "regression")
186                 :components ((:file "ls-user")))
188                (:module
189                  "lisp-stat-unittest"
190                  :depends-on ( "lisp-stat-one" ) ;; shouldn't need :lift!
191                  :pathname "src/unittests/"
192                  :components ((:file "unittests")
193                               (:file "unittests-lstypes")
194                               ;;  "unittests-arrays.lisp"
195                               ;;  "unittests-data-clos.lisp"
196                               ;;  "unittests-proto.lisp"
197                               ;;  "unittests-regression.lisp"
198                               ))))