maintaining non-Lisp systems with ASDF

Faré fahree at gmail.com
Wed Sep 23 21:39:22 UTC 2015


Dear Robert,

> I've made some more progress with a Maxima extension for ASDF
> (attached).

This looks much more like it. Congrats!

> At this point the only thing I wish I could change (and this is a
> minor item) is that output file paths are something like
> $HOME/.cache/common-lisp/<lisp-version>/<path-to-source-file>/<maxima-version>/<system-name>/<file-name>.
> I'm constructing the <maxima-version>/... part of it. I wonder if it's
> possible to tell ASDF it doesn't need to put in the
> <path-to-source-file> part.
>
You can do your own arbitrary translations in your output-files, and return
(values (list ...) t)

I recommend you "just" prepend your maxima-version to the component's
relative directory, or append it to its directory always, and let the
usual translations take your from there. That would fit the ASDF cache
model better, and thus be more clash-proof. These files are hidden
from users, anyway. Also, on many implementations, lisp compilation
has more than one output.

What you really need to do is:
(1) inherit from cl-source-file, not source-file, so you can reuse its
compile-op
(2) have compile-op depend on a new operation translate-op that does
just the translation step.
(3) Have a generic method:
(defmethod output-files ((o translate-op) (c maxima-file))
  (list (merge-pathnames*
           (make-pathname :directory `(:relative ,(strcat "maxima-"
maxima::*autoconf-version*)) :type "lisp")
           (component-pathname c))))

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Anarchy is order, government is civil war. — Anselme Bellegarrigue



More information about the asdf-devel mailing list