CTBUILD: User's guide

30nov98 1050


Introduction

CTEST is an interface for building C++ packages. See http://www-d0.fnal.gov/software/cmgt/ctest/ctest.html. CTBUILD provides an implementation of that interface which can be run either in standalone mode or inside the D0 CVS/SRT environment.

This is a rather brief introduction to the CTBUILD user interface. For a description of the capabilities of CTBUILD, please see the design document.

This guide is intended for those using CTBUILD in a standalone mode or for those integrating CTBUILD into an existing development environment. Anyone using CTBUILD within the D0 SRT environment should first read the documentation for that interface .


Environment

CTBUILD installations are self-describing so there is little need for environmental variables. There are however two: In the discussion that follows, we assume that the scripts ctnewins and ctbuild in $CTBUILD_DIR/script are on the user's path or have been aliased.


Creating an installation

In order to build software with CTBUILD, one must first create an installation. This is done with the command ctnewins. This command has a large number of command line options which allow the user to specify the package source directory, the installation directory, the target destination directories, the search paths and the architecture. Use ctnewins -h for help.


Building

Software may be built with the command
> ctbuild pkg tgt
where pkg is a package name and tgt is one or more actions to be performed. These actions include: Targets will trigger any prerequisite targets, e.g. bin triggers header and lib before it runs.

Targets which make use of C++ source files automatically generate and include dependency files. Also targets built from bare objects or libraries have explicit dependencies so the target will be rebuilt if there are changes in its objects or libraries.

All packages may be built with the command

> ctbuild -a tgt


Clearing

There are special targets for clearing. The products and intermediate files associated with any of the standard targets my be removed using a target which prepends clear_, e.g. use clear_bin to clear products of the bin target.

In addition, there are some special clear targets:

Clear targets may be invoked for one package or for all packages.


Indexing


Please send questions or comments to adams@physics.rice.edu.