All Manuals > LispWorks® User Guide and Reference Manual > 38 The LISPWORKS Package

compile-system Function


Compiles all the files in a system necessary to make a consistent set of object files.




compile-system system-name &key force simulate load args target-directory

A symbol or string.
A generalized boolean.
One of nil, t, :ask or :each.
One of nil, t or :no.
Arguments to be passed directly to the compiler.
A pathname designator or nil.

The function compile-system compiles all the files in a system necessary to make a consistent set of object files.

system-name must be a symbol or string representing the name of the system. The system must have been defined already using the defsystem macro.

If force is non-nil then all the files in the system are compiled regardless. (This argument was formerly called force-p. The old name is currently still accepted for compatibility.). Otherwise only files that need it are compiled.

If simulate is nil (the default) then compile-system works silently. Otherwise a plan of the actions which compile-system intends to carry out is printed. What happens next depends on the value of simulate:

Do nothing.
You are asked if you wish the plan to be carried out using y-or-n-p.
compile-system displays each action in the plan one at a time, and asks you whether you want to carry out this particular action. The answer c executes the rest of the plan without further prompting, e returns from compile-system without further processing, and y and n work as expected. :simulate may be abbreviated as :sim.

If load is t then load-system is called after compile-system has finished. If :no then no files are loaded at all. The default is nil.

args are are passed directly to compile-file.

If target-directory is non-nil, it must be a pathname designator representing a valid directory. It defaults to the :default-pathname option to defsystem. This is the directory where the object files created are put. If target-directory is supplied then dependency information expressed in the system rules is ignored. :target-directory may be abbreviated as :t-dir.

(compile-system 'blackboard :simulate :ask)
(compile-system 'tms :load t)
(compile-system 'packages :load :no
                 :target-directory "/usr/users/386i/")

If load is t then load-system is called after the system has been compiled.

C source files, for example foo.c, can be included in a system (see the use of :default-type and :type in defsystem). The corresponding object file name is on Linux, FreeBSD and x86/x64 Solaris and foon.dylib on macOS, where n is a platform-specific integer. On Windows the object file name is foo.dll.

See also


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:41