diff --git a/asdf.lisp b/asdf.lisp index e647caaa6180a26363d658b8ca10032886bef5db..4d14b72076cdb34359e5950ac5cc9ad0103d1e3f 100644 --- a/asdf.lisp +++ b/asdf.lisp @@ -290,6 +290,7 @@ #:clear-output-translations #:ensure-output-translations #:apply-output-translations + #:compile-file* #:compile-file-pathname* #:enable-asdf-binary-locations-compatibility @@ -1761,7 +1762,7 @@ recursive calls to traverse.") (let ((source-file (component-pathname c)) (output-file (car (output-files operation c)))) (multiple-value-bind (output warnings-p failure-p) - (apply #'compile-file source-file :output-file output-file + (apply #'compile-file* source-file :output-file output-file (compile-op-flags operation)) (when warnings-p (case (operation-on-warnings operation) @@ -2928,11 +2929,39 @@ effectively disabling the output translation facility." (mapcar #'apply-output-translations files))) t)) -(defun compile-file-pathname* (input-file &rest keys) - (apply-output-translations - (apply #'compile-file-pathname - (truenamize (lispize-pathname input-file)) - keys))) +(defun compile-file-pathname* (input-file &rest keys &key output-file &allow-other-keys) + (or output-file + (apply-output-translations + (apply 'compile-file-pathname + (truenamize (lispize-pathname input-file)) + keys)))) + +(defun tmpize-pathname (x) + (make-pathname + :name (format nil "ASDF-TMP-~A" (pathname-name x)) + :defaults x)) + +(defun delete-file-if-exists (x) + (when (probe-file x) + (delete-file x))) + +(defun compile-file* (input-file &rest keys) + (let* ((output-file (apply 'compile-file-pathname* input-file keys)) + (tmp-file (tmpize-pathname output-file)) + (successp nil)) + (unwind-protect + (multiple-value-bind (output-truename warnings-p failure-p) + (apply 'compile-file input-file :output-file tmp-file keys) + (if failure-p + (setf output-truename nil) + (setf successp t)) + (values output-truename warnings-p failure-p)) + (cond + (successp + (delete-file-if-exists output-file) + (rename-file tmp-file output-file)) + (t + (delete-file-if-exists tmp-file)))))) #+abcl (defun translate-jar-pathname (source wildcard) diff --git a/doc/index.html b/doc/index.html index 11391f36610dbaac6722f58c82d0470e28431ba9..5377f90666c9a085d94fa37300f8850a67744794 100644 --- a/doc/index.html +++ b/doc/index.html @@ -71,6 +71,8 @@ <li>pull the latest from our git repository (<a href="http://common-lisp.net/gitweb?p=projects/asdf/asdf.git">browse</a>) <pre>git clone git://common-lisp.net/projects/asdf/asdf.git</pre> + (Note that our "master" branch is for current development; + get our "release" branch for the latest stable release.) </li></ul> <a id="bugs"> @@ -100,7 +102,7 @@ <dd>François-René Rideau is de facto maintainer, with notable contributions from Robert P. Goldman, Juanjo Garcia-Ripoll and James Anderson. - Push towards an ASDF 2 release + ASDF 2 released with many clean-ups, better configurability and updated documentation. </dd> diff --git a/test/try-recompiling-1.lisp b/test/try-recompiling-1.lisp index 8f754c0253a1555a3a5af963cb191b1e9539cb72..395c719da2530b524c7216a05fdc8b493b85f612 100644 --- a/test/try-recompiling-1.lisp +++ b/test/try-recompiling-1.lisp @@ -1,5 +1,7 @@ (in-package #:common-lisp-user) +#+clisp (eval-when (:compile-toplevel) (fmakunbound 'try-recompiling-1)) + (defun try-recompiling-1 () (assert *caught-error*))