GBS Logo HOME Generic Build Support (GBS) - User Manual
Environment Variables (EnvVars) Bottom Doc. Button

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_
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   Define GBS N/A 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 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_BEEPS YES NO Beep More gbsinit gbssettings  
2 GBS GBS_NOTIFY YES NO Notify More gbsinit gbssettings  
2 GBS GBS_HOME_PATH directory path
My Documents or ~/
CWD when no System is current More gbsinit gbssettings  
2 GBS GBS_EDITOR command_path Editor to be used More gbsinit gbssettings  
2 GBS GBS_BROWSER command_path Browser to be used More gbsinit gbssettings  
2 GBS GBS_VIEWER command_path File viewer to be used More gbsinit gbssettings  
2 GBS GBS_ADMINISTRATOR System-names List Defines Administrator More gbsinit gbssettings Internal
2 GBS GBS_INTEGRATOR System-names List Defines Integrator More gbsinit gbssettings Internal
2 GBS GBS_TEMPLATES_PATH directory path External Templates path (OPT) More gbsinit swr site.gbs
switch.gbs
2 GBS GBS_MAKE command_path Alternative 'make' for Non-GBS Makefiles (OPT) More gbsinit swr site.gbs
switch.gbs
2 GBS GBS_SUBMIT command_path Alternative Submit (Background) (OPT) More gbsinit swr site.gbs
switch.gbs
2 GBS GBS_SUBWIN command_path Alternative Submit (Foreground) (OPT) More gbsinit swr site.gbs
switch.gbs
2 GBS GBS_BATCH command_path Alternative Batch command (OPT) More gbsinit swr site.gbs
switch.gbs
2 GBS GBS_BG_NOTIFIER command_path 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_PLATFORM Linux Win32 Current platform More gbsinit Predefined Scripts
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 GBS_VERSION version (e.g.: 4.00) The current GBS version number More gbsinit Predefined  
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_WA_PLUGINS_ROOT directory path For plugin-derived data   swr   Internal
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_SKIPTYPES 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_SCM_SKIPTYPES Regexp List Filetypes for Current SCMS 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_SYSFLAGS_type includes or includes_file ref System 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): Just before executing the plugin the following GBSEXT_ EnvVar will be defined:
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