GBS Logo HOME Generic Build Support (GBS) - User Manual
The tool.gbs files Bottom Doc. Button

Contents Bottom Doc. Button Top Document Button Down Section Button Blank

Description
Purpose| General| Contents| SETUP Definition| DEFAULTS definition| INIT definition| RUN Definition| Notes
Example of a tool.gbs
File 1 (Basic reference - implicit default)| File 2 (Basic reference - explicit default)| File 3 (Full specification)

Description Bottom Doc. Button Top Document Button Down Section Button Up Section Button

Purpose Bottom Doc. Button Top Document Button Down Section Button Up Section Button Down Chapter Button Blank

The tool.gbs files are located in the GBS_SYSTOOLS_PATH/tool directories and are used to define the particularities of a Tool.

General Bottom Doc. Button Top Document Button Down Section Button Up Section Button Down Chapter Button Up Chapter Button

Please refer to .gbs files: General information

Additional for this file:

Contents Bottom Doc. Button Top Document Button Down Section Button Up Section Button Down Chapter Button Up Chapter Button

SETUP definition
DEFAULTS definition
INIT definition
RUN definition

SETUP Definition Bottom Doc. Button Top Document Button Down Section Button Up Section Button Down Chapter Button Up Chapter Button

Purpose:

To define general stuff, valid for the whole definition set.

Syntax:

SETUP
NICE_NAME = nice_name

Semantics:

NICE_NAME
Specifies a more descriptive name of the Tool. It is used in messages.
nice_name
Free format (just do not make it too long)

DEFAULTS definition Bottom Doc. Button Top Document Button Down Section Button Up Section Button Down Chapter Button Up Chapter Button

Purpose:

To set Tool dependent defaults, overriding the GBS defaults

Syntax:

DEFAULTS
ACTION = action-definition

Semantics:

Refer to RUN semantics below.

INIT definition Bottom Doc. Button Top Document Button Down Section Button Up Section Button Down Chapter Button Up Chapter Button

Purpose:

To perform general initialisation.
It is possible to define derived Tool dependent Environment Variables
Note that all references to the 'outside-world' must be specified in the switch.gbs.
On Windows it can be used to (re)define an EnvVar with spaces removed. (Converted to ShortPathName)

Syntax:

INIT
SET_W = envvar_name => envvar_value
...
SET_X = envvar_name => envvar_value
...
SET = envvar_name => envvar_value
...
SETPATH = path_envvar_name => envvar_value-list
...
BIN_DIR = bin_dir

Semantics:

SET_W, SET_X & SET
Specifies an Environment Variable.
envvar_name
Uppercase please
envvar_value
If placed between quotes (") it will be canonicalized (/.. solved) and on Windows converted to a ShortPathName without spaces.
SET_W is executed for Windows only.
SET_X is executed for Linux only.
SET is executed for all platforms
and must be specified after SET_W and SET_X
SETPATH
Specifies a PATH Environment Variable.
path_envvar_name
Case dependent on OS
envvar_value-list
If placed between quotes (") items will be canonicalized (/.. solved) and on Windows converted to a ShortPathName without spaces.
Items will be properly joined (';' on Windows, ':' on Linux)
Must be specified after SET_W, SET_X & SET
BIN_DIR
Specifies the directory in which the executables of the plugin reside, relative to GBSEXT_<plugin>_PATH.
It is used to assemble GBSEXT_<plugin>_BIN_PATH which must be used in the COMMAND sub-section.
bin_dir
One or more directories, separated by '/'

RUN Definition Bottom Doc. Button Top Document Button Down Section Button Up Section Button Down Chapter Button Up Chapter Button

Purpose:

To provide information on how to run the Tool program (executable or script)

Syntax:

RUN
ACTION = actiondefinition
...
COMMAND = [ [ pre-condition ; ] ok_exit_values-comma-list ; ] command-definition
...

Semantics:

ACTION
Specifies possible actions of the Tool. To be used as pos-arg, option or EnvVar
action-definition
action-definition := action_name... => option
E.g.:
ACTION = API => api
ACTION = FULL => full
Default is the first in the list
COMMAND
Command to invoke the Tool program.
Syntax and Semantics:
Refer to the COMMAND description
More than one COMMAND can be specified.
The command is called with the following positional parameters: The following additional Environment Variables are set and may be used:

Notes: Bottom Doc. Button Top Document Button Down Section Button Up Section Button Blank Up Chapter Button

None

Example of a tool.gbs: Bottom Doc. Button Top Document Button Down Section Button Up Section Button

File 1 (Basic reference - implicit default) Bottom Doc. Button Top Document Button Down Section Button Up Section Button Down Chapter Button Blank

#========================================================
#   doxygen_api [doxygen] tool.gbs
#========================================================
.plugin doxygen

.include <tool.gbs>

###EOF###

File 2 (Basic reference - explicit default) Bottom Doc. Button Top Document Button Down Section Button Up Section Button Down Chapter Button Up Chapter Button

#========================================================
#   [doxygen] tool.gbs
#========================================================
.plugin doxygen

.include <tool.gbs>

DEFAULTS
    ACTION = FULL

###EOF###

File 3 (Full specification) Bottom Doc. Button Top Document Button Blank Up Section Button Blank Up Chapter Button

#========================================================
#   %TOOL% [doxygen] tool.gbs
#========================================================

SETUP
    NICE_NAME	= DoxyGen

INIT
    BIN_DIR	= bin

RUN
    ACTION = API    => api
    ACTION = FULL   => full
    COMMAND = >doxygen/bin/doxygen.pl %1 %2 %3 %4

##EOF##

tool.html