blob: 879be72b95750dfc458dd4f4a33ca5d9974dff69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
(defun load-sbcl-file (file &optional (exit t))
(labels ((exit-sbcl (code)
#+sbcl #.(if (eq :external
(nth-value 1 (find-symbol "EXIT" :sb-ext)))
`(,(find-symbol "EXIT" :sb-ext) :code code)
`(,(find-symbol "QUIT" :sb-ext) :unix-status code))
#+ccl (ccl:quit code)
#+abcl (ext:quit :status code)
#+cmucl (unix:unix-exit code)
#+ecl (si:quit code)
#+clisp (ext:quit code)
(return-from load-sbcl-file)))
(restart-case
(load file)
(abort-build ()
:report "Abort building SBCL."
(exit-sbcl 1)))
(when exit (exit-sbcl 0))))
|