2 ;;; Time-stamp: <2009-12-20 22:30:50 tony>
3 ;;; Created: <2005-05-30 17:09:47 blindglobe>
5 ;;; Author: AJ Rossini <blindglobe@gmail.com>
6 ;;; Copyright: (c) 2005--2008, by AJ Rossini <blindglobe@gmail.com>
7 ;;; License: BSD, see the top level directory file LICENSE for details.
8 ;;; Purpose: ASDF packaging for CommonLisp Stat
10 ;;; What is this talk of 'release'? Klingons do not make software
11 ;;; 'releases'. Our software 'escapes', leaving a bloody trail of
12 ;;; designers and quality assurance people in its wake.
16 (defpackage :lisp-stat-config
18 (:export *default-path*
19 *lsos-files* *basic-files* *ls-files*
20 *cls-home-dir* *cls-data-dir* *cls-examples-dir*))
22 (in-package :lisp-stat-config)
24 (defparameter *cls-home-dir*
26 (truename (asdf:system-definition-pathname :cls)))
27 "Value considered \"home\" for our data")
29 (macrolet ((ls-dir (root-str)
30 `(pathname (concatenate 'string
31 (namestring *cls-home-dir*) ,root-str)))
33 (ls-defdir (target-dir-var root-str)
34 `(defvar ,target-dir-var (ls-dir ,root-str))))
36 ;; reminder of testing
37 ;;(macroexpand '(ls-defdir *cls-asdf-dir* "ASDF"))
38 ;;(macroexpand-1 '(ls-defdir *cls-asdf-dir* "ASDF"))
39 ;;(macroexpand-1 '(ls-dir "ASDF"))
41 (ls-defdir *cls-asdf-dir* "ASDF/")
42 (ls-defdir *cls-data-dir* "Data/")
43 (ls-defdir *cls-external-dir* "external/"))
45 ;;(pushnew *cls-asdf-dir* asdf:*central-registry*)
47 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft
51 (defpackage #:cls-system
52 (:use :common-lisp :asdf))
54 (in-package #:cls-system)
56 ;;; To avoid renaming everything from *.lsp to *.lisp...
57 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
58 ;;; NOT secure against serving multiple architectures/hardwares from
59 ;;; the same file system (i.e. PPC and x86 would not be
62 (defclass cls-lsp-source-file (cl-source-file) ())
63 (defparameter *fasl-directory*
64 (make-pathname :directory '(:relative
70 #-(or sbcl openmcl clisp cmucl) "fasl"
74 ;;; Handle Luke's *.lsp suffix
75 (defmethod source-file-type ((c cls-lsp-source-file) (s module)) "lsp")
76 (defmethod asdf::output-files :around ((operation compile-op)
77 (c cls-lsp-source-file))
78 (list (merge-pathnames *fasl-directory*
79 (compile-file-pathname (component-pathname c)))))
80 ;;; again, thanks to Cyrus for saving me time...
84 :version #.(with-open-file
85 (vers (merge-pathnames "version.lisp-expr" *load-truename*))
87 :author "A.J. Rossini <blindglobe@gmail.com>"
89 :description "Common Lisp Statistics (CLS): A System for Statistical
90 Computing with Common Lisp; based on Common LispStat (CLS alpha1) by
91 Luke Tierney <luke@stat.uiowa.edu> (apparently originally written
92 when Luke was at CMU, on leave at Bell Labs?). Last touched by him
93 in 1991, then by AJR starting in 2005."
97 :lisp-matrix ; on fnv, cl-blapack, ffa
103 :components ((:static-file "version" :pathname #p"version.lisp-expr")
104 (:static-file "LICENSE")
105 (:static-file "README")
111 ((:file "packages")))
115 :pathname "src/objsys/"
117 :depends-on ("packaging")
119 ((:cls-lsp-source-file "lsobjects")))
122 :pathname "src/basics/"
124 :depends-on ("packaging" "proto-objects")
126 (;(:cls-lsp-source-file "defsys") ; XLS compat?
127 (:cls-lsp-source-file "lstypes")
128 (:cls-lsp-source-file "lsfloat")
130 (:cls-lsp-source-file "compound")
131 (:cls-lsp-source-file "lsmacros"
132 :depends-on ("compound"))
134 (:cls-lsp-source-file "lsmath"
135 :depends-on ("compound"
141 :pathname "src/numerics/"
142 :depends-on ("packaging" "proto-objects" "cls-core")
144 ((:cls-lsp-source-file "cffiglue")
145 (:cls-lsp-source-file "dists"
146 :depends-on ("cffiglue"))
148 (:cls-lsp-source-file "matrices"
149 :depends-on ("cffiglue"))
150 (:cls-lsp-source-file "ladata"
151 :depends-on ("cffiglue"
154 :depends-on ("cffiglue"
161 ;; Dataframes and statistical structures.
164 :pathname "src/data/"
165 :depends-on ("packaging"
171 (:file "dataframe-array")
172 (:file "dataframe-matrixlike")
173 (:file "dataframe-listoflist")
175 (:file "data-xls-compat")
180 :pathname "src/basics/"
181 :depends-on ("packaging"
187 ((:cls-lsp-source-file "lsbasics")))
193 :pathname "src/describe/"
194 :depends-on ("packaging"
201 ((:cls-lsp-source-file "statistics")))
205 :pathname "src/visualize/"
206 :depends-on ("cls-core")
212 :pathname "src/numerics/"
213 :depends-on ("packaging"
220 ((:file "optimize")))
226 :pathname "src/stat-models/"
227 :depends-on ("packaging"
235 ((:file "regression")
236 ;; (:cls-lsp-source-file "nonlin"
237 ;; :depends-on ("regression"))
238 ;; (:cls-lsp-source-file "bayes"
239 ;; :depends-on ("regression"))
246 :depends-on ("packaging"
255 (:cls-lsp-source-file "absorbtion")
256 (:cls-lsp-source-file "diabetes")
257 (:cls-lsp-source-file "leukemia")
258 (:cls-lsp-source-file "randu")
259 (:cls-lsp-source-file "aircraft")
260 (:cls-lsp-source-file "metabolism")
261 (:cls-lsp-source-file "book")
262 (:cls-lsp-source-file "heating")
263 (:cls-lsp-source-file "oxygen")
264 (:cls-lsp-source-file "stackloss")
265 (:cls-lsp-source-file "car-prices")
266 (:cls-lsp-source-file "iris")
267 (:cls-lsp-source-file "puromycin")
268 (:cls-lsp-source-file "tutorial")))
272 :depends-on ("packaging" "proto-objects"
281 :pathname "src/unittests/"
282 :components ((:file "unittests")
283 (:file "unittests-lstypes" :depends-on ("unittests"))
284 (:file "unittests-specfn" :depends-on ("unittests"))
285 (:file "unittests-prob" :depends-on ("unittests"))
286 (:file "unittests-proto" :depends-on ("unittests"))
287 (:file "unittests-regression" :depends-on ("unittests"))
288 (:file "unittests-listoflist" :depends-on ("unittests"))
289 (:file "unittests-arrays" :depends-on ("unittests"))
290 (:file "unittests-dataframe" :depends-on ("unittests"))))))