fasl-output patch for ASDF
Eduardo Muñoz <[email protected]>
| Newsgroups | gmane.lisp.cclan.general |
|---|---|
| Message-ID | <[email protected]> |
Greetings all,
Attached is a patch that enables a declaration for a fasl
output directory in asd files. I hate to have the source
directory flooded with fasl, fsl, fas, etc. files so the
main objective of the patch is to bring myself to use asd
files with my projects instead of the informally specified,
half assed, bug ridden thing that I use now (I am _not_
talking about mk:defsystem :)
As discussed on irc the main consumers of asdf files are
users messing with their own project and managed lisp
compilers (read c-l-c). The changes pass under the radar for
the later that can keep doing their voodoo via (defmethod
output-files :around (...)) or (with this patch) setf-ing
the fasl-output slot of the system after loading the asd
file and before asdf:operating. At the same time it allows
the casual user (me!) to have a defsystem like the
following:
(defsystem #:foo
:fasl-output (:relative "fasl")
:components (( ... )))
that will keep tidy my source directories.
--
Eduardo Muñoz | (prog () 10 (print "Hello world!")
http://213.97.131.125/ | 20 (go 10))
asdf.patch
(text/x-patch, 1.3 KB)
--- asdf.lisp.bak 2004-09-08 22:36:57.000000000 +0200
+++ asdf.lisp 2004-09-08 22:54:43.000000000 +0200
@@ -281,7 +281,8 @@ (defclass system (module)
:accessor system-long-description :initarg :long-description)
(author :accessor system-author :initarg :author)
(maintainer :accessor system-maintainer :initarg :maintainer)
- (licence :accessor system-licence :initarg :licence)))
+ (licence :accessor system-licence :initarg :licence)
+ (fasl-output :initarg :fasl-output :accessor fasl-output)))
;;; version-satisfies
@@ -728,7 +729,12 @@ (defmethod perform ((operation compile-o
(error 'compile-error :component c :operation operation)))))
(defmethod output-files ((operation compile-op) (c cl-source-file))
- #-:broken-fasl-loader (list (compile-file-pathname (component-pathname c)))
+ #-:broken-fasl-loader
+ (if (slot-boundp (component-parent c) 'fasl-output)
+ (list (merge-pathnames (make-pathname :directory
+ (fasl-output (component-parent c)))
+ (compile-file-pathname (component-pathname c))))
+ (list (compile-file-pathname (component-pathname c))))
#+:broken-fasl-loader (list (component-pathname c)))
(defmethod perform ((operation compile-op) (c static-file))