local config for matlisp -- which needs to be converted to CFFI and ASDF for commonality.
[CommonLispStat.git] / lispstat.asd
blob93cd7a20d3064aee78b6c01bbe7707c30204228a
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-22 08:27:09 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 (load "../matlisp.git/start.lisp")
64 (in-package :cl-user)
66 (defpackage #:lispstat-system
67     (:use :asdf :common-lisp))
69 (in-package #:lispstat-system)
71 ;;; To avoid renaming everything from *.lsp to *.lisp...
72 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
73 (defclass lispstat-lsp-source-file (cl-source-file) ())
74 (defparameter *fasl-directory*
75    (make-pathname :directory '(:relative
76                                #+sbcl "sbcl-fasl"
77                                #+openmcl "openmcl-fasl"
78                                #+cmu "cmucl-fasl"
79                                #+clisp "clisp-fasl"
80                                #-(or sbcl openmcl clisp cmucl) "fasl"
81                                )))
83 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
84 (defmethod asdf::output-files :around ((operation compile-op)
85                                        (c lispstat-lsp-source-file))
86   (list (merge-pathnames *fasl-directory*
87                          (compile-file-pathname (component-pathname c)))))
88 ;;; again, thanks to Cyrus for saving me time...
91 (defsystem "lispstat"
92   :version #.(with-open-file
93                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
94                (read vers))
95   :author "A.J. Rossini <blindglobe@gmail.com>"
96   :license "BSD"
97   :description "CommonLispStat (CLS): A System for Statistical Computing with Common Lisp;
98 based on CLS by Luke Tierney <luke@stat.uiowa.edu> (originally written when Luke was at CMU, apparently).
99 Last touched 1991, then in 2005--2008."
100   :serial t
101   :depends-on (:cffi :lift) ;;  :clem) not yet but soon!
102   :components ((:static-file "version" :pathname #p"version.lisp-expr")
103                (:lispstat-lsp-source-file "lsobjects")
104                (:lispstat-lsp-source-file "cffiglue")
105                (:lispstat-lsp-source-file "defsys")
106                (:lispstat-lsp-source-file "lstypes")
107                (:lispstat-lsp-source-file "lsfloat")
109                (:lispstat-lsp-source-file "compound" 
110                                           :depends-on ("lsobjects"))
111                (:lispstat-lsp-source-file "lsmacros" 
112                                           :depends-on ("compound"))
114                (:lispstat-lsp-source-file "dists"
115                                           :depends-on ("cffiglue"
116                                                        "lsmacros"))
118                (:lispstat-lsp-source-file "lsmath"
119                                           :depends-on ("lsobjects"
120                                                        "compound"
121                                                        "lsmacros"
122                                                        "lsfloat"))
125                (:lispstat-lsp-source-file "matrices"
126                                           :depends-on ("cffiglue"
127                                                        "compound"))
129                (:lispstat-lsp-source-file "ladata"
130                                           :depends-on ("cffiglue"
131                                                        "defsys"
132                                                        "lstypes"
133                                                        "compound"
134                                                        "matrices"))
136                (:lispstat-lsp-source-file "linalg"
137                                           :depends-on ("cffiglue"
138                                                        "lsmath"
139                                                        "matrices"
140                                                        "ladata"
141                                                        "lsfloat"
142                                                        "lstypes"
143                                                        "compound"))
145                (:file "data" :depends-on ("lsobjects"
146                                           "compound"
147                                           "matrices"
148                                           "linalg"))
150                ;; there is a circ reference which we need to solve.
151                (:lispstat-lsp-source-file "lsbasics"
152                                           :depends-on ("lsobjects"
153                                                        "lstypes"
154                                                        "lsmacros"
155                                                        "lsfloat"
156                                                        "matrices"
157                                                        "linalg"
158                                                        "dists"))
160                (:lispstat-lsp-source-file "statistics"
161                                           :depends-on ("lsobjects"
162                                                        "lsbasics"
163                                                        "compound"
164                                                        "ladata" "matrices" "linalg"
165                                                        "lsmath"
166                                                        "data" ))
168                (:file "optimize" :depends-on ("lsobjects"
169                                               "cffiglue"
170                                               "lstypes"
171                                               "compound"
172                                               "lsmath"
173                                               "lsfloat"
174                                               "lsbasics"
175                                               "matrices"
176                                               "ladata"
177                                               "linalg"))
178                
179                ;; Applications
180                (:lispstat-lsp-source-file "regression"
181                                           :depends-on ("lsobjects"
182                                                        "lsbasics"
183                                                        "compound"
184                                                        "lsmath"
185                                                        "matrices"
186                                                        "linalg"
187                                                        "statistics"))
188 ;              (:lispstat-lsp-source-file "nonlin"
189 ;                                         :depends-on ("regression"))
191 ;              (:lispstat-lsp-source-file "bayes"
192 ;                                         :depends-on ("lsobjects"
193 ;                                                      "lsmath"
194 ;                                                      "dists"))
197                (:file "ls-user" :depends-on ("lsobjects"
198                                              "lsbasics"
199                                              "compound"
200                                              "dists"
201                                              "lstypes"
202                                              "lsfloat"
203                                              "data"
204                                              "lsmath"
205                                              "matrices"
206                                              "linalg"
207                                              "statistics"
208                                              "regression"))
210                (:file "unittests" :depends-on ("ls-user"))
211                (:file "unittests-lstypes" :depends-on ("ls-user"
212                                                        "lstypes"))
213                ;; (:file "unittests-data-clos" :depends-on ("ls-user"))
214                ;; (:file "unittests-regression" :depends-on ("ls-user"))
216                (:static-file "LICENSE")
217                (:static-file "README")
218                ))
221 ;; preparation for modulization...
223 ((:module
224   "lisp-stat-proto-objects"
225   :pathname "src/prototype/"
226   :comonents ((:lispstat-lsp-source-file "lsobjects"))))
228 ((:module
229   "lisp-stat-testing"
230   :pathname "src/unittests/"
231   :components ((:file "unittests" :depends-on ("ls-user"))
232                (:file "unittests-lstypes" :depends-on ("ls-user"
233                                                        "lstypes")))))