more tests to track down multiple regression failures
[CommonLispStat.git] / defsys.lsp
blobbd17a27ef37b26f90d2c0c919225d20807e8a915
1 ;;; -*- mode: lisp -*-
3 (in-package :cl-user)
5 (defpackage :lisp-stat-config
6 (:use :common-lisp)
7 (:export *default-path*
8 *lsos-files* *basic-files* *ls-files*
10 *lispstat-data-dir* *lispstat-examples-dir*
13 (in-package :lisp-stat-config)
15 ;; KCL
16 ;; (proclaim '(optimize (safety 2) (space 3) (speed 3)))
17 ;; (setf *break-enable* nil)
20 ;;;;
21 ;;;; EXCL (Allegro)
22 ;;;;
24 ;; (setf *read-default-float-format* 'double-float)
26 (defvar *common-lisp-stat-version* "1.0 Alpha 1")
28 (defvar *default-path* "./")
30 ;;;
31 ;;; Functions for switching into and out of debug mode
32 ;;;
33 ;;; Note that ANSI Common Lisp post-dates these, we need to ensure
34 ;;; that CL's signal handling is taken into consideration.
37 (defun ls-debug-on (signals-to-break-on) ;; FIXME:AJR
38 (setf *break-on-signals* signals-to-break-on))
40 (defun ls-debug-off ()
41 (setf *break-on-signals* nil))
44 ;;;;
45 ;;;; Compilation and Loading Utilities
46 ;;;;
48 (defvar *lsos-files* (list "lsobjects"))
50 (defvar *basic-files*
51 (list "lsbasics"
52 "lsfloat"
53 "compound"
54 "matrices"
55 "ladata"
56 "linalg"
57 "dists"))
59 (defvar *ls-files*
60 (list "lsmath"
61 ; #-:kcl "help"
62 "statistics"
63 "regression"
64 "nonlin"
65 "maximize"
66 "bayes"
67 "lstoplevel"))
69 (defun use-ls-package (name)
70 (shadowing-import (package-shadowing-symbols name))
71 (use-package name))
73 (defun use-stats ()
74 #+:kcl (shadowing-import '(ls::x))
75 (use-ls-package 'lisp-stat-object-system)
76 (use-ls-package 'lisp-stat-basics)
77 (use-ls-package 'lisp-stat))
79 (defun lispfile (x)
80 "Add suffix/type to string name."
81 (concatenate 'string x
82 #+:kcl ".lsp"
83 #+(or :mcl :excl) ".lisp"))
85 (defun load-files (files)
86 (dolist (f files) (load f :verbose t)))
88 (defun compile-load-files (files &optional (load t))
89 (dolist (f files)
90 #+:mcl (format t "compiling ~a~%" f)
91 #+:excl (load (lispfile f))
92 (compile-file f)
93 (if load (load f))))
95 (defun load-lsos ()
96 (load-files *lsos-files*))
98 (defun load-ls-basics ()
99 (load-lsos)
100 (load-files *basic-files*)
101 #+:kcl (if (and (probe-file "kclglue.o")
102 (probe-file "lib/clib.a"))
103 (si:faslink "kclglue" *clibs*)))
105 (defun load-stats ()
106 (load-ls-basics)
107 (load-files *ls-files*))
109 (defun compile-lsos ()
110 (compile-load-files *lsos-files*))
112 (defun compile-ls-basics (&optional (compile-all t))
113 (if compile-all (compile-lsos) (load-lsos))
114 (compile-load-files *basic-files*)
115 #+:kcl (progn (compile-file "kclglue")
116 (si:faslink "kclglue" *clibs*)))
118 (defun compile-stats (&optional (compile-all t))
119 (if compile-all (compile-ls-basics) (load-ls-basics))
120 (compile-load-files *ls-files*))
123 (defvar *lispstat-home-dir* #p"/home/tony/sandbox/CLS.git/"
124 "Value considered \"home\" for our data")
126 (setf *lispstat-home-dir*
127 ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"w
128 ;; #p"/home/tony/sandbox/CommonLispStat.git/"
129 #p"/home/tony/sandbox/CLS.git/")
131 (defmacro ls-dir (root-str)
132 `(pathname (concatenate 'string (namestring *lispstat-home-dir*) ,root-str)))
134 (defmacro ls-defdir (target-dir-var root-str)
135 `(defvar ,target-dir-var (ls-dir ,root-str)))
137 ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
138 ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
139 ;;(macroexpand-1 '(ls-dir "ASDF"))
141 (ls-defdir *lispstat-asdf-dir* "ASDF/")
142 (ls-defdir *lispstat-data-dir* "data/")
143 (ls-defdir *lispstat-external-dir* "external/")
144 (ls-defdir *lispstat-examples-dir* "examples/")
146 ;; Load ASDF if it isn't loaded
147 #-asdf(load (pathname (concatenate 'string (namestring *lispstat-external-dir*) "asdf")))
149 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
150 ;;(pushnew *lispstat-asdf-dir* asdf:*central-registry*))