Purpose of components of type :static-file?
Robert P. Goldman
rpgoldman at sift.net
Tue May 26 17:27:30 UTC 2015
Dave Cooper wrote:
> What is the intended purpose of the :static-files component-type in
> ASDF? I see a couple examples of their use in the ASDF manual, but
> didn't see an explanation or real example of how to use them downstream
> from including them in the defsystem form in the .asd file.
> Presumably they can be used for README, license, example files, and
> other resources which go with a system but are not Lisp source files to
> be compiled and loaded with the system.
> If so, then what are the supported/expected operations with
> static-files? For example, is there a way to query a system for files of
> type :static-file, so that you can do something with them (e.g. copy
> them to a distribution directory)?
You are right that the intended purpose of static-files is to support
system introspection and human readers.
I have also used them for web content in lisp-powered web applications.
Yes, you can query for all the static files:
CL-USER> (remove-if-not #'(lambda (x) (typep x 'asdf:static-file))
(#<ASDF/COMPONENT:STATIC-FILE "alexandria" "LICENCE">
#<ASDF/COMPONENT:STATIC-FILE "alexandria" "tests.lisp">)
More information about the asdf-devel