You can edit and compile source code by invoking the appropriate utilities from Prism. See the following sections:
Prism provides an interface to the editor of your choice. You can use this editor to edit source code (or anything else).
To call the editor from within Prism:
You can specify which editor Prism is to call by using the Customize utility to set a Prism resource; see " Using the Customize Utility". If this resource has no setting, Prism uses the setting of your EDITOR environment variable. Otherwise, Prism uses a default editor, as listed in the Customize window.
The editor is invoked on the current file, as displayed in the source window. If possible, the editor is also positioned at the current execution point, as seen in the source window; this depends on the editor.
If you issue the edit command from the command window, you can specify a file name or a function name, and the editor will be invoked on the specified file or function.
After the editor has been created, it runs independently. This means that changes you make in the current file are not reflected in the source window. To update the source window, you must recompile and reload the program. You can do this using the Make selection from the Utilities menu, as described below.
Prism provides an interface to the standard Solaris tool make. The make utility lets you automatically recompile and relink a program that is broken up into different source files. See your Solaris documentation for an explanation of make and makefiles.
Create the makefile as you normally would. Within Prism, you can choose the Edit selection from the Utilities menu to bring up a text editor in which you can create the file; see " Editing Source Code".
After you have made changes in your program, you can run make to update the program.
Prism uses the standard Solaris make utility, /usr/ccs/bin/make, unless you specify otherwise. You do this by using the Customize utility to change the setting of a Prism resource; see " Using the Customize Utility".
To run make from the menu bar - From the Utilities menu, choose the Make selection. A window appears; Figure 8-1 is an example.
The window prompts for the names of the makefile, the target file(s), the directory in which the makefile is located, and other arguments to make. If a file is loaded, its name is in the Target box, and the directory in which it is located is in the Directory box; you can change these if you like.
If you leave the Makefile or the Target box empty, make uses a default. See your Solaris documentation for a discussion of these defaults. If you leave the Directory box empty, make looks for the makefile in the directory from which you started Prism.
You can specify any standard make arguments in the Other Args box.
The dialog box also asks if you want to reload after the make. Answering Yes (the default) automatically reloads the newly compiled program into Prism if the make is successful. If you answer No, the program is not reloaded.
To cancel the make while it is in progress, click on the Cancel button. If a make is not in progress, clicking on Cancel closes the window.
The output from make is displayed in the box at the bottom of the Make window. Subsequent makes use the same window, unless you start a new make while a previous make is still in progress.
From the command window - Issue the make command on the command line. You can specify any arguments that are valid in the Solaris version of make.