3 (in-package :lisp-stat-config
)
7 ;; (proclaim '(optimize (safety 2) (space 3) (speed 3)))
8 ;; (setf *break-enable* nil)
13 ;; (setf *read-default-float-format* 'double-float)
15 (defvar *common-lisp-stat-version
* "1.0 Alpha 1")
17 (defvar *default-path
* "./")
20 ;;; Functions for switching into and out of debug mode
22 ;;; Note that ANSI Common Lisp post-dates these, we need to ensure
23 ;;; that CL's signal handling is taken into consideration.
26 (defun ls-debug-on (signals-to-break-on) ;; FIXME:AJR
27 (setf *break-on-signals
* signals-to-break-on
))
29 (defun ls-debug-off ()
30 (setf *break-on-signals
* nil
))
34 ;;;; Compilation and Loading Utilities
37 (defvar *lsos-files
* (list "lsobjects"))
58 (defun use-ls-package (name)
59 (shadowing-import (package-shadowing-symbols name
))
63 #+:kcl
(shadowing-import '(ls::x
))
64 (use-ls-package 'lisp-stat-object-system
)
65 (use-ls-package 'lisp-stat-basics
)
66 (use-ls-package 'lisp-stat
))
69 "Add suffix/type to string name."
70 (concatenate 'string x
72 #+(or :mcl
:excl
) ".lisp"))
74 (defun load-files (files)
75 (dolist (f files
) (load f
:verbose t
)))
77 (defun compile-load-files (files &optional
(load t
))
79 #+:mcl
(format t
"compiling ~a~%" f
)
80 #+:excl
(load (lispfile f
))
85 (load-files *lsos-files
*))
87 (defun load-ls-basics ()
89 (load-files *basic-files
*)
90 #+:kcl
(if (and (probe-file "kclglue.o")
91 (probe-file "lib/clib.a"))
92 (si:faslink
"kclglue" *clibs
*)))
96 (load-files *ls-files
*))
98 (defun compile-lsos ()
99 (compile-load-files *lsos-files
*))
101 (defun compile-ls-basics (&optional
(compile-all t
))
102 (if compile-all
(compile-lsos) (load-lsos))
103 (compile-load-files *basic-files
*)
104 #+:kcl
(progn (compile-file "kclglue")
105 (si:faslink
"kclglue" *clibs
*)))
107 (defun compile-stats (&optional
(compile-all t
))
108 (if compile-all
(compile-ls-basics) (load-ls-basics))
109 (compile-load-files *ls-files
*))
112 (defvar *lispstat-home-dir
* #p
"/home/tony/sandbox/CLS.git/"
113 "Value considered \"home\" for our data")
115 (setf *lispstat-home-dir
*
116 ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"w
117 ;; #p"/home/tony/sandbox/CommonLispStat.git/"
118 #p
"/home/tony/sandbox/CLS.git/")
120 (defmacro ls-dir
(root-str)
121 `(pathname (concatenate 'string
(namestring *lispstat-home-dir
*) ,root-str
)))
123 (defmacro ls-defdir
(target-dir-var root-str
)
124 `(defvar ,target-dir-var
(ls-dir ,root-str
)))
126 ;;(macroexpand '(ls-defdir *lispstat-asdf-dir* "ASDF"))
127 ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
128 ;;(macroexpand-1 '(ls-dir "ASDF"))
130 (ls-defdir *lispstat-asdf-dir
* "ASDF/")
131 (ls-defdir *lispstat-data-dir
* "data/")
132 (ls-defdir *lispstat-external-dir
* "external/")
133 (ls-defdir *lispstat-examples-dir
* "examples/")
135 ;; Load ASDF if it isn't loaded
136 #-asdf
(load (pathname (concatenate 'string
(namestring *lispstat-external-dir
*) "asdf")))
138 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
139 ;;(pushnew *lispstat-asdf-dir* asdf:*central-registry*))