Release RMC-06.02
(2024-04-29)
|
Contents
Description
Description
These Customisation must only be set by the GBS Administrator!
Index
User File Templates (GBS_TEMPLATES_PATH)
Templates
When gbsedit creates a file, a template-file (template) is used.
Standard templates are defined in GBS for GBS-internal files (*.gbs & gbs script files).
There are also templates for most common User files (.c, .glk, etc).
As you can use gbsedit also outside GBS (outside the GBS Work Area) these come in two tastes:
- gbs.* for files inside GBS (May contain Subsystem and/or Component name)
- any.* for files outside GBS
You can define your own templates in GBS_SYS_PATH/templates. And/or somewhere central defined by GBS_TEMPLATES_PATH.
Template-files are named
gbs.file_type or
gbs_name.file_type or
any.file_type or
any_name.file_type.
E.g.: any.c, gbs.glk, any_myname.c
Search-order is:
- GBS_SYS_PATH/templates (User Templates)
- GBS_TEMPLATES_PATH (Shared Templates)
- Internal GBS directory (GBS Templates)
You can also create such a file in the Shared Templates directory (GBS_TEMPLATES_PATH).
See below for the customisable items in a template-file.
gbsmaint 7 2 provides functions to:
- Create a User Template
- Copy Templates to the User Template directory
- Edit a User Template
Comments in files
Associated to a file-type are comment-characters:
- Begin Comment
E.g: // or /*
- End Comment (often empty)
E.g: */
- Comment start position (only used for old languages as COBOL and Fortran)
GBS maintains an extensive list of comment-characters per file-type.
Whenever you add a file with
gbsedit, and the file-type is not known, you will be prompted for the
comment-characters.
They are saved in a file called 'comment_chars.gbs' in the User Templates directory.
Not happy?
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 or the site.gbs file.
Define:
- Linux
-
export GBS_TEMPLATES_PATH=your_template_path
- Windows
-
SET GBS_TEMPLATES_PATH=your_template_path
Semantics:
Template-files are named any.file_type or any_name.file_type.
E.g.: any.c, any.glk, any_myname.c
Search-order is GBS_SYS_PATH/templates (User), GBS_TEMPLATES_PATH (Share), Internal_GBS_directory (GBS).
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 or the site.gbs file.
Define:
- Linux
-
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:
| | Git | → GBSEXT_GIT_PATH
| | | Subversion | → GBSEXT_SVN_PATH
|
Make (GBS_MAKE)
Name:
GBS_MAKE and/or
GBS_MAKE_gbs_build
Purpose:
Define a alternate make command and/or specify make-options for Non-GBS makefiles
Careful: Incorrect use can damage the build-system!
Default:
- Linux
-
make
- Windows
-
nmake
Where:
In the switch.gbs file or the site.gbs file.
Define:
- Linux
-
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_build
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: gbssysbuild,
gbssysmake,
gbssysaudit.
Careful: Incorrect use can damage the build-system!
Default:
- Linux
-
none
- Windows
-
none
Where:
In the switch.gbs file or the site.gbs file.
Define:
- Linux
-
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_build
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: gbssysbuild,
gbssysmake,
gbssysaudit (with --fg)
Careful: Incorrect use can damage the build-system!
Default:
- Linux
-
none
- Windows
-
none
Where:
In the switch.gbs file or the site.gbs file.
Define:
- Linux
-
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_build
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: gbsbuild,
gbsmake,
gbsaudit
Careful: Incorrect use can damage the build-system!
Default:
- Linux
-
none
- Windows
-
none
Where:
In the switch.gbs file or the site.gbs file.
Define:
- Linux
-
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-build
Purpose:
Define a command to be executed at submit, beginning and at termination of a
gbssysbuild, gbssysmake
or gbssysaudit job (Used by tools like SoftFab, Hudson, BuildForge and CruiseControl)
The command will be appended with the following information:
| Submit: | submit | jobname datetime nr_jobs [ build action ]...
|
| Begin: | start | jobname datetime pid build action logfile-spec
|
| End: | end | jobname datetime pid build 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 or the site.gbs file.
Define:
- Linux
-
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!
|