Note: There is a one-to-one relationship between each object in the TC_OUTPUT list and this list of types (TCPart, for example).

TC_WORKAREA

The name of the work area in which the build is being performed.

You can de®ne other variables. These can be set when you start the build by specifying a value for parameters in the part -build command (from the command line or through the GUI). These variables are set in the parameters string passed to the build script.

These variables are also used to set environment variables before the build script is invoked.

As attributes of a part in the build tree

Parameters that are unique to a particular part are speci®ed on the part -create and part -modify commands. Like the builder parameters, these parameters allow variable substitution.

When parameters are speci®ed for a part, these parameters are usedin place of the parameters speci®ed for the builder. In other words, if both builder and part parameters are speci®ed, the part parameters take precedence.

In addition, whenever parameters are speci®ed forany part that is an output of a build event, they apply to all the outputs of that build event. For example, if a build event has two outputs, msg.exe and msg.map, then changing the part parameters to ²/Debug² for either of the two parts has the same result. The next time the build event is processed, the ²/Debug² parameter is used when invoking the build script that produces both msg.exe and msg.map.

You can also substitute the builder parameters into the ®le parameters by using the variable $(BUILDERPARMS). For example, you might use the following command:

teamc part -build myfile.c -parameters "/Ti+ $(TC_BUILDERPARMS)" ...

At build time, the parameters speci®ed in the builder for my®le.c are substituted for $(TC_BUILDERPARMS).

As parameters of the part -build command

The part -build command parameters are not used the same way as the other two parameters. Instead, these parameters are used to set the values of environment variables that can be used for substitution into either the builder or part parameters. They are also set in the environment so they can be retrieved by the build script. In other words, they set up the environment used by the builder.

For example, if you issue a part -build command for msg.exe, you can specify -parameters DEBUG=YES and, inside of both the compile and link build scripts,

retrieve the value of this variable from the environment, setting compiler or linker ¯ags accordingly.

152User's Guide

Page 172
Image 172
IBM SC34-4499-03 manual As attributes of a part in the build tree, As parameters of the part -build command