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"))
69 (defun use-ls-package (name)
70 (shadowing-import (package-shadowing-symbols name
))
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
))
80 "Add suffix/type to string name."
81 (concatenate 'string x
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
))
90 #+:mcl
(format t
"compiling ~a~%" f
)
91 #+:excl
(load (lispfile f
))
96 (load-files *lsos-files
*))
98 (defun load-ls-basics ()
100 (load-files *basic-files
*)
101 #+:kcl
(if (and (probe-file "kclglue.o")
102 (probe-file "lib/clib.a"))
103 (si:faslink
"kclglue" *clibs
*)))
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*))