CTBUILD: SRT interface
D. Adams
30nov98 2200
CTBUILD provides an interface to the SRT (SoftRelTools) environment.
The usual SRT commands (gmake package.target) are used to invoke the
standard CTBUILD makefile. Packages built with CTBUILD may be mixed
with those built with traditional SRT GNUmakefiles and with those
built with the CTEST package.
The interface requires that a CTBUILD installation be overlaid on an
SRT release and that packages using CTBUILD provide a special top-level
GNUmakefile.
Environment
CTBUILD makes use of two global variables: CTBUILD_DIR points
to the top of the desired version of the CTBUILD package and
CTINSTALL points the current installation. These are set by the
SRT interface and need not be defined if one works completely
within the SRT interface. It is possible to use the ctbuild
command within that interface if these are defined.
See the section on switching between CTBUILD and CTEST for variables
relevant to that option.
Building CTBUILD
The necessary scripts to use CTBUILD are installed with the
bin target (gmake ctbuild.bin). Note that as usual for SRT, the
target directory is on the user's path on if the current directory
is the release directory.
Overlaying the installation
The installation is created with the script srtnewins. An installation
is overlaid on an SRT test release by running this script in the SRT
test release directory. CTBUILD installation directories are set to
point to those used by SRT. The actual CTBUILD installation directory
(i.e. the one containing setup scripts and makefiles) is two levels
down in cttop/$BFARCH. This makes it possible to overlay multiple
CTBUILD installations with different architectures on a single SRT
release.
This script may also be run in place of the SRT newrel command. It
does the newrel and then overlays a CTBUILD installation. The
syntax is similar to that of newrel:
srtnewins -t REL DIR
where REL is the base release and DIR is the directory where the local
release should be created. The release defaults to $BFCURRENT and the
directory defaults to $REL.
The installation is done automatically when the ctbuild package is
built (gmake ctbuild.all). Thus there is no need to run srtnewins
if ctbuild is built locally.
Package interface
In order for a package to be built using CTBUILD inside the SRT
environment, it must include the following line in its top-level
GNUmakefile:
include ctbuild/srt/srt.mk
Normally no other lines are required or desired. It is not necessary
for GNUmakefiles to appear in any of the package subdirectories.
It might be desirable to have SRT provide such behavior by default,
i.e. if the GNUmakefile is not present. However, for the time
being, it must be provided.
It may be possible to have hybrid packages where part is built by
CTBUILD and part with commands in the GNUmakefile either with or
without standard.mk. However, this has not been tested and should
be approached with caution. It is likely that SRT standard.mk and
CTBUILD will trample on one another.
Switching between CTEST and CTBUILD
It is possible to use CTBUILD to build a package which has the
makefiles required by the CTEST package. This done if the
environmental variable CTBUILD_REPLACES_CTEST is defined to have
a non-blank value. This allows users to try out CTBUILD without
modifying their packages. This is only supported in version
1.30.04 or later of CTEST.
The flag CTEST_REPLACES_CTBUILD will cause CTEST to be used in
place of CTBUILD. This is intended for use with architectures
not yet supported by CTBUILD.
Limitiations
Here we list some limitiations of the CTBUILD SRT interface.
-
The only supported architecture is IRIX6-KCC.
-
The only allowed external libraries are CERN and open
inventor. If others are needed, let me know.
CTEST conversion notes and hints
I have switched about 30 packages from CTEST to CTBUILD. Here are
some of the changes that had to be made. If you make other changes
of general interest, let me know and I will add then to this list.
- The top-level GNUmakefile must be modified as described above.
Subdirectory makefiles are no longer needed but should probably be
retained to allow the possibility of CTEST releases. If any CTEST
instructions were placed in the GNUmakefile (e.g. SUBDIRS),
these should be moved to the appropriate instruction file.
- CTBUILD searches for the location of every requested library
and the search path does not include system directories. Thus,
system libraries such as m (libm.a) should not appear in
LIBRARIES.
-
CTBUILD will only search the standard header areas when building
D0OM linkage files. Local references may have to be replaced with
package references, i.e. "#include pkg/x.h" instead of
"#include x.h".
adams@physics.rice.edu