Finding out from where the .asd was loaded and/or referencing a non-executable data file

Robert Goldman rpgoldman at sift.info
Fri Mar 16 23:07:58 UTC 2018


On 16 Mar 2018, at 17:52, Robert Dodier wrote:

> On Fri, Mar 16, 2018 at 1:59 PM, Robert Goldman <rpgoldman at sift.info> 
> wrote:
>
>> Another trick you could try is to define a special class of files for 
>> the
>> info files (probably just a subclass of cl-source-file). Then you 
>> could tell
>> ASDF not to move that class of files, by providing a method on 
>> OUTPUT-FILES.
>
>> You can return T for the second value in order to have 
>> output-translations
>> not apply, IIRC.
>
> Actually, one way to achieve the effect that I want is to have the
> info file copied into the place where the fasls end up (because then
> *LOAD-PATHNAME* points to the place where the info file is found, just
> as it is when the index.lisp is loaded via LOAD).
>
> I suppose I could create a class that has the effect of copying the
> info files without any other operation on them?
>
> best,
> Robert Dodier

Yes, for example, you could override the `COMPILE-OP` for this class of 
files to just do the move, instead of being a no-op.

Now that I think of it, if these index files are lisp data (some kind of 
table, right?), couldn't you actually compile them?  If you can use 
`CL:LOAD` on them, couldn't you also use `COMPILE-FILE`?  In which case, 
I think you could just treat them like cl source files, and use `(or 
*compile-file-truename* *load-truename*)`.  I think that would give you 
the behavior you want.

Best,
r
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20180316/644ecdca/attachment.html>


More information about the asdf-devel mailing list