-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathload.lsp
30 lines (23 loc) · 1.01 KB
/
load.lsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
;; load the rasselbock system
(in-package :rasselbock :use '(:sys :lisp))
(defun fas-file (lisp-file)
(make-pathname :type "FAS" :version nil :defaults lisp-file))
(defun needs-recompile-p (lisp-file)
(let* ((lisp-file (pathname lisp-file))
(fas-file (fas-file lisp-file)))
(or (not (probe-file fas-file))
(> (file-write-date lisp-file) (file-write-date fas-file)))))
(defun ensure-sys-modules ()
(dolist (lisp-file (directory "[.sys]*.lsp;"))
(let ((needs-recompile-p (needs-recompile-p lisp-file))
(fas-file (fas-file lisp-file)))
(when needs-recompile-p
(format t "~&;; Compiling ~A~%" (namestring lisp-file))
(compile-file lisp-file))
(when (or needs-recompile-p
(not (find (pathname-name lisp-file) *modules* :test #'string-equal)))
(format t "~&;; Loading ~A~%" (namestring fas-file))
(load fas-file :verbose nil)))))
(ensure-sys-modules)
(dolist (file '(utils vms response file-response rasselbock))
(load (compile-file file)))