init is only useful for historical things, lispstat.asd now handles former activities.
[CommonLispStat.git] / lispstat.asd
blobc522f567855a655f2489ca83df244be92dc4ef88
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-15 12:51:47 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...
57 (in-package :cl-user)
59 (defpackage #:lispstat-system
60     (:use :asdf :common-lisp))
62 (in-package #:lispstat-system)
64 ;;; To avoid renaming everything from *.lsp to *.lisp...
65 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
66 (defclass lispstat-lsp-source-file (cl-source-file) ())
67 (defparameter *fasl-directory*
68    (make-pathname :directory '(:relative
69                                #+sbcl "sbcl-fasl"
70                                #+openmcl "openmcl-fasl"
71                                #+cmu "cmucl-fasl"
72                                #+clisp "clisp-fasl"
73                                #-(or sbcl openmcl clisp cmucl) "fasl"
74                                )))
76 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
77 (defmethod asdf::output-files :around ((operation compile-op)
78                                        (c lispstat-lsp-source-file))
79   (list (merge-pathnames *fasl-directory*
80                          (compile-file-pathname (component-pathname c)))))
81 ;;; again, thanks to Cyrus for saving me time...
84 (defsystem "lispstat"
85   :version #.(with-open-file
86                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
87                (read vers))
88   :author "A.J. Rossini <blindglobe@gmail.com>"
89   :license "BSD"
90   :description "CommonLispStat (CLS): A System for Statistical Computing with Common Lisp;
91 based on CLS by Luke Tierney <luke@stat.uiowa.edu> (originally written when Luke was at CMU, apparently).
92 Last touched 1991, then in 2005--2007."
93   :serial t
94   :depends-on (:cffi :lift) ;;  :clem) not yet but soon!
95   :components ((:static-file "version" :pathname #p"version.lisp-expr")
96                (:lispstat-lsp-source-file "lsobjects")
97                (:lispstat-lsp-source-file "cffiglue")
98                (:lispstat-lsp-source-file "defsys")
99                (:lispstat-lsp-source-file "lstypes")
100                (:lispstat-lsp-source-file "lsfloat")
102                (:lispstat-lsp-source-file "compound" 
103                                           :depends-on ("lsobjects"))
104                (:lispstat-lsp-source-file "lsmacros" 
105                                           :depends-on ("compound"))
107                (:lispstat-lsp-source-file "dists"
108                                           :depends-on ("cffiglue"
109                                                        "lsmacros"))
111                (:lispstat-lsp-source-file "lsmath"
112                                           :depends-on ("lsobjects"
113                                                        "compound"
114                                                        "lsmacros"
115                                                        "lsfloat"))
118                (:lispstat-lsp-source-file "matrices"
119                                           :depends-on ("cffiglue"
120                                                        "compound"))
122                (:lispstat-lsp-source-file "ladata"
123                                           :depends-on ("cffiglue"
124                                                        "defsys"
125                                                        "lstypes"
126                                                        "compound"
127                                                        "matrices"))
129                (:lispstat-lsp-source-file "linalg"
130                                           :depends-on ("cffiglue"
131                                                        "lsmath"
132                                                        "matrices"
133                                                        "ladata"
134                                                        "lsfloat"
135                                                        "lstypes"
136                                                        "compound"))
138                (:file "data" :depends-on ("lsobjects"
139                                           "compound"
140                                           "matrices"
141                                           "linalg"))
143                ;; there is a circ reference which we need to solve.
144                (:lispstat-lsp-source-file "lsbasics"
145                                           :depends-on ("lsobjects"
146                                                        "lstypes"
147                                                        "lsmacros"
148                                                        "lsfloat"
149                                                        "matrices"
150                                                        "linalg"
151                                                        "dists"))
153                (:lispstat-lsp-source-file "statistics"
154                                           :depends-on ("lsobjects"
155                                                        "lsbasics"
156                                                        "compound"
157                                                        "ladata" "matrices" "linalg"
158                                                        "lsmath"
159                                                        "data" ))
161                (:file "optimize" :depends-on ("lsobjects"
162                                               "cffiglue"
163                                               "lstypes"
164                                               "compound"
165                                               "lsmath"
166                                               "lsfloat"
167                                               "lsbasics"
168                                               "matrices"
169                                               "ladata"
170                                               "linalg"))
171                
172                ;; Applications
173                (:lispstat-lsp-source-file "regression"
174                                           :depends-on ("lsobjects"
175                                                        "lsbasics"
176                                                        "compound"
177                                                        "lsmath"
178                                                        "matrices"
179                                                        "linalg"
180                                                        "statistics"))
181 ;              (:lispstat-lsp-source-file "nonlin"
182 ;                                         :depends-on ("regression"))
184 ;              (:lispstat-lsp-source-file "bayes"
185 ;                                         :depends-on ("lsobjects"
186 ;                                                      "lsmath"
187 ;                                                      "dists"))
190                (:file "ls-user" :depends-on ("lsobjects"
191                                              "lsbasics"
192                                              "compound"
193                                              "dists"
194                                              "lstypes"
195                                              "lsfloat"
196                                              "data"
197                                              "lsmath"
198                                              "matrices"
199                                              "linalg"
200                                              "statistics"
201                                              "regression"))
204                (:file "unittests" :depends-on ("ls-user"))
206                ))