2.2 Configuration Records

A configuration record (CR) is the bill of materials for a derived object or set of DOs. The CR documents aspects of the build environment, the assembly procedure for a DO, and all the files involved in the creation of the DO.

Configuration Record Example

The catcr command displays the configuration record of a specified DO. Figure 3 shows a CR, with annotations to indicate the various kinds of information in the listing.

Figure 3 Kinds of Information in a Configuration Record

Some notes on Figure 3:

Contents of a Configuration Record

The following sections describe the contents of configuration records.

Header Section

As displayed by catcr, the header section of a CR includes the following lines:

MVFS Objects Section

An MVFS object is a file or directory in a VOB. The MVFS Objects section of a CR includes this information:

Non-MVFS Objects Section

A non-MVFS object is an object not accessed through a VOB (compiler, system-supplied header file, temporary file, and so on). The Non-MVFS Objects section of a CR includes each non-MVFS file that appears as an explicit dependency in the makefile or is a dependency inferred from a suffix rule. See Declaring Source Dependencies in Makefiles.

This section is omitted if there are no such files or if the CR was produced by clearaudit.

Variables and Options Section

The Variables and Options section of a CR lists the values of make macros referenced by the build script and command-line options.

This section is omitted from a CR produced by clearaudit.

Build Script Section

The Build Script section of a CR lists the script that was read from a makefile and executed by clearmake or omake.

This section is omitted from a CR produced by clearaudit.

Configuration Record Hierarchies

A typical makefile has a hierarchical structure. Thus, running clearmake or omake once to build a high-level target can cause multiple build scripts to be executed and multiple CRs to be created. Such a set of CRs can form a configuration record hierarchy, which reflects the structure of the makefile (Figure 4).

Figure 4 Configuration Record Hierarchy

An individual parent/child link in a CR hierarchy is established in one of two ways:

The catcr and diffcr commands have options for handling CR hierarchies:

Some ClearCase features process entire CR hierarchies automatically. For example, when the mklabel command attaches version labels to all versions used to build a particular derived object (mklabel -config), it uses the entire CR hierarchy of the specified DO. Similarly, ClearCase maintenance procedures do not scrub the CR associated with a deleted DO if it is a member of the CR hierarchy of a higher-level DO.

Configuration Record Cache

When a derived object is created in a view, both its data container and its associated configuration record are stored in the view's private storage area. The CR is stored in the view database, in compressed format. To speed configuration lookup during subsequent builds in this view, a compressed copy of the CR is also cached in a view-private file, .cmake.state, located in the directory that was current when the build started.

When a DO is winked in for the first time, the associated CR moves from the view's private storage area to the VOB database, as shown in Figure 5.