[asdf-devel] create temporary Lisp files in fasl directory
robert.brown at gmail.com
Thu Aug 5 22:58:15 UTC 2010
I'm using ASDF to build an open source implementation of Google's protocol
buffer data serialization library. The code is here:
I've defined a new component type that allows developers to include protobuf
message definition files in their Lisp ASDF files:
(defclass protobuf-source-file (cl-source-file)
((relative-proto-pathname ... )
(search-path ... )
(:documentation "A protocol buffer definition file."))
When used like this in a system definition:
:components ((:protobuf-source-file "foo"))
executing the ASDF:LOAD-OP operation causes the file called foo.proto to be
translated into foo.lisp by a C++ program, and then compiled into foo.fasl
Note that foo.lisp is created in the same directory as the system
definition, but I would prefer it to be created in the same directory as
foo.fasl, which for me is in a subdirectory of ~/.cache/common-lisp.
What's the easiest way to accomplish this?
I initially tried overriding INPUT-FILES when applied to CL-SOURCE-FILE
instances, but ASDF::PERFORM is defined like this:
(defmethod perform ((operation compile-op) (c cl-source-file))
(let ((source-file (component-pathname c)) ... ) ... )
Since it calls COMPONENT-PATHNAME to find Lisp source, it will always look
in the system definition directory.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the asdf-devel