GBS Logo Generic Build Support (GBS) - User Manual HOME
Customisations (Admin)
These Customisation must only be set by the GBS Administrator!
Index

GBS Startup (gbsall)

You can define a batch-file that is executed every time before GBS is started.
Its generic name is gbsall and it must be placed in the GBS_SCRIPTS_ROOT and/or GBS_BASE_PATH directory.
Typical usage for GBS_SCRIPTS_ROOT is in a shared GBS installation: Typical usage for GBS_BASE_PATH is to define stuff that is valid for all GBS Systems: Depending on presence the files are called in the order above.

GBS EnvVars defined in the gbsall file must be prefixed GBSALL instead of GBS
This prevents them to be deleted at root-switch.
Eligble EnvVars are the EnvVars described in this chapter. (E.g.: GBS_TEMPLATES_PATH)

Unix
gbsall.sh
Windows
gbsall.bat
Please note the following:
  1. Do not try to be 'clever' with this file.
  2. Placing any 'clever' stuff this file may cause GBS to malfunction.
    If not today: definitely in the future.

User File Templates (GBS_TEMPLATES_PATH)

When gbsedit creates a file, a template is used.
Standard templates are defined in GBS for GBS-internal files and for most common User files (.c, .glk, etc).
You can define your own templates in GBS_SYSBUILD_PATH/templates. And/or somewhere central defined by GBS_TEMPLATES_PATH.
Template-files are named anydot_file_type. E.g.: any.c, any.glk
Search-order is GBS_TEMPLATES_PATH, GBS_SYSBUILD_PATH/templates, Internal_GBS_directory.

You can copy existing GBS templates to GBS_SYSBUILD_PATH/templates by using gbsmaint 7 2 and then edit them to suit your taste.
cdsysbuild, cd templates and then gbsedit any.type
See below for the customisable items in a template-file.
Suggestions? Your favourite missing? Let me know!

Name:

GBS_TEMPLATES_PATH

Purpose:

To define a directory containing external project file-templates

Default:

None

Where:

In the switch.gbs file and/or gbsall file (as GBSALL_TEMPLATE_PATH)

Define:

Unix
export GBS_TEMPLATES_PATH=your_template_path
Windows
SET GBS_TEMPLATES_PATH=your_template_path

Semantics:

Template-files are named anydot_file_type. e.g.: any.c, any.glk
Search-order is GBS_TEMPLATES_PATH, GBS_SYSBUILD_PATH/templates, Internal_GBS_directory.

The following tokens used within the Template will be replaced during file-creation by GBS:
    %SYSTEM_NAME% → System
    %SUBSYS% → SubSys
    %COMPONENT% → Component
    %FILE% → File_nameFile_type
    %FILE_NAME% → File_name
    %FILE_TYPE% → File_type
    %UC_FILE% → uc File_nameFile_type
    %UC_FILE_NAME% → uc File_name
    %UC_FILE_TYPE% → uc File_type
    %INCLUDE_GUARD% → uc File_nameFile_type with '.' replaced by '_'

SCM binary home directory (GBSEXT_scm_PATH)

Name:

GBSEXT_scm_PATH

Purpose:

To define the home directory of the specific SCM execution binary
This prevents being depended on the individual PATH settings

Default:

None

Where:

In the switch.gbs file and/or gbsall file (as GBSALLEXT_scm_PATH)

Define:

Unix
export GBSEXT_scm_PATH=your_scm_home_path
Windows
SET GBSEXT_scm_PATH=your_scm_home_path

Semantics:

The following EnvVars will be recognised by GBS:
   ClearCase GBSEXT_CC_PATH
   IBM Rational Synergy GBSEXT_CCM_PATH
   CVS GBSEXT_CVS_PATH
   Git GBSEXT_GIT_PATH
   Subversion GBSEXT_SVN_PATH
   VisualSourceSafe GBSEXT_VSS_PATH

Make (GBS_MAKE)

Name:

GBS_MAKE and/or
GBS_MAKE_gbs_target

Purpose:

Define a alternate make command and/or specify make-options
Careful: Incorrect use can damage the build-system!

Default:

Unix
make
Windows
nmake

Where:

In the switch.gbs file and/or gbsall file (as GBSALL_MAKE)

Define:

Unix
export GBS_MAKE='Your make command'
Windows
SET GBS_MAKE=Your make command

Background Processing Invocation (GBS_SUBMIT)

Name:

GBS_SUBMIT and/or
GBS_SUBMIT_gbs_target

Purpose:

Define a general script to be executed after submitting a job to the background batch and before the job is executed (for implementing things like LSF)
The batch-job will be executed within the context of this general script
Affected commands: gbssysgen, gbssysmake, gbssysaudit.
Careful: Incorrect use can damage the build-system!

Default:

Unix
none
Windows
none

Where:

In the switch.gbs file and/or gbsall file (as GBSALL_SUBMIT)

Define:

Unix
export GBS_SUBMIT='command to be executed with $1'
The $1 will be replaced by the file-name of the scriptfile to be executed (Mandatory!)
Any $2 will be replaced by the jobname
Any $3 will be replaced by the logfile specification
Windows
SET GBS_SUBMIT=command to be executed with %1%
The %1% will be replaced by the file-name of the scriptfile to be executed (Mandatory!)
Any %2% will be replaced by the jobname
Any %3% will be replaced by the logfile specification

Foreground Processing Invocation (GBS_SUBWIN)

Name:

GBS_SUBWIN and/or
GBS_SUBWIN_gbs_target

Purpose:

Define a general script to be executed after submitting a job for foreground executing in a separate window and before the job is executed (for implementing things like LSF)
The batch-job will be executed within the context of this general script
Affected commands: gbssysgen, gbssysmake, gbssysaudit (with --fg)
Careful: Incorrect use can damage the build-system!

Default:

Unix
none
Windows
none

Where:

In the switch.gbs file and/or gbsall file (as GBSALL_SUBWIN)

Define:

Unix
export GBS_SUBWIN='command to be executed with $1'
The $1 will be replaced by the file-name of the scriptfile to be executed (Mandatory!)
Any $2 will be replaced by the jobname
Windows
SET GBS_SUBWIN=command to be executed with %1%
The %1% will be replaced by the file-name of the scriptfile to be executed (Mandatory!)
Any %2% will be replaced by the jobname

Batch Processing Invocation (GBS_BATCH)

Name:

GBS_BATCH and/or
GBS_BATCH_gbs_target

Purpose:

Define a general script to be executed after submitting a batch job and before the job is executed (for implementing things like LSF)
The batch-job will be executed within the context of this general script
Affected commands: gbsgen, gbsmake, gbsaudit
Careful: Incorrect use can damage the build-system!

Default:

Unix
none
Windows
none

Where:

In the switch.gbs file and/or gbsall file (as GBSALL_BATCH)

Define:

Unix
export GBS_BATCH='command to be executed with $1'
The $1 will be replaced by the file-name of the scriptfile to be executed (Mandatory!)
Windows
SET GBS_BATCH=command to be executed with %1%
The %1% will be replaced by the file-name of the scriptfile to be executed (Mandatory!)

Notify Submit, Start and End of gbssys...-job execution (GBS_BG_NOTIFIER)

Name:

GBS_BG_NOTIFIER and/or
GBS_BG_NOTIFIER_gbs-target

Purpose:

Define a command to be executed at submit, beginning and at termination of a gbssysgen, gbssysmake or gbssysaudit job (Used by tools like Softfab, Hudson, BuildForge and CruiseControl)

The command will be appended with the following information:
Submit:submitjobname datetime nr_jobs [ target action ]...
Begin: start jobname datetime pid target action logfile-spec
End: end jobname datetime pid target action logfile-spec completion-state completion-code
Where completion-state is one of NORMAL FAILED or KILLED
More tbs Expect future extensions
action is either gen make or audit_name (e.g. qac)

Note that for one submit all jobname and datetime will be the same

Where:

In the switch.gbs file and/or gbsall file (as GBSALL_BG_NOTIFIER)

Define:

Unix
export GBS_BG_NOTIFIER='command to be executed'
Windows
SET GBS_BG_NOTIFIER=command to be executed

Note:

As the GBS_BG_NOTIFIER will be executed from different processes, no assumption can be made on the order in which they are executed!

ClearCase (Unix)

Define the following Environment Variables in the switch.gbs file:
export MY_CC_VIEW=`cleartool pwv -short`
export GBS_SUBMIT="cleartool setview -exec '\$1' $MY_CC_VIEW"
export GBS_MAKE="clearmake -T"

At Philips AppTech in combination with LSF

export MY_CC_VIEW=`cleartool pwv -short`
export CC_SUBMIT="cleartool setview -exec '\$1' $MY_CC_VIEW"
export GBS_SUBMIT="/cadappl/gbs/asa/gbssubmit \"$CC_SUBMIT\""
export GBS_SUBWIN="/cadappl/gbs/asa/gbssubwin \"$CC_SUBMIT\""
export GBS_BATCH="/cadappl/gbs/asa/gbsbatch \"$CC_SUBMIT\""
export GBS_MAKE="clearmake -C sun -T"

LSF (Unix Load Sharing Facility)

At Philips AppTech

The following Environment Variables are predefined (in gbsall.sh):
export GBS_SUBMIT='cd ; export BSUB_QUIET=1 ; bsub -I -q buildq "$1"'
export GBS_SUBWIN='cd ; bsub -I -q buildq "$1"'
export GBS_BATCH='cd ; bsub -I -q buildq "$1"'
export GBS_BATCH_QAC='cd ; bsub -I -q QACq "$1"'
export GBS_BATCH_QACPP='cd ; bsub -I -q QACPPq "$1"'

To run an lgcc Target on the Linux cluster, add the following line in your switch.gbs.sh:
export GBS_BATCH_LGCC='cd ; bsub -I -q linuxq "$1"'