Re: asdf: multiple compiler output directories
Kevin Rosenberg <[email protected]>
| Newsgroups | gmane.lisp.cclan.general |
|---|---|
| Message-ID | <[email protected]> |
John M. Adams wrote:
> When compiling an application with different compilers or different
> versions of the same compiler, it is sometimes desirable place
> compiler output in different directories according to the particular
> compiler.
It's not hard to do. Here's what I have in my boot.lisp file:
#+asdf
(progn
(defclass kmr-cl-source-file (cl-source-file) ())
(defmethod source-file-type ((c kmr-cl-source-file) (s module))
"cl")
(defmethod output-files ((operations compile-op) (c
kmr-cl-source-file))
(let* ((path (asdf:component-pathname c))
(src-file (if (pathname-host path)
(translate-logical-pathname path)
path))
(bin-file (compile-file-pathname src-file))
(bin-dir (kboot:append-binary-directory
(pathname-directory bin-file))))
(list (make-pathname :defaults bin-file
:directory bin-dir)))))
Where the kboot:append-binary-directory adds a
'(".bin" *compiler-name*) to the pathname's directory.
--
Kevin Rosenberg | .''`. ** Debian GNU/Linux **
http://b9.com/debian.html | : :' : The universal
GPG signed and encrypted | `. `' Operating System
messages accepted. | `- http://www.debian.org/
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf