Build Tools

From RAD Studio
Jump to: navigation, search

Go Up to Tools Menu


Tools > Build Tools

Use the Build Tools dialog box to define external programs to be executed during a compile or from the Project Manager.

To associate a custom build tool with a specific file, see Adding a Custom Build Tool.

Note: You cannot associate a custom build tool with a .pas file (these files are handled only by the Delphi compiler).
Item Description

Tools

Lists the existing build tools that you have created, if any. Click New to add a new build tool. The initial name for the tool is CustomTool<n>. To change the name of a selected build tool, use the Name field.

Name

Enter the name you want to use for the build tool.

Description

Enter an optional description of the build tool.

Command(s)

Enter the command or commands that the build tool is to execute.

To enter several commands, write one command per line.

Output File(s)

(Optional) Output file of your custom build tool.

If specified, this output file is used for dependency checking.

Macros

Lists the macros that you can use in the command line. For example, $(INPUTFILENAME) expands to a file name with extension. Macros are expanded when the tool is executed during the build.

Example

Suppose you enter the following custom tool command in the Command(s) field:

midl.exe $(InputFileName) /cstub $(InputFileName).c

This command runs the Microsoft IDL compiler using the macro $(InputFileName), which expands to the full path to the file in the project that is associated with this custom tool. The output is a file with the same name but with a .c file extension.

Enter in the Output File(s) edit box:

$(InputFileName).c

$(InputFileName) expands to the file name without the extension. This ensures that the command is run only when the output file is out of date with respect to the input file.

See Also