A system is defined with a
defsystem form in an ordinary Lisp source file. This form must be evaluated in the Lisp image in order to use the system.
Once defined, operations can be carried out on the system by invoking Lisp functions.
For example, the expression:
CL-USER 5 > (compile-system 'debug-app :force t)
would compile every file in a system called
Note: When defining a hierarchy of systems, the leaf systems must be defined first - that is, a system must be defined before any systems that include it.
By convention, system definitions are placed in a file called
defsys.lisp which usually resides in the same directory as the members of the system.
This system compiles and loads members in the
USER package if the members themselves do not specify packages. The system contains three members -
demo-functions - which may themselves be either files or other systems. There is only one explicit rule in the example. If
macros needs to be compiled (for instance, if it has been changed), then this causes
demo-functions to be compiled as well, irrespective of whether they have themselves changed. In order for them to be compiled, macros must first be loaded.
Implicitly, it is always the case that if any member changes, it needs to be compiled when you compile the system. The explicit rule above means that if the changed member happens to be
member gets compiled. If the changed member is not
macros must at least be loaded before compiling takes place.
(:caused-by (:compile "b"))
causes the instruction compile c to be added to the plan. The compilation of
c.lisp also requires that
a.lisp is loaded, so the instruction load a is added to the plan first. This gives us the following plan:
LispWorks IDE User Guide (Unix version) - 12 Feb 2015