refactored proto object system into src dir
[CommonLispStat.git] / lispstat.asd
bloba2b3d02f090124488975835ef5eb82516ab2a8f8
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-07-22 12:15:34 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.
14 (in-package :cl-user)
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
28                                    :lispstat)))
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
39                                        :lispstat))))
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")
71 (in-package :cl-user)
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
83                                #+sbcl "sbcl-fasl"
84                                #+openmcl "openmcl-fasl"
85                                #+cmu "cmucl-fasl"
86                                #+clisp "clisp-fasl"
87                                #-(or sbcl openmcl clisp cmucl) "fasl"
88                                )))
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...
98 (defsystem "lispstat"
99   :version #.(with-open-file
100                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
101                (read vers))
102   :author "A.J. Rossini <blindglobe@gmail.com>"
103   :license "BSD"
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."
107   :serial t
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"
126                                                        "lsmacros"))
128                (:lispstat-lsp-source-file "lsmath"
129                                           :depends-on ("proto-objects"
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 ("proto-objects"
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 ("proto-objects"
163                                                        "lstypes"
164                                                        "lsmacros"
165                                                        "lsfloat"
166                                                        "matrices"
167                                                        "linalg"
168                                                        "dists"))
170                (:lispstat-lsp-source-file "statistics"
171                                           :depends-on ("proto-objects"
172                                                        "lsbasics"
173                                                        "compound"
174                                                        "ladata" "matrices" "linalg"
175                                                        "lsmath"
176                                                        "data" ))
178                (:file "optimize" :depends-on ("proto-objects"
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 ("proto-objects"
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 ("proto-objects"
203 ;                                                      "lsmath"
204 ;                                                      "dists"))
207                (:file "ls-user" :depends-on ("proto-objects"
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-testing"
235   :pathname "src/unittests/"
236   :components ((:file "unittests" :depends-on ("ls-user"))
237                (:file "unittests-lstypes" :depends-on ("ls-user"
238                                                        "lstypes")))))