I should know this... finding INPUT-FILES

Robert Brown robert.brown at gmail.com
Fri Jan 24 22:25:47 UTC 2020


I think you're trying to do something similar to what I do in
https://github.com/brown/protobuf/blob/master/protobuf.asd
The example file in
https://github.com/brown/protobuf/blob/master/example/protobuf-example.asd
uses it to translate
a protocol buffer source file into Lisp code, which is then compiled.
Both the Lisp intermediate code and its compiled
version live in the directory where ASDF places compiled objects, not
in your source code tree.

On Fri, Jan 24, 2020 at 4:53 PM Robert Goldman <rpgoldman at sift.info> wrote:
>
> On 24 Jan 2020, at 15:30, Phoebe Goldman wrote:
>
> The impetus for this question is, I have subclassed cl-source-file with org-source-file and have defined tangle-op (as a subclass of both sideway-operation and upward-operation). my perform method is:
>
> (defmethod perform ((op tangle-op) (file org-source-file))
> (let* ((input-file (first (input-files op file)))
> (output-file (first (output-files op file))))
> (tangle input-file output-file)))
>
> where (tangle input-file output-file) runs emacs in batch mode to produce a lisp source file.
>
> How can I define my input-files and output-files methods to make the lisp source files appear in some build directory maintained by ASDF, rather than in my source tree?
>
> If I understand Faré correctly, you define output files normally, but then I believe you need to do the following:
>
> (defmethod input-files ((op compile-op) (file org-source-file))
>     (output-files (asdf:make-operation 'tangle-op) file))
>
> If I'm right, this will ensure that compile-op sees the translated pathnames for the lisp files, instead of looking in the source directory.



More information about the asdf-devel mailing list