Customizing Build Flavors

There are two ways that the build flavors can be customized. The first is to build globus_core manually. The second way involves editing the globus_flavor_labels.conf file.

Building the globus_core package Manually

Currently the only way to create a custom flavor definition with your own flavor label is to build the globus_core source package manually. The package is located at $GPT_LOCATION/etc/gpt/globus_core.tar.gz. Untar this package into your working directory and the change into the resulting subdirectory.

As was mentioned previously, the flavor definition is fed into globus_core using shell variable settings and command switches. The command list of command switches can be seen by executing

./configure --help

. The list of shell variables is documented internally in globus_core in the file config/accompiler.m4. The most important switch is the --with-flavor=label which sets the flavor label. Here is an example configure command

CC=gcc; export CC; \
LDFLAGS='-L/home/mbletzin/install/globus/lib'; export LDFLAGS; \
./configure  --with-flavor=kumquat --enable-debug --with-threads=pthreads

In this case the flavor kumquat is defined with the C compiler set to gcc, the thread package of pthreads, and debug enabled.

After the configure command is executed, run

make

and

make install

to install the flavor.

Editing globus_flavor_labels.conf

The globus_flavor_label.conf file is an XML file that matches flavor label components with inputs to the configure script that is executed to build the globus_core package. The DTD for this file is found here. A flavor definition is essentially a list of flavor choices encapsulated by a flavors element. Each flavor_choice element contains a number of config which define a possible value of the flavor choice with their attributes. The following shows what the different attributes are for:

switch

This attribute contains the input that needs to be passed into globus_core's configure script to set this value. Inputs to globus_core's configure script consists of shell variables and command line switches.

label

This attribute contains the text used to create a flavor label.

nolabel

This attribute asserts that this particular value is the default value for the flavor choice.

std

This attribute defines whether the value should be include in the standard list flavors. This flavor list is used by gpt-build when the -std-flavors switch is used.

Here are a couple of example flavor choices:


<flavor_choice>
<config std="yes" switch="CC=gcc" label="gcc"/>
<config std="yes" switch="CC=cc" label="vendorcc"/>
</flavor_choice>



This choice has two settings gcc and vendorcc. Both of the settings set the CC shell variable, add text to the flavor label, and are included in the standard flavor list.



<flavor_choice>
<config std="yes" switch="--with-threads=pthreads" label="pthr"/>
<config std="no" switch="--with-threads=solaristhreads" label="solthr"/>
<config std="yes" nolabel="nothreads"/>
</flavor_choice>



This choice has three settings. The first two (pthr and solthr) set a command line switch and add text to the flavor label. The third setting ( nothreads ) assumes the default thread package setting for configure and does not add anything to the flavor label. Only the first and third setting are included in the standard flavor list.