In this document, Roots refer to several different filesystem directories that are
used when building Darwin projects. The Build Root is the directory that is the
filesystem root for the current build environment. This will either be the actual
root directory (/) or another directory which contains a full build environment and
has been set to the root directory using
chroot.
The first four arguments following "install" in the example build command above
specify the filesystem path of the four Roots: SRCROOT, OBJROOT, SYMROOT, and DSTROOT.
These Roots represent absolute paths to four different directories that will be used
while building the project. SRCROOT gives the location of the sources to be built,
OBJROOT gives the location for intermediate files created during the build (.o's),
SYMROOT gives the location for debug symboled output files, and DSTROOT gives the
location for the finished product. With the exception of SRCROOT, all of these directories
should be empty before the build begins, and should be owned by root:wheel.
After the build is complete, the OBJROOT is no longer needed and may be deleted.
In order to install the newly built project, the contents of the DSTROOT may be copied to
the root filesystem (/). Many, but not all, Darwin projects are compatible with a full
Mac OS X system, so exercise caution and be prepared to undo your changes.
Important note: because Apple never uses paths with spaces during the build,
some Darwin projects may not build correctly if spaces are used in one of these paths.
This may lead to files being written to arbitrary locations on the disk, and could
lead to loss of data. Never use spaces in the Roots' paths.
When Apple builds Mac OS X, paths of the following form are used for the Roots:
SRCROOT=/SourceCache/project/project-version
OBJROOT=/private/var/tmp/project/project-version.obj~1
SYMROOT=/private/var/tmp/project/project-version.sym~1
DSTROOT=/private/var/tmp/project/project-version.root~1