~ubuntu-branches/ubuntu/intrepid/slime/intrepid

« back to all changes in this revision

Viewing changes to swank-loader.lisp

  • Committer: Bazaar Package Importer
  • Author(s): Peter Van Eynde
  • Date: 2007-05-04 22:18:29 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070504221829-lhtgdzbpcaaiwii9
Tags: 1:20070409-1
Fixed XS-Vcs-Bzr item in control file 

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
                                    :type (pathname-type cfp))
135
135
           (clc:calculate-fasl-root))))
136
136
 
137
 
 
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
150
150
recompiled."
151
 
  (with-compilation-unit ()
152
 
    (let ((needs-recompile nil))
153
 
      (dolist (source-pathname files)
154
 
        (let ((binary-pathname (binary-pathname source-pathname
155
 
                                                fasl-directory)))
156
 
          (handler-case
157
 
              (progn
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
166
 
                                :print nil
167
 
                                :verbose t))
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
 
154
                                              fasl-directory)))
 
155
        (handler-case
 
156
            (progn
 
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
 
165
                              :print nil
 
166
                              :verbose t))
 
167
              (load binary-pathname :verbose t))
 
168
          ;; Fail as early as possible
 
169
          (serious-condition (c)
 
170
            (handle-loadtime-error c binary-pathname)))))))
172
171
 
173
172
#+(or cormanlisp ecl)
174
173
(defun compile-files-if-needed-serially (files fasl-directory)