Specifying a Build Command

Related Topics:

Specifying Build Options The dmake Command
Targets Examining Multiple Build Jobs

The default build command for the Sun WorkShopTM programming environment is dmake (see Building With Default Values). You can specify your own command for building your program in the Define New or Edit Target Dialog Boxes.

To specify a build command:

1. Choose Build Edit Target.

2. Select a target from the WorkShop target list.

The Edit Target dialog box opens.

3. Type the name of the command.

If the build command is other than make or dmake, include arguments to the command in the Command text box. If the build command is not in your makefile PATH, specify the full path name to the makefile.

The build command is formed by prepending setenv commands for any environment variables specified through the Environment Variables Dialog Box and by appending any of the make options specified through the Build Options Dialog Box and Make Macros Dialog Box. For example, specifying your own build command allows you to filter out unnecessary warnings by passing make output through a filter.

You can also issue arbitrary UNIX® commands from the Command text box and have the output displayed in the Output display in the Building Window. Be sure the Makefile and Target text boxes have the <Default> value. Check that no macros or make options are set. Sun WorkShop issues the UNIX command in the run directory. When you specify a command in this way, the target in the Sun WorkShop target list shows:

<Default>target in /dir1/dir2:&<Default>makefile

/dir1/dir2 is the directory in which the command runs. The WorkShop target does not show the command used.

4. Click Build to start a build with the settings listed in the dialog box.