C H A P T E R 6 |
Editing and Compiling Programs |
This chapter discusses editing and compiling source code while in the Prism environment. It is organized into the following sections:
The Prism environment provides an interface to the editor of your choice so that you can edit source code without having to leave the environment in which you compile and debug the code.
You can specify which editor the Prism environment is to call by using the Customize window to set a Prism resource; see Changing Prism Resource Defaults. If this resource has no setting, Prism uses the setting of your EDITOR environment variable. Otherwise, the Prism environment uses the default editor listed in the Customize window.
The editor is invoked on the current file, as displayed in the source window. Some editors start at the current execution point. Other editors start at the beginning of the file.
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.
The Prism environment 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 the Prism environment, 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.
The Prism environment 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 Changing Prism Resource Defaults.
You can specify any arguments that are valid in the Solaris version of make.
Copyright © 2002, Sun Microsystems, Inc. All rights reserved.