3 (defpackage :lisp-stat-config
5 (:export
*default-path
*
6 *lsos-files
* *basic-files
* *ls-files
*
8 *lispstat-data-dir
* *lispstat-examples-dir
*
11 (in-package :lisp-stat-config
)
14 ;; (proclaim '(optimize (safety 2) (space 3) (speed 3)))
15 ;; (setf *break-enable* nil)
22 ;; (setf *read-default-float-format* 'double-float)
24 (defvar *common-lisp-stat-version
* "1.0 Alpha 1")
26 (defvar *default-path
* "./")
29 ;;; Functions for switching into and out of debug mode
31 ;;; Note that ANSI Common Lisp post-dates these, we need to ensure
32 ;;; that CL's signal handling is taken into consideration.
35 (defun ls-debug-on (signals-to-break-on) ;; FIXME:AJR
36 (setf *break-on-signals
* signals-to-break-on
))
38 (defun ls-debug-off ()
39 (setf *break-on-signals
* nil
))
43 ;;;; Compilation and Loading Utilities
46 (defvar *lsos-files
* (list "lsobjects"))
68 (defun use-ls-package (name)
69 (shadowing-import (package-shadowing-symbols name
))
73 #+:kcl
(shadowing-import '(ls::x
))
74 (use-ls-package 'lisp-stat-object-system
)
75 (use-ls-package 'lisp-stat-basics
)
76 (use-ls-package 'lisp-stat
))
79 "Add suffix/type to string name."
80 (concatenate 'string x
82 #+(or :mcl
:excl
) ".lisp"))
84 (defun load-files (files)
85 (dolist (f files
) (load f
:verbose t
)))
87 (defun compile-load-files (files &optional
(load t
))
89 #+:mcl
(format t
"compiling ~a~%" f
)
90 #+:excl
(load (lispfile f
))
95 (load-files *lsos-files
*))
97 (defun load-ls-basics ()
99 (load-files *basic-files
*)
100 #+:kcl
(if (and (probe-file "kclglue.o")
101 (probe-file "lib/clib.a"))
102 (si:faslink
"kclglue" *clibs
*)))
106 (load-files *ls-files
*))
108 (defun compile-lsos ()
109 (compile-load-files *lsos-files
*))
111 (defun compile-ls-basics (&optional
(compile-all t
))
112 (if compile-all
(compile-lsos) (load-lsos))
113 (compile-load-files *basic-files
*)
114 #+:kcl
(progn (compile-file "kclglue")
115 (si:faslink
"kclglue" *clibs
*)))
117 (defun compile-stats (&optional
(compile-all t
))
118 (if compile-all
(compile-ls-basics) (load-ls-basics))
119 (compile-load-files *ls-files
*))
122 (defvar *lispstat-home-dir
* #p
"/home/tony/sandbox/CLS.git/"
123 "Value considered \"home\" for our data")
125 (setf *lispstat-home-dir
*
126 ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"w
127 ;; #p"/home/tony/sandbox/CommonLispStat.git/"
128 #p
"/home/tony/sandbox/CLS.git/")
130 (defmacro ls-dir
(root-str)
131 `(pathname (concatenate 'string
(namestring *lispstat-home-dir
*) ,root-str
)))
133 (defmacro ls-defdir
(target-dir-var root-str
)
134 `(defvar ,target-dir-var
(ls-dir ,root-str
)))
136 ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
137 ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
138 ;;(macroexpand-1 '(ls-dir "ASDF"))
140 (ls-defdir *lispstat-asdf-dir
* "ASDF/")
141 (ls-defdir *lispstat-data-dir
* "data/")
142 (ls-defdir *lispstat-external-dir
* "external/")
143 (ls-defdir *lispstat-examples-dir
* "examples/")
145 ;; Load ASDF if it isn't loaded
146 #-asdf
(load (pathname (concatenate 'string
(namestring *lispstat-external-dir
*) "asdf")))
148 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
149 ;;(pushnew *lispstat-asdf-dir* asdf:*central-registry*))