Previous: Valid vimake Commands Up: vimake Next: Using the Generated Unix Makefile

Using the Generated VMS Build File

The generated VMS build file is quite powerful. This section describes the options you can use to control the build process.

The build files will look different depending on whether you are building a PROGRAM, SUBROUTINE, or PROCEDURE, and what languages you use. All options are described below. Some may not apply, depending on what you are building.

The build file is executed via the standard `` @'' command. The build file can have three arguments. The first is the primary option, the second is the secondary option list, and the third is a module list. All three parameters are optional. In the lists below, the capitalized letters are required (although they may be in lower case on the command line), and the lower case letters are optional. So, most options can be abbreviated.

The primary options are:

The default primary option is STD, which may be omitted. If so, then the secondary option list becomes the first argument to the BLD file, and the module list becomes the second argument.

The secondary option list is a list of options, separated by commas and with no blanks, that modify how the primary options are performed. They are associated with a primary option, so the corresponding primary must be given for the secondary to take effect (unless the primary is the default STD).

Note that some primaries, such as STD, ALL, and SYStem, are actually a combination of several other primaries. The secondary options apply in these cases as well. So, for example, the secondaries for COMPile and LINK may be given for STD.

There is one secondary that does not need a primary:

The secondary options for the COMPile primary option are:

The secondary options for the LINK primary option are:

The secondary options for the INSTall primary option are:

The secondary options for the CLEAN primary option are:

The secondary options for the DOC primary option are:

The last parameter to the BLD file is the module list. It is a list of modules to compile or clean. Normally, the entire application is built at once, so this is not often used. However, the capability is there to build only some of the code. This is useful if you are modifying one module of a large program. Once everything is compiled, you need only compile the module you are changing. The names given in the module list must match exactly with the names in the MODULE_LIST macro in the imakefile. If you want to give more than one module name, then separate them with spaces and enclose the whole list in double quotes.

Some examples may prove helpful. The first example merely compiles a version of the program into the local directory:


@prog.bld

The next example is the same, except the documentation (if present) is built as well:


@prog.bld all

This example shows building the program for use in the debugger. Note how the secondary option is first because STD was defaulted:


@prog.bld debug

The next example shows recompiling a single module out of a large application, and then relinking it with the debugger. A link map is created. The other modules must have already been compiled:


@prog.bld comp deb module.c
@prog.bld link deb,map

The last example shows shows how to obtain a full compile listing with cross-reference from a pair of modules:


@prog.bld comp listall,listxref "module1.c module2.f"

rgd059@ipl.jpl.nasa.gov