Product | Command Type |
|---|---|
ClearCase | data structure |
ClearCase LT | data structure |
Platform |
|---|
UNIX |
Windows |
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.
As separators in the VPATH macro you can use spaces, colons (UNIX), or semicolons (Windows). For more information, see the makefile_ccase reference page.
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 UNIX-like 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.
clearmake provides partial compatibility with Gnu make. This section provides the details.
Supported Gnu Make Command-Line Options-clearmake supports most of the single-character subset of Gnu Make's command-line interface. However, clearmake does not accept any of the long-form spellings for Gnu Make command options.
NOTE: If you need to use the long form spellings, you can write a Perl wrapper that translates the long-form options into short form and invokes clearmake with the short-form options.
clearmake -C gnu supports the following Gnu Make command-line options:
Unsupported Gnu Make Command-Line Options - The following options are not supported:
-C DIR
--directory=DIR
--no-print-directory
--warn-undefined-variables
-h
--help
-t
--touch
-j [JOBS]
--jobs=[JOBS]
-l [LOAD]
--load-average[=LOAD]
--max-load[=LOAD]
-o FILE
--old-file=FILE
--assume-old=FILE
-W FILE
--what-if=FILE
-new-file=FILE
--assume-new=FILE
-S
--no-keep-going
--stop)
-f -
Supported Gnu Make Features - The following features are enabled with -C gnu (see the Gnu Make manual for details):
Conditional makefile interpretation; for example:
ifeq ($(CC),gcc)
$(CC) -o foo $(objects) $(libs_for_gcc)
else
$(CC) -o foo $(objects) $(normal_libs)
endif
Simply expanded variables
y := $(x) bar
in which the RHS is expanded once when the assignment is first scanned
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#foo
test\#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:
${VAR:PATTERN_1=PATTERN_2}
Text-manipulation functions, such as:
$(subst FROM,TO,TEXT)
$(patsubst PATTERN,REPLACEMENT,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 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
COMMANDS
...
Static pattern rules:
TARGETS ...: TARGET-PATTERN: DEP-PATTERNS ...
COMMANDS
...
The automatic variables
$@ $* $< $% $? $^ $+
and their file-name and directory-name variants; for example:
$(@F) $(@D) ...
Multi-line variable definition
define VAR
TEXT
...
endef
Unsupported Gnu Make Features - The following features are not currently supported:
Automatic remaking of any makefiles that are declared as targets (you must explicitly rebuild them)
Controlling sub-makes by explicitly manipulating the MAKEFLAGS variable
The declarations .DELETE_ON_ERROR, .INTERMEDIATE, .SECONDARY
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 the EV 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.
clearmake, clearmake.options, makefile_ccase, omake
|
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |