TOC PREV NEXT INDEX DOC LIST MASTER INDEX




More on Customizing Build Policies

Build Management customization is described in the C++ Compiler Reference.

Build Policy Implementation

The build policy for a view defines the actions that occur when a build operation is applied to the view as a whole. The build policy affects the standard build operations, including:

The build policy also effects two queries that are made of views:

In the standard keys, whenever a build operation or query is applied to a view, make is invoked in such a way as to build the target "build-policy.operation-or-query". For example, when the code command is run on a view with build policy library, make will eventually be asked to build the target "library.code".

Each build policy must define targets for all of the standard operations and queries. For example, the build policy library, which causes the view to construct a library from all object files in the view and provide the library as the link contribution of the view, has the following targets which implement the policy.

Customizing Existing Build Policies

The existing build policies may be customized through the use of trigger macros whose values can be set in the customization makefile Policy/Customization.mk. For each of the standard operations (although not for the standard queries), there are two macros:

Creating New Build Policies

Users may also define their own build policies. Customization.mk contains the full set of targets necessary to define the build policy custom_build. Users may define the semantics of the custom_build policy by associating actions with targets. When the custom_build policy has been defined, it will be activated in the view by setting the BUILD_POLICY switch to custom_build.

The custom_build policy (and any other user policy) should make free use of the standard targets defined for other policies. For example, if the code operation for custom_build was to perform the same operation as that for the library policy then one could define the following target:

Additional Topics

For additional information, refer to these topics:


Rational Software Corporation 
http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2001, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX DOC LIST MASTER INDEX TECHNOTES APEX TIPS