134
134
:type (pathname-type cfp))
135
135
(clc:calculate-fasl-root))))
138
137
(defun handle-loadtime-error (condition binary-pathname)
139
(format *error-output*
140
"~%~<;; ~@;Error while loading: ~A~% Condition: ~A~%Aborting.~:>~%"
141
(list binary-pathname condition))
138
(pprint-logical-block (*error-output* () :per-line-prefix ";; ")
139
(format *error-output*
140
"~%Error while loading: ~A~%Condition: ~A~%Aborting.~%"
141
binary-pathname condition))
142
142
(when (equal (directory-namestring binary-pathname)
143
143
(directory-namestring (default-fasl-directory)))
144
144
(ignore-errors (delete-file binary-pathname)))
148
148
"Compile each file in FILES if the source is newer than
149
149
its corresponding binary, or the file preceding it was
151
(with-compilation-unit ()
152
(let ((needs-recompile nil))
153
(dolist (source-pathname files)
154
(let ((binary-pathname (binary-pathname source-pathname
158
(when (or needs-recompile
159
(not (probe-file binary-pathname))
160
(file-newer-p source-pathname binary-pathname))
161
;; need a to recompile source-pathname, so we'll
162
;; need to recompile everything after this too.
163
(setq needs-recompile t)
164
(ensure-directories-exist binary-pathname)
165
(compile-file source-pathname :output-file binary-pathname
168
(load binary-pathname :verbose t))
169
;; Fail as early as possible
170
(serious-condition (c)
171
(handle-loadtime-error c binary-pathname))))))))
151
(let ((needs-recompile nil))
152
(dolist (source-pathname files)
153
(let ((binary-pathname (binary-pathname source-pathname
157
(when (or needs-recompile
158
(not (probe-file binary-pathname))
159
(file-newer-p source-pathname binary-pathname))
160
;; need a to recompile source-pathname, so we'll
161
;; need to recompile everything after this too.
162
(setq needs-recompile t)
163
(ensure-directories-exist binary-pathname)
164
(compile-file source-pathname :output-file binary-pathname
167
(load binary-pathname :verbose t))
168
;; Fail as early as possible
169
(serious-condition (c)
170
(handle-loadtime-error c binary-pathname)))))))
173
172
#+(or cormanlisp ecl)
174
173
(defun compile-files-if-needed-serially (files fasl-directory)