2 ;;; Time-stamp: <2009-12-23 08:40:18 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.
14 ;; Load ASDF if it isn't loaded
15 #-asdf(load (pathname (concatenate 'string (namestring *cls-external-dir*) "asdf")))
19 ;;; enforce all floating reads as doubles
20 ;; (setf *read-default-float-format* 'double-float)
22 ;;; optimization settings
23 ;; (proclaim '(optimize (safety 2) (space 3) (speed 3)))
25 (defpackage :lisp-stat-config
26 (:documentation "holds configuration variables, support functions, and ASDF structure.")
28 (:export *common-lisp-stat-version*
30 *lsos-files* *basic-files* *ls-files*
31 *cls-home-dir* *cls-data-dir* *cls-examples-dir*))
33 (in-package :lisp-stat-config)
37 (defvar *common-lisp-stat-version* "1.0 Alpha 1")
38 (defvar *default-path* "./")
41 (defparameter *cls-home-dir*
43 (truename (asdf:system-definition-pathname :cls)))
44 "Value considered \"home\" for our data")
48 ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"w
49 ;; #p"/home/tony/sandbox/CommonLispStat.git/"
50 #p"/home/tony/sandbox/CLS.git/")
53 (macrolet ((ls-dir (root-str)
54 `(pathname (concatenate 'string
55 (namestring *cls-home-dir*) ,root-str)))
57 (ls-defdir (target-dir-var root-str)
58 `(defvar ,target-dir-var (ls-dir ,root-str))))
59 (ls-defdir *cls-asdf-dir* "ASDF/")
60 (ls-defdir *cls-data-dir* "Data/")
61 (ls-defdir *cls-external-dir* "external/")
62 ;; reminder of testing
63 ;;(macroexpand '(ls-defdir *cls-asdf-dir* "ASDF"))
64 ;;(macroexpand-1 '(ls-defdir *cls-asdf-dir* "ASDF"))
65 ;;(macroexpand-1 '(ls-dir "ASDF"))
68 ;;(pushnew *cls-asdf-dir* asdf:*central-registry*)
69 ;;(pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft
71 (defpackage #:cls-system
72 (:use :common-lisp :asdf))
74 (in-package #:cls-system)
76 ;;; To avoid renaming everything from *.lsp to *.lisp...
77 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
78 ;;; NOT secure against serving multiple architectures/hardwares from
79 ;;; the same file system (i.e. PPC and x86 would not be
82 (defclass cls-lsp-source-file (cl-source-file) ())
83 (defparameter *fasl-directory*
84 (make-pathname :directory '(:relative
90 #-(or sbcl openmcl clisp cmucl) "fasl"
94 ;;; Handle Luke's *.lsp suffix
95 (defmethod source-file-type ((c cls-lsp-source-file) (s module)) "lsp")
96 (defmethod asdf::output-files :around ((operation compile-op)
97 (c cls-lsp-source-file))
98 (list (merge-pathnames *fasl-directory*
99 (compile-file-pathname (component-pathname c)))))
100 ;;; again, thanks to Cyrus for saving me time...
104 :version #.(with-open-file
105 (vers (merge-pathnames "version.lisp-expr" *load-truename*))
107 :author "A.J. Rossini <blindglobe@gmail.com>"
109 :description "Common Lisp Statistics (CLS): A System for Statistical
110 Computing with Common Lisp; based on Common LispStat (CLS alpha1) by
111 Luke Tierney <luke@stat.uiowa.edu> (apparently originally written
112 when Luke was at CMU, on leave at Bell Labs?). Last touched by him
113 in 1991, then by AJR starting in 2005."
117 :lisp-matrix ; on fnv, cl-blapack, ffa
123 :components ((:static-file "version" :pathname #p"version.lisp-expr")
124 (:static-file "LICENSE")
125 (:static-file "README")
131 ((:file "packages")))
135 :pathname "src/objsys/"
137 :depends-on ("packaging")
139 ((:cls-lsp-source-file "lsobjects")))
142 :pathname "src/basics/"
144 :depends-on ("packaging" "proto-objects")
146 ((:cls-lsp-source-file "lstypes")
147 (:cls-lsp-source-file "lsfloat")
149 (:cls-lsp-source-file "compound")
150 (:cls-lsp-source-file "lsmacros"
151 :depends-on ("compound"))
153 (:cls-lsp-source-file "lsmath"
154 :depends-on ("compound"
160 :pathname "src/numerics/"
161 :depends-on ("packaging" "proto-objects" "cls-core")
163 ((:cls-lsp-source-file "cffiglue")
164 (:cls-lsp-source-file "dists"
165 :depends-on ("cffiglue"))
167 (:cls-lsp-source-file "matrices"
168 :depends-on ("cffiglue"))
169 (:cls-lsp-source-file "ladata"
170 :depends-on ("cffiglue"
173 :depends-on ("cffiglue"
180 ;; Dataframes and statistical structures.
183 :pathname "src/data/"
184 :depends-on ("packaging"
190 (:file "dataframe-array")
191 (:file "dataframe-matrixlike")
192 (:file "dataframe-listoflist")
194 (:file "data-xls-compat")
199 :pathname "src/basics/"
200 :depends-on ("packaging"
206 ((:cls-lsp-source-file "lsbasics")))
212 :pathname "src/describe/"
213 :depends-on ("packaging"
220 ((:cls-lsp-source-file "statistics")))
224 :pathname "src/visualize/"
225 :depends-on ("cls-core")
231 :pathname "src/numerics/"
232 :depends-on ("packaging"
239 ((:file "optimize")))
245 :pathname "src/stat-models/"
246 :depends-on ("packaging"
254 ((:file "regression")
255 ;; (:cls-lsp-source-file "nonlin"
256 ;; :depends-on ("regression"))
257 ;; (:cls-lsp-source-file "bayes"
258 ;; :depends-on ("regression"))
265 :depends-on ("packaging"
274 (:cls-lsp-source-file "absorbtion")
275 (:cls-lsp-source-file "diabetes")
276 (:cls-lsp-source-file "leukemia")
277 (:cls-lsp-source-file "randu")
278 (:cls-lsp-source-file "aircraft")
279 (:cls-lsp-source-file "metabolism")
280 (:cls-lsp-source-file "book")
281 (:cls-lsp-source-file "heating")
282 (:cls-lsp-source-file "oxygen")
283 (:cls-lsp-source-file "stackloss")
284 (:cls-lsp-source-file "car-prices")
285 (:cls-lsp-source-file "iris")
286 (:cls-lsp-source-file "puromycin")
287 (:cls-lsp-source-file "tutorial")))
291 :depends-on ("packaging" "proto-objects"
300 :pathname "src/unittests/"
301 :components ((:file "unittests")
302 (:file "unittests-lstypes" :depends-on ("unittests"))
303 (:file "unittests-specfn" :depends-on ("unittests"))
304 (:file "unittests-prob" :depends-on ("unittests"))
305 (:file "unittests-proto" :depends-on ("unittests"))
306 (:file "unittests-regression" :depends-on ("unittests"))
307 (:file "unittests-listoflist" :depends-on ("unittests"))
308 (:file "unittests-arrays" :depends-on ("unittests"))
309 (:file "unittests-dataframe" :depends-on ("unittests"))))))