why do we need to load lift? Why is it special?
[CommonLispStat.git] / lispstat.asd
blob159f22b8b49a1cfcda127ffd52a4c9a3e8b421db
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-18 10:37:43 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)
20 (defvar *lispstat-home-dir*
21   ;; #p"/home/tony/sandbox/CommonLispStat.git/"
22   ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"
23   ;; #p"/Users/ungil/lisp/CommonLispStat/")
24   ;; #p"/home/rossini/public_html/GIT.repos/CommonLispStat/"
25   #p"/home/tony/Desktop/sandbox/CLS.git/"
26   "Value considered \"home\" for our data")
28 (setf *lispstat-home-dir*
29       ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"
30       ;; #p"/home/tony/sandbox/CommonLispStat.git/"
31       ;; #p"/Users/ungil/lisp/CommonLispStat/")
32       ;; #p"/home/rossini/public_html/GIT.repos/CommonLispStat/"
33       #p"/home/tony/Desktop/sandbox/CLS.git/"
34       )
36 (macrolet ((ls-dir (root-str)
37              `(pathname (concatenate 'string
38                                      (namestring *lispstat-home-dir*) ,root-str)))
40            (ls-defdir (target-dir-var  root-str)
41              `(defvar ,target-dir-var (ls-dir ,root-str))))
43   ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
44   ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
45   ;;(macroexpand-1 '(ls-dir "ASDF"))
47   (ls-defdir *lispstat-asdf-dir* "ASDF/")
48   (ls-defdir *lispstat-data-dir* "data/")
49   (ls-defdir *lispstat-external-dir* "external/")
50   (ls-defdir *lispstat-examples-dir* "examples/"))
52 (pushnew *lispstat-asdf-dir* asdf:*central-registry*)
53 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
55 ;;; back to our regularly scheduled work...
56 ;;; We should not need these, I think, but?
57 (asdf:oos 'asdf:compile-op :cffi)            ;; FFI
58 (asdf:oos 'asdf:compile-op :lift)            ;; Unit Testing 
59 (asdf:oos 'asdf:load-op :cffi)            ;; FFI
60 (asdf:oos 'asdf:load-op :lift)            ;; Unit Testing 
62 (in-package :cl-user)
64 (defpackage #:lispstat-system
65     (:use :asdf :common-lisp))
67 (in-package #:lispstat-system)
69 ;;; To avoid renaming everything from *.lsp to *.lisp...
70 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
71 (defclass lispstat-lsp-source-file (cl-source-file) ())
72 (defparameter *fasl-directory*
73    (make-pathname :directory '(:relative
74                                #+sbcl "sbcl-fasl"
75                                #+openmcl "openmcl-fasl"
76                                #+cmu "cmucl-fasl"
77                                #+clisp "clisp-fasl"
78                                #-(or sbcl openmcl clisp cmucl) "fasl"
79                                )))
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 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) ;;  :clem) not yet but soon!
100   :components ((:static-file "version" :pathname #p"version.lisp-expr")
101                (:lispstat-lsp-source-file "lsobjects")
102                (:lispstat-lsp-source-file "cffiglue")
103                (:lispstat-lsp-source-file "defsys")
104                (:lispstat-lsp-source-file "lstypes")
105                (:lispstat-lsp-source-file "lsfloat")
107                (:lispstat-lsp-source-file "compound" 
108                                           :depends-on ("lsobjects"))
109                (:lispstat-lsp-source-file "lsmacros" 
110                                           :depends-on ("compound"))
112                (:lispstat-lsp-source-file "dists"
113                                           :depends-on ("cffiglue"
114                                                        "lsmacros"))
116                (:lispstat-lsp-source-file "lsmath"
117                                           :depends-on ("lsobjects"
118                                                        "compound"
119                                                        "lsmacros"
120                                                        "lsfloat"))
123                (:lispstat-lsp-source-file "matrices"
124                                           :depends-on ("cffiglue"
125                                                        "compound"))
127                (:lispstat-lsp-source-file "ladata"
128                                           :depends-on ("cffiglue"
129                                                        "defsys"
130                                                        "lstypes"
131                                                        "compound"
132                                                        "matrices"))
134                (:lispstat-lsp-source-file "linalg"
135                                           :depends-on ("cffiglue"
136                                                        "lsmath"
137                                                        "matrices"
138                                                        "ladata"
139                                                        "lsfloat"
140                                                        "lstypes"
141                                                        "compound"))
143                (:file "data" :depends-on ("lsobjects"
144                                           "compound"
145                                           "matrices"
146                                           "linalg"))
148                ;; there is a circ reference which we need to solve.
149                (:lispstat-lsp-source-file "lsbasics"
150                                           :depends-on ("lsobjects"
151                                                        "lstypes"
152                                                        "lsmacros"
153                                                        "lsfloat"
154                                                        "matrices"
155                                                        "linalg"
156                                                        "dists"))
158                (:lispstat-lsp-source-file "statistics"
159                                           :depends-on ("lsobjects"
160                                                        "lsbasics"
161                                                        "compound"
162                                                        "ladata" "matrices" "linalg"
163                                                        "lsmath"
164                                                        "data" ))
166                (:file "optimize" :depends-on ("lsobjects"
167                                               "cffiglue"
168                                               "lstypes"
169                                               "compound"
170                                               "lsmath"
171                                               "lsfloat"
172                                               "lsbasics"
173                                               "matrices"
174                                               "ladata"
175                                               "linalg"))
176                
177                ;; Applications
178                (:lispstat-lsp-source-file "regression"
179                                           :depends-on ("lsobjects"
180                                                        "lsbasics"
181                                                        "compound"
182                                                        "lsmath"
183                                                        "matrices"
184                                                        "linalg"
185                                                        "statistics"))
186 ;              (:lispstat-lsp-source-file "nonlin"
187 ;                                         :depends-on ("regression"))
189 ;              (:lispstat-lsp-source-file "bayes"
190 ;                                         :depends-on ("lsobjects"
191 ;                                                      "lsmath"
192 ;                                                      "dists"))
195                (:file "ls-user" :depends-on ("lsobjects"
196                                              "lsbasics"
197                                              "compound"
198                                              "dists"
199                                              "lstypes"
200                                              "lsfloat"
201                                              "data"
202                                              "lsmath"
203                                              "matrices"
204                                              "linalg"
205                                              "statistics"
206                                              "regression"))
208                (:file "unittests" :depends-on ("ls-user"))
209                (:file "unittests-lstypes" :depends-on ("ls-user"
210                                                        "lstypes"))
211                ;; (:file "unittests-data-clos" :depends-on ("ls-user"))
212                ;; (:file "unittests-regression" :depends-on ("ls-user"))
214                (:static-file "LICENSE")
215                (:static-file "README")
216                ))
219 ;; preparation for modulization...
221 ((:module
222   "lisp-stat-proto-objects"
223   :pathname "src/prototype/"
224   :comonents ((:lispstat-lsp-source-file "lsobjects"))))
226 ((:module
227   "lisp-stat-testing"
228   :pathname "src/unittests/"
229   :components ((:file "unittests" :depends-on ("ls-user"))
230                (:file "unittests-lstypes" :depends-on ("ls-user"
231                                                        "lstypes")))))