NextPrevUpTopContentsIndex

compile-system

Function
Summary

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

Package

lispworks

Signature

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

Arguments

system-name

A symbol representing the name of the system. The system must have been defined already using the defsystem macro.

force

If t 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.)

simulate

If nil or not present 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 :

t -- do nothing.

:ask -- you are asked if you wish the plan to be carried out using y-or-n-p .

:each -- 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, returns from compile-system without further processing, and y and n work as expected.

:simulate may be abbreviated as :sim .

load

If 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

Arguments to be passed directly to the compiler.

target-directory

This must be a string 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 the target-directory is given then dependency information expressed in the system rules is ignored. :target-directory may be abbreviated as :t-dir .

Values

compile-system returns nil .

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

If the :load keyword is set to t then by default load-system is called after compile-system . This behavior can be changed to loading any file immediately after it is compiled by setting the variable defsystem::*load-when-compile* to non- nil .

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 foo.so on Linux, and on Unix it is foo n .o where n is a platform-specific integer. On Mac OS X the object file name is foo.dylib and on Windows the object file name is foo.dll .

See also

concatenate-system
defsystem
load-system


LispWorks Reference Manual - 23 Jul 2004

NextPrevUpTopContentsIndex