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.
clearmake accepts either slashes ( / ) or backslashes ( \ ) in path names. However, clearmake uses a backslash as the separator in any path names 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 path names 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 path names. 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.
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.
clearmake –C gnu supports most of the single-character and long-form spellings of GNU make command options, as follows:
The following features are enabled with –C gnu (see the GNU make documentation):
ifeq ($(CC),gcc)
$(CC) -o foo $(objects) $(libs_for_gcc)
else
$(CC) -o foo $(objects) $(normal_libs)
endif
$(if condition, then-part [,else-part])
$(or condition1[,condition2[,condition3...]])
$(and condition1[,condition2[,condition3...]])
targets : normal-prerequisites | order-only-prerequisites
target1 : dir1/prereq1 | dir2/prereq1
$(call variable,parameter,parameter,...)
Var1 = Val1
Macro1 = $(1) $(2)
Macro2= $(call macro1, $(Var1),$(Macro2)) macro “Macro2”
test: test#footest\#foo:
echo $@test: test#footest\#foo:
echo $@
$(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)
$(value variable)
$(warning text)
$(error text)
$(eval argument)
Also, their file name and directory-name variants. For example:
target ... : variable-assignment
or
target ... : override variable-assignment
Expands to a list of the names of all global variables defined so far. This includes variables which have empty values, as well as built-in variables, but does not include any variables which are only defined in a target-specific context. Note that any value you assign to this variable will be ignored; it will always return its special value.
Defines the naming of the libraries that to be searched for, and their order.
Refer to GNU make documentation for information about MAKEOVERRIDES.
The following features are not supported: