<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">On 16 Mar 2018, at 13:05, Lucien P wrote:</p>

</div>
<div style="white-space:normal"></div>
<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><div id="0C297730-EEE4-42D9-9D8D-DE02B4D33E03"><div dir="auto"><div><div class="gmail_quote"><div dir="ltr">On Fri, Mar 16, 2018, 11:25 Robert Dodier <<a href="mailto:robert.dodier@gmail.com">robert.dodier@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
I am resuming my tinkering on the Maxima interface to ASDF. I have<br>
bumped into a kind of minor problem for which I don't see a solution.<br>
<br>
Maxima can read .info files for documentation items. An index file<br>
(Lisp) which is created ahead of time (not run time) tells where the<br>
items are in the .info. The .asd, index, and .info are all in the same<br>
directory. Some code in the index file tells Maxima to read the .info<br>
from the same place from which the index is loaded (via<br>
*LOAD-PATHNAME*).<br>
<br>
That works great when the asd is loaded via LOAD-SOURCE-OP since<br>
*LOAD-PATHNAME* points to the directory where the .info file is. But<br>
when the asd is loaded via LOAD-OP, it doesn't work, since<br>
*LOAD-PATHNAME* points into the place that ASDF puts fasls.<br>
<br>
I gather from the ASDF reference manual that there isn't any way to<br>
load, without compiling, only the index file (I'm looking at "How do I<br>
mark a source file to be loaded only and not compiled?"). So I'm<br>
thinking about some other way to locate the .info file. Is there a<br>
special variable or something which tells the path from which the .asd<br>
is being loaded? I looked at the documentation and the list of<br>
external symbols but couldn't puzzle out anything.<br>
<br>
The more general idea is that the system contains a non-Lisp data<br>
file. Is there a general approach to work with that?<br>
<br>
Thanks for any light you can shed on this problem.<br>
<br>
Robert Dodier<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">The way I've been doing this is with a :STATIC-FILE component (you must include file extensions).</div><div dir="auto"><br></div><div dir="auto">ASDF will put your static file into the FASL location without touching it then you can find it to load using ASDF:FIND-COMPONENT. One of the component's slots will have the pathname of the "compiled" file in it, you don't have to use *LOAD-TRUENAME*.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div></div></blockquote>
<div style="white-space:normal">
<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px">
</blockquote></div>
<div style="white-space:normal">

<p dir="auto">I don't believe a static file should be moved, and if not moved, you should be able to load it with something like this;</p>

<pre style="background-color:#F7F7F7; border-radius:5px 5px 5px 5px; margin-left:15px; margin-right:15px; max-width:90vw; overflow-x:auto; padding:5px" bgcolor="#F7F7F7"><code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0" bgcolor="#F7F7F7">(asdf:system-relative-pathname "maxima" "subdir/my-static-file.blort")
</code></pre>

<p dir="auto">To be honest, I don't fully understand the question.  How is the index file created, and by what process?  Is it created as side-effect of compilation, or is there some special compilation process that creates it?  If the latter, then that process could be brought under ASDF control, and the code used to create the index file could be configured, through the use of output-files configuration, to place the file wherever you want.</p>

<p dir="auto">On the other hand, if the info files are static, and the indices are created in the FASL location, then you can just use <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">ASDF:SYSTEM-RELATIVE-PATHNAME</code> instead of <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">*load-pathname*</code> to find the file.</p>

<p dir="auto">On the other other hand, you could use <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">*compile-file-truename*</code> instead of <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">*load-pathname*</code>, but that would have semantics that could vary (e.g., if you load some of this stuff interactively, instead of through ASDF), so that's not an ideal choice.</p>
</div>
</div>
</body>
</html>