5 (defpackage :lisp-stat-config
7 (:export
*default-path
*
8 *lsos-files
* *basic-files
* *ls-files
*
10 *lispstat-data-dir
* *lispstat-examples-dir
*
13 (in-package :lisp-stat-config
)
16 ;; (proclaim '(optimize (safety 2) (space 3) (speed 3)))
17 ;; (setf *break-enable* nil)
24 ;; (setf *read-default-float-format* 'double-float)
26 (defvar *common-lisp-stat-version
* "1.0 Alpha 1")
28 (defvar *default-path
* "./")
31 ;;; Functions for switching into and out of debug mode
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
))
45 ;;;; Compilation and Loading Utilities
48 (defvar *lsos-files
* (list "lsobjects"))
70 (defun use-ls-package (name)
71 (shadowing-import (package-shadowing-symbols name
))
75 #+:kcl
(shadowing-import '(ls::x
))
76 (use-ls-package 'lisp-stat-object-system
)
77 (use-ls-package 'lisp-stat-basics
)
78 (use-ls-package 'lisp-stat
))
81 "Add suffix/type to string name."
82 (concatenate 'string x
84 #+(or :mcl
:excl
) ".lisp"))
86 (defun load-files (files)
87 (dolist (f files
) (load f
:verbose t
)))
89 (defun compile-load-files (files &optional
(load t
))
91 #+:mcl
(format t
"compiling ~a~%" f
)
92 #+:excl
(load (lispfile f
))
97 (load-files *lsos-files
*))
99 (defun load-ls-basics ()
101 (load-files *basic-files
*)
102 #+:kcl
(if (and (probe-file "kclglue.o")
103 (probe-file "lib/clib.a"))
104 (si:faslink
"kclglue" *clibs
*)))
108 (load-files *ls-files
*))
110 (defun compile-lsos ()
111 (compile-load-files *lsos-files
*))
113 (defun compile-ls-basics (&optional
(compile-all t
))
114 (if compile-all
(compile-lsos) (load-lsos))
115 (compile-load-files *basic-files
*)
116 #+:kcl
(progn (compile-file "kclglue")
117 (si:faslink
"kclglue" *clibs
*)))
119 (defun compile-stats (&optional
(compile-all t
))
120 (if compile-all
(compile-ls-basics) (load-ls-basics))
121 (compile-load-files *ls-files
*))
124 (defvar *lispstat-home-dir
* #p
"/home/tony/sandbox/CLS.git/"
125 "Value considered \"home\" for our data")
127 (setf *lispstat-home-dir
*
128 ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"w
129 ;; #p"/home/tony/sandbox/CommonLispStat.git/"
130 #p
"/home/tony/sandbox/CLS.git/")
132 (defmacro ls-dir
(root-str)
133 `(pathname (concatenate 'string
(namestring *lispstat-home-dir
*) ,root-str
)))
135 (defmacro ls-defdir
(target-dir-var root-str
)
136 `(defvar ,target-dir-var
(ls-dir ,root-str
)))
138 ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
139 ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
140 ;;(macroexpand-1 '(ls-dir "ASDF"))
142 (ls-defdir *lispstat-asdf-dir
* "ASDF/")
143 (ls-defdir *lispstat-data-dir
* "data/")
144 (ls-defdir *lispstat-external-dir
* "external/")
145 (ls-defdir *lispstat-examples-dir
* "examples/")
147 ;; Load ASDF if it isn't loaded
148 #-asdf
(load (pathname (concatenate 'string
(namestring *lispstat-external-dir
*) "asdf")))
150 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
151 ;;(pushnew *lispstat-asdf-dir* asdf:*central-registry*))