The role of mkmerge is to link the source files and the component's build directory. For further information, see the mkmerge(1CC) man page.
The code for ChorusOS components containing family-specific code is organized in projected trees. Within the projected trees, there are sub-trees for:
common code
code that is related to specific families or CPU
Before generation begins, subtrees are merged into a merged tree. There is only one merged tree in each merged component. Initially, it contains symbolic, or hard, links that point to files in the projected trees. The build takes place in the merged tree, so the projected trees remain free of generated files, such as object files and Makefiles. You can delete a merged tree at any time. This will not affect the source code, as it remains clean in the projected trees.
Different merged trees can be built from a given set of subtrees of the projected trees. This allows you to produce several system configurations concurrently.
Building the merged tree is called the merge operation. When performing this operation, you provide a number of first-level options, called generation options. These options correspond to fundamental production choices, such as the choice of a development system or the target family and are typically found in the build profile.
On systems running the Solaris operating environment, mkmerge populates the merge directory with symbolic links. These links point to the source directories required for your build.
Source directories within the projected tree can be populated with special files, named merge.rf (for merge rule files), which provide a number of directives for mkmerge, for example:
Preventing merging source files depending upon flags specified in the profile file
Exporting source.h files to other directories
Pruning the merge of the source tree, depending on the flags.
During a merge, directories are examined recursively and merge.rf files are analyzed. If no problems are encountered, the real merge begins: directories, links and files are created as specified in the various merge.rf files found.
A merge.rf file is composed of lines that are evaluated one at a time. A status is associated with this file. This status evolves as the file is analyzed. Depending on its value at the end of the merge.rf file, the current directory will be merged or cut.
A merge.rf file can contain commands to describe how the current directory should be merged, where it will go, and when it will be merged. The MKMERGE_IGNORE environment variable can be used to specify a list of file suffixes that should be ignored during the merge process.
For more information about merge.rf, see the mkmerge(1CC) man page.