Consider this simple project with a flat directory structure:
example
|-- example.asd
|-- functions.lisp
|-- main.lisp
|-- packages.lisp
`-- tools.lisp
The example.asd
file is really just another Lisp file with little more than an ASDF-specific function call. Assuming your project depends on the drakma
and clsql
systems, its contents can be something like this:
(asdf:defsystem :example :description "a simple example project" :version "1.0" :author "TheAuthor" :depends-on (:clsql :drakma) :components ((:file "packages") (:file "tools" :depends-on ("packages")) (:file "functions" :depends-on ("packages")) (:file "main" :depends-on ("packages" "functions"))))
When you load this Lisp file, you tell ASDF about your :example
system, but you're not loading the system itself yet. That is done either by (asdf:require-system :example)
or (ql:quickload :example)
.
And when you load the system, ASDF will:
clsql
and drakma
packages
first (no dependencies)functions
after packages
(as it only depends on packages
), but before main
(which depends on it)main
after functions
(as it depends on packages
and functions
)tools
anytime after packages
Keep in mind:
.lisp
but this postfix should be dropped in the asdf script.asd
file, and you move (or symlink) its folder into quicklisp/local-projects/
folder, you can then load the project using (ql:quickload "example")
.ASDF:*CENTRAL-REGISTRY
variable) or Quicklisp (either via the QUICKLISP-CLIENT:*LOCAL-PROJECT-DIRECTORIES*
variable or available in any of its dists)