[asdf-devel] Two questions
fahree at gmail.com
Wed Sep 30 10:14:53 UTC 2009
2009/9/30 Nick Levine <ndl at ravenbrook.com>:
> 1. Problems with the :feature feature.
> (asdf:defsystem foo
> :components ((:file "pkg")
> (:file "code")
> (:file "foo" :depends-on ((:feature :frob)))))
> If :frob is not on *features*, load-system gives me:
> Error: Bad dependency (FEATURE FROB). Dependencies must be
> (:version <version>), (:feature <feature>), or a name
> If :frob is a *feature* I get a different error:
> Error: Error component :FROB not found, required by #<CL-SOURCE-FILE
> "foo" #x8B7A3E6>
> Did I misunderstand something?
Maybe what you want is #+frob (:file "foo")
> 2. Suppose I would like some code to run at compile-time / load-time
> to determine where the fasls should live (e.g. hypothetically, in a
> subdirectory named after a timestamp, or according to what patches I
> have loaded). How do I express this?
You can define your own :around method on output-files, and/or
override default methods. See how ASDF-BINARY-LOCATIONS (now part of
ASDF 1.366 and later) does it.
Note that with XCVB, you can :depends-on (:when (:featurep :frob)
"foo") and you can xcvb --object-directory obj-$(timestamp) ...
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
If a vegetarian eats vegetables, what does a humanitarian eat? -- Mark Twain
More information about the asdf-devel