Re: asdf dependency question

David Lichteblau <[email protected]>
Newsgroups gmane.lisp.cclan.general
Message-ID <[email protected]>
[email protected] (Simon András) writes:

> Unlike mk-defsystem, asdf doesn't recompile a file when files it
> depends on have changed.

It's not a bug -- it's a feature. ;-)

Since you can redefine functions at run time, (re)loading a fasl is
enough to make callers of that function use the new definition.  Compare
this to the situation in C where you might have functions f1() and f2(),
with header files f1.h and f2.h.  f2() calls f1(), and you want to make
an executable with both of them.  Example Makefile (untested of course):

--------
f1.o: f1.c f1.h
      $(CC) -c -o $@ $< ...

f2.o: f2.c f1.h f2.h
      $(CC) -c -o $@ $< ...

foo: f1.o f2.o
     $(CC) -o $@ $^
--------

Note the dependency of f2.o on f1.h -- but not on f1.o.  You don't need
to recompile f2() just because f1() has changed.  It is just like that
with Lisp, too, except that it is even better: You do not have to relink
`foo' either, because the Lisp takes care of linking.

The situation is different with (say) macros, of course.  (I am saying
`of course' -- although someone on c.l.l might disagree...)  Other
defsystems have features like :USES-DEFINITIONS-FROM to declare such
dependencies.

> Is there a way to achieve this?

Most certainly, though I will leave that question for Daniel Barlow to
answer... ;)




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.