This section begins with an example of a system definition,
then gives the full grammar of
Let’s look at a simple system.
This is a complete file that should be saved as hello-lisp.asd
(in order that ASDF can find it
when ordered to operate on the system named
(in-package :asdf-user) (defsystem "hello-lisp" :description "hello-lisp: a sample Lisp system." :version "0.0.1" :author "Joe User <email@example.com>" :licence "Public Domain" :components ((:file "packages") (:file "macros" :depends-on ("packages")) (:file "hello" :depends-on ("macros"))))
Some notes about this example:
in-packageform for package
asdf-user. Quick summary: just do this, because it helps make interactive development of
defsystemforms behave in the same was as when these forms are loaded by ASDF. If that’s enough for you, skip the rest of this item. Otherwise read on for the gory details.
If your file is loaded by ASDF 3, it will be loaded into the
asdf-user package. The
will ensure that the system definition is read the
same as within ASDF when you load it interactively with
However, we recommend that you load .asd files
asdf::load-asd rather than through
in which case this form is unnecessary.
Recent versions of SLIME (2013-02 and later) know to do that.
common-lispbeing available in
.asdfiles – most importantly including
defsystemform defines a system named
hello-lispthat contains three source files: packages, macros and hello.
.asdfile with the system definition.
:versionnumbers will be parsed! Only period-separated non-negative integers are accepted. See below Version specifiers in The defsystem grammar.