first stage finished, moving lisp code out of main dir, while keeping asdf happy.
[CommonLispStat.git] / lispstat.asd
bloba6d3cb42e0f1601e82a933ccfc0a57ddb6c81f3a
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-17 20:11:11 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.
13 (in-package :cl-user)
16 (defvar *lispstat-home-dir*
17   (directory-namestring (truename (asdf:system-definition-pathname
18                                    :lispstat)))
19   "Value considered \"home\" for our data")
22   (setf *lispstat-home-dir*
23       (directory-namestring (truename (asdf:system-definition-pathname
24                                        :lispstat))))
27 (macrolet ((ls-dir (root-str)
28              `(pathname (concatenate 'string
29                                      (namestring *lispstat-home-dir*) ,root-str)))
31            (ls-defdir (target-dir-var  root-str)
32              `(defvar ,target-dir-var (ls-dir ,root-str))))
34   ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
35   ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
36   ;;(macroexpand-1 '(ls-dir "ASDF"))
38   (ls-defdir *lispstat-asdf-dir* "ASDF/")
39   (ls-defdir *lispstat-data-dir* "data/")
40   (ls-defdir *lispstat-external-dir* "external/")
41   (ls-defdir *lispstat-examples-dir* "examples/"))
43 (pushnew *lispstat-asdf-dir* asdf:*central-registry*)
44 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
46 ;;; back to our regularly scheduled work...
47 ;;; We should not need these, I think, but?
48 ;; (asdf:oos 'asdf:compile-op :cffi)            ;; FFI
49 ;; (asdf:oos 'asdf:compile-op :lift)            ;; Unit Testing 
50 ;; (asdf:oos 'asdf:load-op :cffi)            ;; FFI
51 ;; (asdf:oos 'asdf:load-op :lift)            ;; Unit Testing 
53 ;;; MAJOR HACK, FIXME!
54 ;;(load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
56 (in-package :cl-user)
58 (defpackage #:lispstat-system
59     (:use :asdf :common-lisp))
61 (in-package #:lispstat-system)
63 ;;; To avoid renaming everything from *.lsp to *.lisp...
64 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
65 ;;; NOT secure against serving multiple architectures/hardwares from
66 ;;; the same file system (i.e. PPC and x86 would not be
67 ;;; differentiated). 
69 (defclass lispstat-lsp-source-file (cl-source-file) ())
70 (defparameter *fasl-directory*
71    (make-pathname :directory '(:relative
72                                #+sbcl "sbcl-fasl"
73                                #+openmcl "openmcl-fasl"
74                                #+cmu "cmucl-fasl"
75                                #+clisp "clisp-fasl"
76                                #-(or sbcl openmcl clisp cmucl) "fasl"
77                                )))
80 ;;; Handle Luke's *.lsp suffix
81 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
82 (defmethod asdf::output-files :around ((operation compile-op)
83                                        (c lispstat-lsp-source-file))
84   (list (merge-pathnames *fasl-directory*
85                          (compile-file-pathname (component-pathname c)))))
86 ;;; again, thanks to Cyrus for saving me time...
89 (defsystem "lispstat"
90   :version #.(with-open-file
91                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
92                (read vers))
93   :author "A.J. Rossini <blindglobe@gmail.com>"
94   :license "BSD"
95   :description "CommonLispStat (CLS): A System for Statistical Computing with Common Lisp;
96 based on CLS alpha1 by Luke Tierney <luke@stat.uiowa.edu> (originally written when Luke was at CMU, apparently).
97 Last touched 1991, then in 2005--2008."
98   :serial t
99   :depends-on (:cffi :lift) ;; need a matrix library
100   :components ((:static-file "version" :pathname #p"version.lisp-expr")
101                (:module "proto-objects"
102                         :pathname "src/objsys/"
103                         :components ((:lispstat-lsp-source-file "lsobjects")))
105                (:lispstat-lsp-source-file "cffiglue")
106                (:lispstat-lsp-source-file "defsys")
107                (:lispstat-lsp-source-file "lstypes")
108                (:lispstat-lsp-source-file "lsfloat")
110                (:lispstat-lsp-source-file "compound" 
111                                           :depends-on ("proto-objects"))
112                (:lispstat-lsp-source-file "lsmacros" 
113                                           :depends-on ("compound"))
115                (:lispstat-lsp-source-file "dists"
116                                           :depends-on ("cffiglue"
117                                                        "lsmacros"))
119                (:lispstat-lsp-source-file "lsmath"
120                                           :depends-on ("proto-objects"
121                                                        "compound"
122                                                        "lsmacros"
123                                                        "lsfloat"))
126                (:lispstat-lsp-source-file "matrices"
127                                           :depends-on ("cffiglue"
128                                                        "compound"))
130                (:lispstat-lsp-source-file "ladata"
131                                           :depends-on ("cffiglue"
132                                                        "defsys"
133                                                        "lstypes"
134                                                        "compound"
135                                                        "matrices"))
137                (:lispstat-lsp-source-file "linalg"
138                                           :depends-on ("cffiglue"
139                                                        "lsmath"
140                                                        "matrices"
141                                                        "ladata"
142                                                        "lsfloat"
143                                                        "lstypes"
144                                                        "compound"))
146                (:file "data" :depends-on ("proto-objects"
147                                           "compound"
148                                           "matrices"
149                                           "linalg"))
151                ;; there is a circ reference which we need to solve.
152                (:lispstat-lsp-source-file "lsbasics"
153                                           :depends-on ("proto-objects"
154                                                        "lstypes"
155                                                        "lsmacros"
156                                                        "lsfloat"
157                                                        "matrices"
158                                                        "linalg"
159                                                        "dists"))
161                (:lispstat-lsp-source-file "statistics"
162                                           :depends-on ("proto-objects"
163                                                        "lsbasics"
164                                                        "compound"
165                                                        "ladata" "matrices" "linalg"
166                                                        "lsmath"
167                                                        "data" ))
169                (:file "optimize" :depends-on ("proto-objects"
170                                               "cffiglue"
171                                               "lstypes"
172                                               "compound"
173                                               "lsmath"
174                                               "lsfloat"
175                                               "lsbasics"
176                                               "matrices"
177                                               "ladata"
178                                               "linalg"))
179                
180                ;; Applications
181                (:lispstat-lsp-source-file "regression"
182                                           :depends-on ("proto-objects"
183                                                        "lsbasics"
184                                                        "compound"
185                                                        "lsmath"
186                                                        "matrices"
187                                                        "linalg"
188                                                        "statistics"))
189 ;              (:lispstat-lsp-source-file "nonlin"
190 ;                                         :depends-on ("regression"))
192 ;              (:lispstat-lsp-source-file "bayes"
193 ;                                         :depends-on ("proto-objects"
194 ;                                                      "lsmath"
195 ;                                                      "dists"))
197                (:module
198                 "lisp-stat-core"
199                 :pathname "src/"
200                 :depends-on  ("proto-objects"
201                               "lsbasics"
202                               "compound"
203                               "dists"
204                               "lstypes"
205                               "lsfloat"
206                               "data"
207                               "lsmath"
208                               "matrices"
209                               "linalg"
210                               "statistics"
211                               "regression")
212                 :components ((:file "ls-user")))
214                (:module
215                  "lisp-stat-unittest"
216                  :depends-on ( "lisp-stat-core") ;; shouldn't need :lift!
217                  :pathname "src/unittests/"
218                  :components ((:file "unittests")
219                               (:file "unittests-lstypes")
220                               ;;  "unittests-arrays.lisp"
221                               ;;  "unittests-data-clos.lisp"
222                               ;;  "unittests-proto.lisp"
223                               ;;  "unittests-regression.lisp"
224                               ))
225                (:static-file "LICENSE")
226                (:static-file "README")
227                ))