Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Installing and Building Your SourcePro C++ Products
Rogue Wave web site:  Home Page  |  Main Documentation Page

4.3 Cleaning Up Buildspaces

The rwclean Java utility cleans a buildspace by deleting files created during the build process. Deleting build artifacts — such as buildspecs, object files, makefiles, build results, and other files associated with a buildspec — can be done manually; however, you may not detect all the files that need to be deleted to ensure a clean buildspace. Using rwclean ensures that files are removed from your buildspace, coherently and completely, according to your command-line arguments.

The rest of this section explains how to use rwclean.

4.3.1 Invoking rwclean

Run the rwclean launch scripts, located in rcb_install\bin:

4.3.2 Deleting All Buildspace Files

The easiest and most complete way to use rwclean is to use the argument --clean-buildspace, as shown here:

The --clean-buildspace argument removes all build artifacts in all modules for each buildspec (*.bsf) file that exists within a buildspace. It does not, however, remove the buildspec.bsf file itself.

4.3.3 Deleting Buildspace Files According to Buildtype and Module

For more specific needs, the rwclean utility also includes an extended set of arguments that allow you to specify particular files, buildtypes, and modules to be cleaned from the buildspec. The following example is based on the Essential Tools Module and Threads trace package example, which we have used throughout this chapter:

This command line deletes the following for the tools module and the trace package: example and source build artifacts, libraries, build results, build logs, characterization files, and configuration-specific header files, but NOT the buildspec, from the 12s build in c:\rwav. The -a argument is optional; if no -a argument is provided, rwclean uses -a clean by default. See Table 6 for a complete list and description of rwclean arguments.


For a complete list of module and package specifiers, see the products.properties file, located at:
rcb_install/admin/rwclean/products.properties.

In other words, the above invocation of rwclean deletes:

This command is useful if you run a buildspec that fails. In this case, you can delete the files generated by the failed build, but you still have the buildspec, which you can run again once the cause of the build problem has been corrected.

4.3.4 Command Line Syntax


We recommend that you use rwclean in the way described in Section 4.3.2. This section, Section 4.3.4, explains additional ways to use rwclean, but some of these options may lead to undesired results.

The rwclean syntax is:

Table 6 describes the rwclean command line arguments.

Table 6: rwclean command line arguments

Argument Description
--jre Specifies the Java2 JRE that is installed with RCB. Does not require that the PATH environment variable point to the JRE. If no --jre argument is provided, rwclean assumes that a Java2 JRE location is specified in the PATH environment variable.
--preview For the given arguments, show files to be deleted without actually deleting them.
--clean-buildspace Removes all build artifacts in all modules for each buildspec that exists within a buildspace, except the buildspec itself. Using this argument removes the need for any further arguments.
-b The absolute path to the root of the buildspace that contains the build or builds where you intend to use rwclean.
-a Optional. The -a argument specifies which files to delete. If no -a argument is provided, rwclean uses -a clean by default. The complete list of parameters for -a includes:
  • clean
    Deletes all build artifacts except the buildspec. Files deleted include example and source build artifacts, libraries, build results, build logs, characterization files, and configuration-specific header files.

  • clean-all
    Deletes all build artifacts including the buildspec.

  • clean-examples
    Deletes all build artifacts (object files, executables, makefiles) in buildspace\examples\buildtype.

  • clean-source
    Deletes all build artifacts (object files, makefiles) in buildspace\source\buildtype.

-t (buildtype) One or more buildtype specifiers indicating which build type to "clean." Includes both the build tag and a user tag, if provided, as explained in Section 3.5.13.2. Examples: 12s, 12s_solaris, rms_solaris, _NoStdLib_Win32ThrLib_Static_Release.
-p (module) One or more module or package specifiers. For example, in examples/trace/12s, the specifier is trace. The complete list of module and package specifiers is located in the products.properties file, located at: rcb_install/admin/rwclean/products.properties
These specifiers can be placed in any order on the command line. In other words, dependencies are not an issue, so, for instance, tools does not need to appear before trace.
Each module or package specifier is paired with each buildtype specifier. The Section 4.3.5 example labeled "two build types, two components," shows how these two specifiers work together.

4.3.5 Examples

Here are some examples of using rwclean.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.