clearmake build options specification (BOS) file
Product | Command Type |
---|---|
ClearCase | data structure |
ClearCase LT | data structure |
Platform |
---|
UNIX |
Windows |
One or more files read by clearmake, specifying make macros and special targets
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.
A build options specification (BOS) file is a text file containing macro definitions and/or ClearCase special targets. We recommend that you place temporary macros (such as CFLAGS=-g (UNIX) or CFLAGS=/Zi (Windows) and others not to be included in a makefile permanently) in a BOS file, rather than specifying them on the clearmake command line.
By default, clearmake reads BOS files in this order:
The default BOS files:
The file .clearmake.options in your home directory (as indicated in the password database (UNIX) or by the HOME environment variable or in the user profile (Windows). This is the place for macros to be used every time you execute clearmake.
One or more local BOS files, each of which corresponds to one of the makefiles specified with a -f option, or read automatically by clearmake. Each BOS file has a name in the form makefile-name.options. For example:
makefile.options |
Makefile.options |
project.mk.options |
BOS files in the CCASE_OPTS_SPECS environment variable.
BOS files specified on the command line with -A.
If you specify -N, clearmake does not read default BOS files.
clearmake displays the names of the BOS files it reads if you specify the -v or -d option, or if CCASE_VERBOSITY is set to 1.
The following sections describe the various kinds of BOS file entries.
A standard macro definition has the same form as a make macro defined in a makefile:
macro_name = string
CDEBUGFLAGS = -g (UNIX)
CDEBUGFLAGS = /Zi (Windows)
A target-dependent macro definition takes this form:
target-list := macro_name = string
Any standard macro definition can follow the := operator; the definition takes effect only when targets in target-list and their dependencies are processed. Targets in the target-list must be separated by white space. For example:
foo.o bar.o := CDEBUGFLAGS=-g (UNIX)
foo.o bar.o := CDEBUGFLAGS=/Zi (Windows)
Two or more higher-level targets can have a common dependency. If the targets have different target-dependent macro definitions, the dependency is built using the macros for the first higher-level target clearmake considered building (whether or not it actually built it).
A shell command macro definition replaces a macro name with the output of a shell command:
macro_name :sh = string
This defines the value of macro_name to be the output of string, an arbitrary shell command. In command output, <NL> characters are replaced by <SPACE> characters. For example:
BUILD_DATE :sh = date (UNIX)
NT_VER :sh = VER (Windows)
NOTE: This syntax does not work in makefiles when you are using default compatibility mode.
You can use the following ClearCase special targets in a build options spec:
.DEPENDENCY_IGNORED_FOR_REUSE
.INCREMENTAL_REPOSITORY_SIBLING
.INCREMENTAL_TARGET
.NO_CMP_NON_MF_DEPS
.NO_CMP_SCRIPT
.NO_CONFIG_REC
.NO_DO_FOR_SIBLING
.NO_WINK_IN
.SIBLING_IGNORED_FOR_REUSE
.SIBLINGS_AFFECT_REUSE
On UNIX only, you can also use:
.NOTPARALLEL
See the makefile_ccase reference page for descriptions of these targets.
To include one BOS file in another, use the include or sinclude (silent include) directive. For example, on UNIX:
include /usr/local/lib/ux.options
sinclude $(OPTS_DIR)/clearmake.options
include \lib\aux.options
sinclude $(OPTS_DIR)\clearmake.options
A BOS file can contain comment lines, which begin with a pound sign (#) character.
By default, the order of precedence of macros and environment variables is as follows:
Target-dependent macro definitions
Macros specified on the clearmake command line
Make macros set in a BOS file
Make macro definitions in a makefile
Environment variables
For example, target-dependent macro definitions override all other macro definitions, and macros specified on the clearmake command line override those set in a BOS file .
If you use the -e option to clearmake, environment variables override macro definitions in the makefile.
All BOS file macros (except those overridden on the command line) are placed in the build script's environment. If a build script recursively invokes clearmake:
The higher-level BOS file setting (now transformed into an EV) is overridden by a make macro set in the lower-level makefile. However, if the recursive invocation uses clearmake's -e option, the BOS file setting prevails.
If another BOS file (associated with another makefile) is read at the lower level, its make macros override those from the higher-level BOS file.
clearmake, env_ccase, makefile_ccase
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |