rwsetup
Index
CBM User Guide Scripts genmake

rwsetup

USAGE:  rwsetup [-f<platform file>] -i<workspace dir> 
          [-t<build type>] <product tree dir>

The command line options are:

-f   Path to platform-related data file (values for RWOPSYS, 
     RWCOMPILER, compiler command name)
-i   Path to the workspace directory containing config.dat
-t   Build type number

Note: Do not put spaces between the argument flags and their associated values.

The script rwsetup is descended from the bin/config script of the pre-1997 Rogue Wave build model.

This script determines the functional capabilities of your C++ compiler by running a series of tests. The results are represented by the data stored in config.dat. This file is placed in the rw directory of the workspace. A header file compiler.h is also created that contains macro settings critical to the correct compilation of Rogue Wave source. This file is written to the same rw workspace directory that contains config.dat.


Note: When used in compiling the Standard C++ Library, rwsetup creates the header file stdcomp.h in lieu of compiler.h. This file is exported to the Standard C++ Library workspace directory include.

The file specified by the -f argument identifies the operating system (RWOPSYS) and compiler (RWCOMPILER) for the build, as well as the command line name of the compiler. Four values, RWFIRST_CCOPTS, RWLAST_CCOPTS, RWFIRST_LINKOPTS, and RWLAST_LINKOPTS also allow for custom object compilation and application link arguments. The directory <spm_root>/scripts/platform contains one of these files for each operating system and compiler combination that Rogue Wave suppports. Normally, you would use one of these files. If you wish to create your own file to meet special needs, see the discussion of the -f option of the rwspm script in the topic on command line builds. |LAST]_CCOPTS variables--> |LAST]_LINKOPTS variables-->

If a particular argument is needed for both object compilation and application linkage, that argument must appear in both a RW*_CCOPTS and a RW*_LINKOPTS macro.

Here is the default file solaris_sunpro.in for the SunPro compiler on Solaris:

# Shell script used as an input file to rwsetup
#  supports "CC" (SUNPRO) on SOLARIS

# --- Compiler and OS Names ---
RWOPSYS=SOLARIS
RWCOMPILER=SUNPRO

# --- Compiler Settings ---
RWCPP="CC"
RWFIRST_CCOPTS=""
RWLAST_CCOPTS=""
RWFIRST_LINKOPTS=""
RWLAST_LINKOPTS=""

If the -f argument is NULL, or if the specified file does not define RWOPSYS, then rwsetup treats the current build environment as "unsupported." Additional questions are posed to the user regarding compiler name, compiling and linkage options, and so on.

rwsetup is passed the path to a workspace directory as the -i argument. It checks that directory for the existence of an adequate config.dat and, if found, uses it in lieu of reapplying the compiler tests. If config.dat is located, but compiler.h (or stdcomp.h) is not, rwsetup generates the required header file.

rwsetup also writes the output file rwsetup.spm, which contains platform identifier macros that are used extensively by other CBM scripts. rwsetup.spm is written to the config directory of the current workspace.

CBM User Guide Scripts genmake
Index