catcr

Displays configuration record created by clearmake, omake (Windows only), or clearaudit

APPLICABILITY


Product

Command Type

ClearCase


cleartool subcommand


Attache


command


Platform

UNIX


Windows

SYNOPSIS

catcr [ -r·ecurse | -fla·t | -uni·on | -che·ck [ -uni·on ] | -mak·efile ]

[ -sel·ect do-leaf-pattern ] [ -ci ] [ -typ·e { f | d | l } ... ]
[ -ele·ment_only ] [ -vie·w_only ] [ -cri·tical_only ] [ -nam·e tail-pattern ]
[ -zer·o ] [ -wd ] [ -nxn·ame ] [ -fol·low ] [ -l·ong | -s·hort ] do-pname ...
catcr -scr·ipts_only [ -rec·urse ] [ -l·ong | -s·hort ] do-pname ...

DESCRIPTION

The catcr command displays the configuration records (CRs) for the specified derived objects (DOs) and, optionally, for their build dependencies. The ClearCase make tool (clearmake, or omake for Windows) creates a CR each time it executes a build script that creates one or more DOs. You can also list the configuration record header and build scripts only.

NOTE: ClearCase creates configuration records for dynamic views only.

For more information about configuration records and derived objects, see Building Software.

RESTRICTIONS

None.

OPTIONS AND ARGUMENTS

REPORTING ON DERIVED-OBJECT SUBTARGETS.  Default: catcr lists the derived-object subtargets used to build do-pname, but it does not examine or display subtarget CRs. The -recurse, -flat, -union, -check, and -makefile options direct catcr to recurse into subtarget CRs. Use -select to isolate the CRs of one or more subtargets; use -ci to examine the CRs of pre-built, checked-in DO versions.

-r·ecurse

Displays the CRs of any derived objects that are subtargets of do-pname. Each CR is displayed separately.
-fla·t

Similar to -recurse, but consolidates the CRs into a single list of versions and derived objects, with no duplicate entries. -flat produces one report for each do-pname on the command line. The report includes file-system objects only; no headers, variables and options, or build scripts. A number preceding each filename indicates the total number of times it was referenced during the build.
-uni·on

Produces one report for all derived objects on the command line. Like -flat, it consolidates the CRs of each do-pname and its subtargets into a single list of objects, with no duplicate entries. It then combines the separate lists into a single report with no duplicates. The report includes file-system objects only-no headers, variables and options, or build scripts are included.
-che·ck [ -uni·on ]

Flags entries in the CR that have unusual characteristics, including references to view-private files (but not references to view-private directories).
You can use -check with -union. This combination determines whether a CR contains any of the following:

  • Versions that are not currently checked in. This includes versions that no longer exist (an intermediate version that only existed as a view-private file, for example), versions that are currently checked out, and versions that were explicitly removed with the rmver command.
  • Multiple versions of the same element. This can occur, for example, if a build used multiple libraries, which were built from different source versions.
  • Multiple references to the same element with different names, such as a renamed element in different directory versions.
-mak·efile

Similar to -recurse, but displays the CR in simple makefile format. The listing includes the dependencies and build script for each of the derived object's subtargets. Always include the -wd option with -makefile; this causes catcr to list pathnames with respect to the initial working directory of the build. (Note that this differs from the standard behavior of -wd). If you fail to include -wd, cleartool displays a warning message, and then displays the makefile without modifying dependency pathnames.
-sel·ect do-leaf-pattern

Starts the listing at the subtarget of do-pname that match the specified pattern. do-leaf-pattern can be a pattern (see the wildcards_ccase (ClearCase) or wildcards (Attache) reference page) that matches a simple file-name; it must not include a slash character (/\) or the ellipsis wildcard ( ... ). Alternatively, it can be a standard pathname of a derived object.
This option is useful for isolating a derived object that was built as a dependency of another one. For example, this command displays the CR of the derived object named hello.obj that was used to build hello.exe in the current view:
cmd-context catcr -select hello.obj hello.exe
-ci (for use in recursive listings only)

By default, recursive listings do not display CRs for DO versions. This option displays the CRs for DO versions. -ci only has effect with -recurse, -flat, -union, and -makefile.

SPECIFYING KINDS OF OBJECTS TO DISPLAY.  Default: catcr reports on all objects in the CR, which may include source files, directories, and symbolic links; derived objects; makefiles; view-private files; and non-MVFS objects that were explicitly declared as dependencies.

-typ·e { f | d | l } ...

Restricts the listing to files only (f), or to directories only (d), or to links only (l). If you omit -type, a -short listing includes files only and a -long listing includes all three kinds. To specify multiple kinds of objects, group them into a single argument: -type fd.
-ele·ment_only

Lists versions of elements only, including checked-out versions. This option excludes from the listing derived objects (except DO versions), view-private files and directories, symbolic links, and non-MVFS objects.
NOTE: If a view-private file listed in the CR is converted to an element after the creation of the CR, and has at least one checked-in version, it is considered to be an element and is listed by -element_only.
-vie·w_only

Lists view-private objects only, including checked-out versions of elements. If you specify this option along with -element_only, the listing includes only checked-out versions of elements.
-cri·tical_only

Excludes from the listing any objects marked as "noncritical" in the CR. Objects with that property typically have it because the user specified the objects as dependents of the .NO_DO_FOR_SIBLING special target in a clearmake makefile or an omake makefile.
-nam·e tail-pattern

Restricts the MVFS objects listing to those whose final pathname component match the specified pattern. tail-pattern can include any of the wildcard characters described in the wildcards_ccase (ClearCase) or wildcards (Attache) reference page.
-scr·ipts_only

Restricts the listing to the configuration record header and build script.

CONTROLLING REPORT APPEARANCE.  Default: catcr reports, in three sections, on MVFS objects, variables and options, and the build script. The report uses full pathnames, and it omits comments and directory versions.

-zer·o

Includes the CR header and options section, even if the specified filters remove all objects. The listing includes the target name, current view, and so on, but no information on particular file-system objects.
-wd

Lists pathnames relative to the current working directory, rather than full pathnames. With -makefile, displays pathnames relative to the initial working directory of the build.
-nxn·ame

Lists simple pathnames for MVFS objects, rather than version-extended pathnames or DO-IDs.
-fol·low

Lists the link targets only (that is, suppresses printing of the link text).
-l·ong

Expands the listing to include the kinds of objects in the CR and comments. With -makefile, adds comments only. For example, an object may be listed as a version, a directory version, or derived object. (See ls -long for a complete list.) Comments indicate whether an object is in a makefile, a referenced derived object, or a new derived object.
-s·hort

Restricts the listing to file-system objects only (omits header information, variables and options, and build scripts). With -makefile, the listing also includes build scripts.

SPECIFYING THE DERIVED OBJECT.  Default: None.

do-pname ...

One or more pathnames, specifying the derived objects whose CRs are to be included in the listing. A standard or view-extended pathname specifies the DO in the view. An extended pathname with a DO-ID specifies a particular DO, irrespective of view (for example, hello.obj@@24-Mar.11:32.412).
Use the lsdo command to list derived objects with their DO-IDs.
do-pname can be a DO version, specified with any version-specification method (standard pathname, version-extended pathname, and so on).

EXAMPLES

The UNIX examples in this section are written for use in csh. If you use another shell, you may need to use different quoting and escaping conventions.

The Windows examples that include wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you may need to change the wildcards and quoting to make your command interpreter process the command appropriately.

In cleartool single-command mode, cmd-context represents the UNIX shell or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt. In Attache, cmd-context represents the workspace prompt.

NOTE: Most examples show the same CR processed with different options. Some output lines have been split for clarity.

SEE ALSO

clearaudit, clearmake, config_spec, diffcr, ls, lsdo, rmdo, wildcards, wildcards_ccase, Building Software