Makefile macros let you refer conveniently to files or command options that appear more than once in the description file. (For information on defining macros, see Appendix B, The make Utility and Makefiles.)
Using the Make Macros dialog box (see Figure 4-5), you can add makefile macros to or delete them from the Persistent Build Macros list in your WorkShop target, and then reassign values for makefile macros in the list. You can also add macros currently defined in the makefile to the list and override their values.
All macros in the Persistent Build Macros list are saved with your WorkSet.
To open the Make Macros dialog box, click Macros in the Edit Target dialog box.
Persistent Build Macros pane |
Lists macros that will be saved with your WorkSet |
More/Less button |
More opens the Filter text box and Makefile Macros list pane; the button toggles to Less, which closes the pane |
<<Add button |
Lets you add a macro in the Makefile Mactros list to the Persistent Build Macros list |
Name text box |
Lets you assign a name to a new macro or change the name of the selected macro on the Persistent Build Macros list |
Value text box |
Lets you assign a value to the macro named in the Name text box |
Add button |
Adds the macro defined in the Name and Value text boxes to the Persistent Build Macros list |
Change button |
Applies the values in the Name and Value text boxes to the selected macro on the Persistent Build Macros list |
Delete button |
Deletes the selected macro on the Persistent Build Macros list |
Delete All button |
Deletes all macros on the Persistent Build Macros list |
Clear button |
Clears the Name and Value text boxes |
Filter text box |
Lets you type a search pattern to filter the Makefile Macros list |
Makefile Macros list |
Lists the macros defined in the makefile in the current WorkSet |
OK button |
Applies the changes and closes the dialog box |
Apply button |
Applies the changes but leaves the dialog box open |
Cancel button |
Closes the dialog box without applying changes |
Help button |
Displays online help for the dialog box |
To add a macro to the Persistent Build Macros list:
Type the name of a macro in the Name text box.
Type a value for the macro in the Value text box.
If you make a mistake, click Clear to remove entries in the Name and Value text boxes.
Click Add to add the new macro to the list.
Repeat the previous three steps to add other macros.
Click OK to close the dialog box.
To delete a macro from the Persistent Build Macros list:
Select a macro in the list.
Click Delete (Delete All removes all macros in the list).
Click OK to establish the change and close the dialog box.
To change the value of a macro in the Persistent Build Macros list::
Select a macro in the list.
Type a new value in the Value text box and click Change.
Click OK to establish the change and close the dialog box.
Click Build in the Edit Target dialog box to start the build with the new values.
A macro definition that appears in the Persistent Build Macros list overrides any macro with the same name that appears in the makefile.
To review the current macro definitions, click More to open the Makefile Macros list, which displays all the macros that are defined in the makefile associated with the build target. You can filter the list using the Filter text box.
To override the value of a makefile macro:
Select a macro in the Makefile Macros list.
Click <<Add to add the macro to the Persistent Build Macros list.
Type a new value in the Value text box and click Change.
Click OK to establish the change and close the dialog box.
The macro definition in the Persistent Build Macros list overrides the macro definition in the makefile, and is saved with your WorkSet.
Click Build in the Edit Target dialog box to start the build with the new values.