<div>I'm using ASDF to build an open source implementation of Google's protocol</div><div>buffer data serialization library. The code is here:</div><div><br></div><div> <a href="http://github.com/brown/protobuf">http://github.com/brown/protobuf</a></div>
<div><br></div><div>I've defined a new component type that allows developers to include protobuf</div><div>message definition files in their Lisp ASDF files:</div><div><br></div><div> (defclass protobuf-source-file (cl-source-file)</div>
<div> ((relative-proto-pathname ... )</div><div> (search-path ... )</div><div> (:documentation "A protocol buffer definition file."))</div><div><br></div><div>When used like this in a system definition:</div>
<div><br></div><div> :components ((:protobuf-source-file "foo"))</div><div><br></div><div>executing the ASDF:LOAD-OP operation causes the file called foo.proto to be</div><div>translated into foo.lisp by a C++ program, and then compiled into foo.fasl</div>
<div>and loaded.</div><div><br></div><div>Note that foo.lisp is created in the same directory as the system</div><div>definition, but I would prefer it to be created in the same directory as</div><div>foo.fasl, which for me is in a subdirectory of ~/.cache/common-lisp.</div>
<div><br></div><div>What's the easiest way to accomplish this?</div><div><br></div><div>I initially tried overriding INPUT-FILES when applied to CL-SOURCE-FILE</div><div>instances, but ASDF::PERFORM is defined like this:</div>
<div><br></div><div> (defmethod perform ((operation compile-op) (c cl-source-file))</div><div> (let ((source-file (component-pathname c)) ... ) ... )</div><div><br></div><div>Since it calls COMPONENT-PATHNAME to find Lisp source, it will always look</div>
<div>in the system definition directory.</div><div><br></div><div>bob</div><div><br></div>