rafmake utility reference

The interface for Build Catalyst is the make utility called rafmake. The interface has various options that control its behavior.

The syntax for the command depends on the operating system, as shown in the following table.

Table 1. Options by operating system
Operating system Options
Linux and Solaris (Build a target.) rafmake [ –f makefile ] ... [ –ukinservwdpqUN ] [ –J num ] [ –B bldhost-file ] [ –c compat-mode ] [ –C change-directory ] [ –A BOS-file ] ... [ macro=value ... ] [ target-name ... ]
Windows (Build a target.) rafmake [ –f makefile ] ... [ –ukinservwdpqUN ] [ –J num ] [ –c compat-mode ] [ –C change-directory ] [ –A BOS-file ] ... [ macro=value ... ] [ target-name ... ]
All (Display version information for the rafmake utility.) rafmake { –ver/sion | –VerAll }

Option descriptions

The rafmake command supports most of the common options of the GNU version 3.80 make command. The rafmake command also provides additional options.

Tip: You can combine options that do not take arguments, for example, –rNi.
Table 2. Option descriptions
Option Description
–f makefile Uses the makefile as the input file. If you omit this option, the rafmake command looks for input files named makefile and Makefile (in that order) in the current working directory. You can specify more than one –f makefile argument pair. Multiple input files are effectively concatenated.
–u (Unconditional) Rebuilds all specified targets and all of their dependencies, regardless of whether they need to be rebuilt. (See also –U.)
–k Abandons work on the current entry if it fails, but continues on other targets that do not depend on that entry.
–i Ignores error codes that commands return.
–n (No-execute) Lists command lines, including those that begin with an at sign (@), from the makefile for targets that need to be rebuilt, but does not run them. Exception: A command that contains the string $(MAKE) is always run.
–s (Silent) Does not list command lines before running them.
–e Environment variables override macro assignments in the makefile file. (However, macro=value assignments on the command line or in a build options specification override environment variables.)
–r (No rules) Does not use the built-in rules in the buildcatalyst-home-dir/etc/builtin.mk file (Linux and Solaris) or the buildcatalyst-home-dir\etc\builtin.mk file (Windows). When used with the –c option, the –r option also disables reading platform-specific startup files. See the –c option for more information.
–v (Verbose) Slightly more verbose than the default output mode.
–w (Working directory) Prints a message that contains the working directory both before and after running the makefile.
–d (Debug) Quite verbose and includes a list of the environment variables that the rafmake command reads during the build. Use this option only when debugging makefiles.
–p (Print) Lists all target descriptions and all macro definitions, including target-specific macro definitions and implicit rules. Does not run anything.
–q

(Query) Evaluates makefile targets but does not run the build scripts. The rafmake command returns one of these responses:

  • 0 if the targets are up to date
  • 1 if any targets need to be rebuilt
–U Unconditionally builds goal targets only. Does not build subtargets. If you do not specify any target on the command line, the default target is the goal. (The –u option unconditionally builds both goal targets and build dependencies.)
–N Disables the default procedure for reading one or more build option specification (BOS) files.
–J num Enables parallel building capability. The maximum number of concurrent target rebuilds is set to the integer num. If num=0, parallel building is disabled. (This is equivalent to not specifying a –J option.) Alternatively, you can specify num as the value of the RAFMAKE_CONC environment variable.
–B bldhost-file Uses the bldhost-file file as the build hosts file for a parallel build. If you do not specify the –B option, the rafmake command uses the .bldhost.$RAFMAKE_HOST_TYPE file in your home directory. When you use the –B option, you must also use the –J option or have the RAFMAKE_CONC environment variable set.
–c compat-mode

(Compatibility) Invokes the rafmake command in a compatibility mode.

(Alternatively, you can use the RAFMAKE_COMPAT environment variable to specify a compatibility mode.)

You can set the compat-mode variable to one of the following values:

gnu

Emulates the Free Software Foundation's Gnu make program. To define built-in make rules, the rafmake command reads gnubuiltin.mk instead of builtin.mk.

This mode is the default compatibility mode.

std
Runs the rafmake command with the IBM Rational® ClearCase® clearmake command compatibility mode enabled.

On Linux and Solaris systems only, the compat-mode variable can also have one of the following values. The –c option is Linux and Solaris platform-independent. However, some modes try to read system-specific files; if those files do not exist, the command fails.

sun
Emulates the standard make(1) command that SunOS systems provide.
aix
Emulates the standard make(1) command that IBM AIX® systems provide.
–C dir Changes the directory. The rafmake command changes to the dir directory before starting the build.
–A BOS-file

Specifies BOS files to be read immediately after the ones that are read by default. Use this option multiple times to specify multiple BOS files.

When you use –N with this option, rafmake reads the specified BOS files instead of the default BOS files.

Alternatively, you can specify a colon-separated list of BOS file path names (Linux and Solaris) or a semicolon-separated list of such path names as the value of the environment variable RAFMAKE_OPTS_SPECS.

–ver/sion Prints version information about the rafmake command.
–VerAll Prints version information about the rafmake command and the libraries (Linux and Solaris) or the DLLs (Windows) that the rafmake command uses.

Feedback