GBS Logo HELP HOME Generic Build Support (GBS) - User Manual
Environment Variables (EnvVars) Bottom Doc. Button
Release RMC-06.02
(2024-04-29)


- Home
Getting Started
- Quick Start
- Release Notes
- Install Notes
- Create a GBS-WA/System
- FAQ
- Terms and Conditions (The Fine Print)
Basics
- Definitions & Acronyms
- Introduction
- Top Level Directory Structure
- Full Directory Structure
- Handling SubSystems & Steps
- Procedures
- Software Configuration Management Support

Manual Pages
- The Command-Line Interface
- All Commands
- The gbssys... Commands
- Generating Code (Building)
- Libraries & Executables and Testing
- Exporting Deliverables
- Auditing
- Customisations (Session)
- Customisations (User)
- Customisations (Admin)
- Integration with other Tools
- Plugins (Admin)
- Environment Variables (EnvVars)
User Files
- The GLKBT (glk/glb/glt) Files
Internal (.gbs) Files
- GBS Files - General
- audit.gbs
- broadcast.gbs
- build.gbs
- export.gbs
- flags_*.gbs
- subsys.gbs (.bat/.sh)
- incs_*.gbs
- owners.gbs
- sca_*.gbs
- scope.gbs
- site.gbs (.bat/.sh)
- steps.gbs
- switch.gbs (.bat/.sh)
- system.gbs
- tool.gbs
Various
- Development
- About
- Metrics Help

Full Documentation
- All Docs - Printable


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

GBS relies heavily on Environment Variables (EnvVars)
They are all controlled by GBS.
There is a lot of inter dependency between the GBS EnvVars and they must be set as a group.
Some EnvVars (most) are intrinsically set by GBS, others (a few) may be set by the User and that has to be done by using the proper GBS functionality that supports that.

Changing EnvVars by just setting them may lead to unexpected results and may cause GBS to crash or loose integrity
All GBS EnvVar are prefixed by either GBS_, GBSEXT_
  • GBS_... EnvVars are defined by GBS
  • GBSEXT_... EnvVars are defined in switch.gbs or site.gbs

Index

GBS_ EnvVars Bottom Doc. Button Top Document Button Down Section Button Blank Down Chapter Button Blank

Note that the following table is sortable by the items in the top row.
Level EnvVar Name Possible Values Usage More
Info
Set by Changed
by
Remarks
0 Adm GBS_PERL_PATH directory path Define location of Perl More User User Optional. In:
Windows System Variables or
.profile
1 Pre GBS_BOOT_PATH directory path
%APPDATA%\.gbs or ~/.gbs
Define location of Boot .gbs   define GBS N/A Internal
1 Pre GBS_BASE_PATH directory path
%MyDocuments%/.gbs or ~/.gbs/base
Define location of User .gbs/base   define GBS N/A Internal
1 Pre GBS_PLATFORM MSWin32 or Linux Current platform More Define GBS Predefined Internal
1 Pre GBS_SHELL_FILETYPE .bat or .sh Commandfile-type for current platform   Define GBS N/A Internal
1 Pre GBS_PERL_CMD command Full Perl command   Define GBS N/A Internal
1 Pre GBS_WSL_DISTRO Empty, none or distro Current Distro if in WSL   Define GBS N/A Internal
2 GBS GBS_RC Number Scripts return status   various scripts  
2 GBS GBS_SITE Short name in uppercase Name of your Site More gbsinit gbssettings  
2 GBS GBS_LOG_ROOT directory path Log Files Root Location More gbsinit gbssettings Contains GBS_LOG_PATHs per GBS_SYSTEM_PARENT
2 GBS GBS_LOG_PATH directory path Log Files Location More gbsinit switch.gbs Set to $GBS_LOG_ROOT/$GBS_SYSTEM_PARENT
2 GBS GBS_HOME_PATH directory path
MyDocuments or ~/Documents
CWD when no System is current and default Root for GBS user directories More gbsinit gbssettings  
2 GBS GBS_TEMPLATES_PATH directory path External Templates path (OPT) More gbsinit swr site.gbs
switch.gbs
2 GBS GBS_MAKE command_spec Alternative 'make' for Non-GBS Makefiles (OPT) More gbsinit swr site.gbs
switch.gbs
2 GBS GBS_SUBMIT command_spec Alternative Submit (Background) (OPT) More gbsinit swr site.gbs
switch.gbs
2 GBS GBS_SUBWIN command_spec Alternative Submit (Foreground) (OPT) More gbsinit swr site.gbs
switch.gbs
2 GBS GBS_BATCH command_spec Alternative Batch command (OPT) More gbsinit swr site.gbs
switch.gbs
2 GBS GBS_BG_NOTIFIER command_spec Notifier for Submit completion (OPT) More gbsinit swr site.gbs
switch.gbs
2 GBS GBS_BUILD RVVYYMMDD Current Release/Build More gbsinit Predefined  
2 GBS GBS_EXEC_MODE DEFINED INTERACTIVE
FOREGROUND
BACKGROUND
Execution Mode   define gbsinit gbssys* Internal
2 GBS GBS_GUI Tkx None Available Perl GUI   gbsinit Predefined Internal
2 GBS GBS_PERL_CMD perl with or without path Direct Perl execution command   gbsinit Predefined  
2 GBS GBS_WPERL_CMD perl with or without path Command to start Perl GUI   gbsinit Predefined  
2 GBS GBS_PID number PID of toplevel process   gbsinit Predefined Internal
2 GBS GBS_SCRIPTS_ROOT directory path Where GBS versions are installed More gbsinit gbssettings Internal
2 GBS GBS_SCRIPTS_REL version version_build The current GBS version directory More gbsinit gbssettings Internal
2 GBS GBS_SCRIPTS_PATH Root/Rel The current GBS scripts location More gbsinit gbssettings  
2 GBS GBS_SHELL_FILETYPE .bat .sh The current shell filetype   gbsinit gbssettings  
2 GBS GBSDEBUG_VERBOSE 0 1 Verbose logging More gbsinit All Commands (Internally) Always 1 in BATCH jobs (gbssys*)
3 System GBS_SYSTEM_NAME name Name of the System More swr    
3 System GBS_SYSTEM_PATH directory path Current System path More swr    
3 System GBS_SYSTEM_PARENT directory name Parent dir of current System More swr    
3 System GBS_ALL_AUDITS names list All platform Audits   swr    
3 System GBS_AUDITS names list All Audits for this Platform   swr    
3 System GBS_AUDIT name Current Audit   swr gbsaudit  
3 System GBS_AUDIT_PLUGIN name Current Audit Plugin   swr gbsaudit  
3 System GBS_ALL_BUILDS names list All platform Builds   swr    
3 System GBS_BUILDS names list All Builds for this Platform   swr    
3 System GBS_BUILD name Current Build   swr swb  
3 System GBS_BUILD_PLUGIN name Current Build Plugin   swr swb  
3 System GBS_ALL_TOOLS names list All platform Tools   swr    
3 System GBS_TOOLS names list All Tools for this Platform   swr    
3 System GBS_TOOL name Current Tool   swr gbssystool  
3 System GBS_TOOL_PLUGIN name Current Tool Plugin   swr gbssystool  
3 System GBS_ALL_SUBSYSTEMS names list All SubSystems   swr sws --new  
3 System GBS_IS_ADMINISTRATOR 0 1 User is Administrator More swr gbssettings  
3 System GBS_IS_INTEGRATOR 0 1 User is Integrator More swr gbssettings  
3 System GBS_IGNORES regexp List Filetypes to be skipped   swr   Internal
3 System GBS_PLATFORMS Platform list Platforms this System generates for       Internal
3 System GBS_SCMS None Subversion Git ... Current SCMS More swr   Internal
3 System GBS_SCMS_DATA path Internal Path More swr   Internal
3 System GBS_SCMS_REPOSITORY file/directory path/URL SCMS Repository location More swr   Internal
3 System GBS_DEV_PATH directory path SystemPath/dev More swr    
3 System GBS_EXT_PATH directory path SystemPath/ext More swr    
3 System GBS_RES_PATH directory path SystemPath/res More swr    
3 System GBS_SILO_PATH directory path SystemPath/silo More swr   Internal
3 System GBS_SYS_PATH directory path SystemPath/sys More swr    
3 System GBS_SYSAUDIT_PATH directory path SystemPath/sysaudit More swr    
3 System GBS_SYSBUILD_PATH directory path SystemPath/sysbuild More swr    
3 System GBS_SYSTOOL_PATH directory path SystemPath/systool More swr    
3 System GBS_TMP_PATH directory path SystemPath/tmp More swr   Internal
3 System GBS_DEBUGGER YES NO Include Debugger (build) More swb User gbsbuild gbsmake Scripts
3 Systems GBS_MAP YES NO Produce a memory map (linking) More swb User gbsbuild gbsmake Scripts
3 System GBS_MODE FINAL ASSERT DEBUG PROFILING Build mode More swb User gbsbuild gbsmake Scripts
3 System GBS_OPT YES SPEED SIZE DEBUG NO Build Optimisation More swb User gbsbuild gbsmake Scripts
3 System GBS_BLD_src_type File type Derived Object filetype swb   Scripts
4 Sub GBS_SUBSYS name Current SubSys More sws    
4 Sub GBS_SSTYPE GBS make MSVS Other Current SubSystem Type More sws    
4 Sub GBS_SUBSYS_PATH directory path SystemPath/dev/SUBSYS More sws    
4 Sub GBS_AUDIT_PATH directory path SystemPath/dev/SUBSYS/audit More sws    
4 Sub GBS_BUILD_PATH directory path SystemPath/dev/SUBSYS/build More sws    
4 Sub GBS_TOOL_PATH directory path SystemPath/dev/SUBSYS/tool More sws    
4 Sub GBS_EXPORT_PATH directory path SystemPath/dev/SUBSYS/export (OPT) More sws    
4 Sub GBS_IMPORT_PATH directory path SystemPath/dev/SUBSYS/import (OPT) More sws    
4 Sub GBS_COMP_PATH directory path SystemPath/dev/SUBSYS/comp More sws   SSTYPE==GBS
4 Sub GBS_APP_PATH directory path SystemPath/dev/SUBSYS/app More sws   SSTYPE!=GBS
4 Cmp GBS_COMPONENT_PATH directory path SystemPath/dev/SUBSYS/comp/COMPONENT More swc   SSTYPE==GBS
5 Cmp GBS_COMPONENT name Current Component More swc   SSTYPE==GBS
5 Ses GBS_FLAGS_type flags Predefine flags (-D...) More User User Scripts
6 Exe GBS_IGNORE_ERRORS 0 1 --i was specified More gbssysbuild gbssysmake   Scripts
6 Exe GBS_FLAGS_type flags or flags_file ref Flags (-D...) More gbssys* gbsbuild gbsaudit   Scripts
6 Exe GBS_SYSFLAGS_type flags or flags_file ref System Flags (-D...) More gbssys* gbsbuild gbsaudit   Scripts
6 Exe GBS_INCS_type includes or includes_file ref Include Flags (-I...) More gbssys* gbsbuild gbsaudit   Scripts
6 Exe GBS_BUILD_type Command Command to execute Build More gbssysbuild   Scripts
SSTYPE== make or Other
6 Exe GBS_AUDIT_type Command Command to execute Audit More gbssysbuild   Scripts
SSTYPE== make or Other
6 Exe GBS_MAKE_FLAGS -i or empty -i if GBS_IGNORE_ERRORS == 1 More gbssysbuild   Scripts
SSTYPE==make
6 Exe GBS_MSBUILD_CONFIG Debug Release or empty Depends on GBS_MODE More gbssysbuild   Scripts
SSTYPE==MSVS

GBSEXT_ EnvVars For SCMS Bottom Doc. Button Top Document Button Down Section Button Blank Down Chapter Button Up Chapter Button

The value must be either the directory where the SCMS is installed or PATH if the SCMS command(s) are in the PATH.

Note that the following table is sortable by the items in the top row.
EnvVar Name Required for
GBSEXT_GIT_PATH Git
GBSEXT_SVN_PATH Subversion

GBSEXT_ EnvVars For Plugins Bottom Doc. Button Top Document Button Blank Blank Blank Up Chapter Button

GBSEXT_... EnvVars define the location of external stuff (Plugins and External Data).
Usually 3 EnvVars are defined (Hard versioned directories):
  • GBSEXT_name_ROOT: Site dependent location
  • GBSEXT_name_REL: Release/version
  • GBSEXT_name_PATH: GBSEXT_name_ROOT/GBSEXT_name_REL
Just before executing the plugin the following GBSEXT_ EnvVar will be defined:
  • GBSEXT_name_BIN_PATH: GBSEXT_name_PATH/optional_bin_dir

Note that the following table is sortable by the items in the top row.
Type Plugin EnvVar Required Platform Remarks
Builder MinGW C GBSEXT_MINGW_GCC REL and PATH Win32  
Builder MinGW C/C++ GBSEXT_MINGW_CPP REL and PATH Win32  
Builder Microsoft Visual Studio 2012 - Simple Console C/C++ GBSEXT_MSVS2012_CONS REL and PATH Win32  
Builder Green Hills - BlackFin C/C++ GBSEXT_GHSBF REL and PATH Win32  
Builder GNU C GBSEXT_LGNU_GCC REL and PATH Linux  
Builder GNU C/C++ GBSEXT_LGNU_CPP REL and PATH Linux  
Audit PC-Lint C/C++ GBSEXT_PCLINT REL and PATH Win32  
Audit QAC GBSEXT_QAC REL and PATH Both  
Audit QAC++ GBSEXT_QACPP REL and PATH Both  
Tool Doxygen GBSEXT_DOXYGEN REL and PATH Both  

envvars.html