IPnom Home • Manuals • ClearCase

 Rational ClearCase Commands Reference

ClearCase Stuff:ClearCase LinksClearCase BooksClearCase Commands ReferenceClearCase ForumsClearCase News
Keyword Live Search (10 results max):
 Type in part of a ClearCase command in the search box.
Commands Index:


clearmake compatibility with GNU make


ProductCommand type
ClearCasedata structure
ClearCase LTdata structure



clearmake –C gnu


Note: The distinctive features of clearmake, such as build auditing, derived object sharing, and build avoidance, are supported in dynamic views only. In addition, while parallel building is supported in ClearCase snapshot views, it is not supported in ClearCase LT.

The clearmake program has been designed for compatibility with existing make programs, minimizing the work necessary to switch to clearmake. There are many independently evolving variants of make, which provide different sets of extended features. clearmake does not support all features of all variants, and absolute compatibility is not guaranteed. If your makefiles use only the common extensions, they will probably work with clearmake.

Note: When building with configuration records, clearmake handles double-colon rules differently from other make programs. For details, see Building Software.

VPATH Separator Character

As separators in the VPATH macro you can use spaces, colons (UNIX), or semicolons (Windows). For more information, see the makefile_ccase reference page.

Windows—Using UNIX-Style Command Shells in Your Makefile

clearmake accepts either slashes ( / ) or backslashes ( \ ) in pathnames. However, clearmake uses a backslash as the separator in any pathnames that it constructs in build scripts (for example, as a result of VPATH directory searching). This can cause problems with command shells that require slashes in any pathnames supplied to them in command lines.

If you are using such a shell (for example, by setting the SHELL makefile variable accordingly), you can force clearmake to use slashes when constructing pathnames. To do this, set the CMAKE_PNAME_SEP environment variable:


You can set CMAKE_PNAME_SEP in the makefile, in the BOS file, on the command line, or as an environment variable.

Windows—Overriding the Escape Character

To override the escape character (\), set CCASE_NO_ESC_PATT_CHARS. When this environment variable is set, the character that follows \ is not treated literally (see env_ccase).


clearmake provides partial compatibility with GNU make. This section provides the details.

Supported GNU make Command Options

clearmake –C gnu supports most of the single-character and long-form spellings of GNU make command options, as follows:

Disables GNU's built-in rules (equivalent to gnumake –R).

– –directory=dir
Change to the specified directory before reading the makefiles.

–d – –debug
Prints debugging information in addition to normal processing messages.

–e – –environment-override
Gives variables taken from the environment precedence over variables from makefiles.

–f file – –file=file – –makefile=file
Reads file as a makefile.

–I dir
Specifies a directory dir to search for included makefiles.

–i – –ignore-errors
Ignores all errors in commands executed to remake files.

– –include-dir=dir
Specifies a directory in which to search for included makefiles.

–k – –keep-going
Continues as much as possible after an error.

– –no-builtin-variables
Eliminate use of built-in, rule-specific variables.

– –-no-print-directory
Disables printing of the working directory under –w.

–n – –just-print – –dry-run – –-recon
Prints the commands that would be executed, but does not execute them.

–p – –print-data-base
Prints the database (rules and variable values) that results from reading the makefiles, then executes as usual or as otherwise specified.

–q – –question
Question mode. Does not run any commands or print anything. Returns an exit status of 0 if the specified targets are already up to date, or 1 if any remaking is required.

–r – –no-builtin-rules
Eliminates use of the built-in implicit rules.

–s – –silent – –quiet
Silent operation. Does not print the commands as they are executed.

– –warn-undefined-variables
Issues a warning whenever a reference to an undefined variable is found. Null warnings for VPATH and SHELL are suppressed by default; null warnings for these can be displayed using the clearmake options –v or –d.

–w – –print-directory
Prints a message containing the working directory both before and after executing the makefile.

Unsupported GNU make Command-Line Options

The following options are not supported:

  • -m
  • -C dir
  • -h --help
  • -I dir
  • -j [jobs] --jobs[=jobs]
  • -l [load] --load-average[=load] --max-load[=load]
  • -o file --old-file=file --assume-old=file
  • -R (this is supported as –b)
  • -S --no-keep-going --stop
  • -t --touch
  • -v --version
  • -W file --what-if=file --new-file=file --assume-new=file
Supported GNU make Features

The following features are enabled with –C gnu (see the GNU make documentation):

  • Conditional makefile interpretation. For example:

    ifeq ($(CC),gcc)
            $(CC) -o foo $(objects) $(libs_for_gcc)
            $(CC) -o foo $(objects) $(normal_libs)

  • Simply expanded variables in which the RHS is expanded once when the assignment is first scanned. For example:

    y := $(x) bar

  • The += syntax to append to the value of a variable.
  • The ?= macro operator.
  • The use of $$ in target names as an equivalent to a literal $.
  • Special characters ()<>;!=&|$#:”{}\ (UNIX) or ()<>;!=&|$#:” (Windows) within macro names
  • Escaping special characters in target names by preceding them with a \. Note that the escaping must be consistent within the makefile. For example,

    test: test#footest\#foo:
    echo $@test: test#footest\#foo:
    echo $@

    generates a Don't know how to make error.

  • Stripping leading sequences of ./ (UNIX) or .\ (Windows) from file names, so that (for example) .\file and file are considered the same target
  • Variable references using pattern substitution:


  • Text-manipulation functions:

    $(subst FROM,TO,TEXT)
    $(strip STRING)
    $(findstring FIND,IN)
    $(filter PATTERN...,TEXT)
    $(filter-out PATTERN...,TEXT)
    $(sort LIST)
    $(dir NAMES...)
    $(notdir NAMES...)
    $(suffix NAMES...)
    $(basename NAMES...)
    $(addsuffix SUFFIX,NAMES...)
    $(addprefix PREFIX,NAMES...)
    $(join LIST1,LIST2)
    $(word N,TEXT)
    $(words TEXT)
    $(wordlist START, END, TEXT) 
    $(firstword NAMES...)
    $(wildcard PATTERN)
    $(foreach VAR,LIST,TEXT)
    $(origin VARIABLE)
    $(shell COMMAND)

  • The VPATH variable for specifying a search path for every dependency.

    Note: clearmake searches only in the current view. For more information, see the makefile_ccase reference page.

  • The MAKECMDGOALS variable for specifying the targets given on the command line.
  • The vpath statement for specifying a search path for a specified class of names.
  • The export statement.
  • The unexport directive.
  • The .PHONY target declaration.
  • All of GNU make's built-in implicit rules.
  • Pattern rules. For example:

    %.o : %.c

  • Static pattern rules:


  • The automatic variables:

    $@  $*  $<  $%  $?  $^  $+ 

    Also, their file-name and directory-name variants. For example:

    $(@F)  $(@D)  ...

  • Multiline variable definition:

    define VAR

  • Target-specific variable values:

    target ... : variable-assignment


    target ... : override variable-assignment

Unsupported GNU make Features

The following features are not supported:

  • Automatic remaking of any makefiles that are declared as targets (you must explicitly rebuild them).
  • Automatic makefile regeneration and restart if the makefile and included makefile fragments are targets in the makefile itself.
  • Automatic deletion of intermediate results of a chain of implicit-rules.
  • Special search method for library dependencies written in the form -lNAME. For each directory on the VPATH/vpath list, GNU make searches in DIR/lib .
  • When MAKEFILES is defined, GNU make considers its value as a list of names of additional makefiles to be read before the others, as though they were implicitly included.
  • The following functions:
    • $(error ...)
    • $(warning ...)
    • $(call ...)
    • $(if ...)



ClearCase Links • ClearCase Books • ClearCase Commands Reference • ClearCase Forums • ClearCase News