ASDF Systems
ASDF finds systems in ~/common-lisp/, ~/.local/share/common-lisp/source/, Quicklisp's local-projects/, or directories registered in asdf:*central-registry* / source-registry configuration.
UIOP (shipped with ASDF) provides portable utilities: files, pathnames, run-program, environment variables, and command-line arguments.
;;;; inventory.asd
(defsystem "inventory"
:description "A small inventory manager"
:version "0.1.0"
:author "Your Name <you@example.com>"
:license "MIT"
:depends-on ("alexandria" "cl-ppcre")
:serial t ; load components in order
:components ((:file "package")
(:module "src"
:components ((:file "items")
(:file "reports" :depends-on ("items")))))
:in-order-to ((test-op (test-op "inventory/tests"))))
(defsystem "inventory/tests"
:depends-on ("inventory" "fiveam")
:components ((:module "tests" :components ((:file "main"))))
:perform (test-op (o c) (symbol-call :fiveam '#:run! :inventory)))
(defsystem "inventory/executable"
:depends-on ("inventory")
:build-operation "program-op"
:build-pathname "bin/inventory"
:entry-point "inventory:main")(asdf:load-system "inventory") ; compile (if needed) and load
(asdf:test-system "inventory") ; run tests
(asdf:make "inventory/executable") ; build an executable
(ql:quickload "inventory") ; also fetches dependencies via Quicklisp