The following diagram gives an total overview of the top part of GBS directory structure.
Full Complient GBS
The following diagram gives an overview of the Full-GBS complient directory structure.
Non Complient GBS
The following diagram gives an overview of the Non-GBS complient directory structure.
Directory creation
Please note that GBS maintains it's own directory structure, assuring consistency. Never create GBS directories yourself. Let the GBS commands take care of that.
The System directory
GBS_SYSTEM_PATH
This is the base of the whole directory structure. It contains all that is necessary to build a
multi-SubSystem system.
Nine directories are mandatory for GBS: res, dev, ext,
sys, sysbuild, sysaudit, systool, silo and tmp.
More directories may be added. E.g. doc for documentation, etc.
The 'res' directory
GBS_SYSTEM_PATH/res
The functionality of this directory is explained in Top Level Directory Structure → res.
It is used to control the exchange of deliverables between SubSystems.
The 'dev' directory
GBS_SYSTEM_PATH/dev
This directory contains all and only SubSystems.
The 'ext' directory
GBS_SYSTEM_PATH/ext
This directory contains the directories of all 3-rd party software that is to be used by all or most
of the SubSystems.
The 'silo' directory
GBS_SYSTEM_PATH/silo
Here data is stored that is generated outside the Component structure and should be kept. E.g. doxygen output.
Each Tool has its own directory.
The command gbssilo will display any content in HTML format in a
browser
The 'sys' directory
GBS_SYSTEM_PATH/sys
This directory contains all common items (scripts, tables, etc) for sysbuild, sysaudit and systool
e.g.: steps.gbs
It also contains a mandatory templates directory to hold user defined File Templates.
(Templates)
The 'sysbuild' directory
GBS_SYSTEM_PATH/sysbuild
This directory contains all items (scripts, tables, etc) for Building
e.g.: gcc, mingw, etc
It also contains a mandatory makemake_stubs directory, with subdirectories per Build, to hold stubs for external files to satisfy
gbsmakemake.
The 'sysaudit' directory
GBS_SYSTEM_PATH/sysaudit
This directory contains all items (scripts, tables, etc) for Auditing (SCA)
e.g.: qac, qac++, pclint, cpptest, etc
The 'systool' directory
GBS_SYSTEM_PATH/systool
This directory contains all items (scripts, tables, etc) for additional Tooling (e.g. doxygen)
The 'tmp' directory
GBS_SYSTEM_PATH/tmp
Here GBS places its temporary files.
When something goes wrong GBS will not delete its tmp files, so you can check what went wrong.
After 7 days they will be deleted when you make this System current.
It is always safe to cleanup this directory when no generations are running.
There is an entry in gbsmaint that will do that.
The SubSystem directory
GBS_SYSTEM_PATH/dev/GBS_SUBSYS
This is the top of a basic generation-unit.
The SubSystem directory may have any number of Sub-Directories and files.
The directories audit, export, build and tool are mandatory for all types of SubSystems.
The directory comp is mandatory for Full-GBS SubSystems.
The directory app is mandatory for Non-Full-GBS SubSystems.
The following names are reserved for all SubSystems: import,
gbs*.* and *.gbs.
The 'export' directory
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/export
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/export/GBS_BUILD
After the build of the SubSystem, this directory will contain the files and directories that are the
end-deliverables of this SubSystem.
Items in the export directory are always generated/copied items, so they can be deleted at any time.
The 'import' directory
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/import
This directory contains directories that hold deliverables from outside the System.
This is usually 3-rd party software only used by this SubSystem.
It is used rarely.
The 'build' directory
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/build GBS_SYSTEM_PATH/dev/GBS_SUBSYS/build/GBS_BUILD
This directory contains information for the generation of the SubSystem.
For each BuildStream that this SubSystem generates a sub-directory of the Build-name is required.
Else this SubSystem will not generate for that particular BuildStream.
These directories may contain a number of files that give information on SubSystem level.
These include:
Option-files (flags-files).
To define compile / link options per platform / language / variant.
External-ref files (incs-files).
To specify directory-paths for SubSystem external software
All files and directories in these directories reside under the responsibility of the GBS Administrator
in co-ordination with the architect(s) responsible for the SubSystem. They are the only ones allowed to
modify these files.
The 'audit' directory
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/audit GBS_SYSTEM_PATH/dev/GBS_SUBSYS/audit/GBS_AUDIT/GBS_BUILD
This directory contains information for the Auditing of the SubSystem.
For each Audit & Build combination that this SubSystem generates a sub-directory of the Audit-name/Build-name is required.
Else this SubSystem will not audit for that particular Audit & Build combination.
All files and directories in these directories reside under the responsibility of the GBS Administrator
in co-ordination with the architect(s) responsible for the SubSystem. They are the only ones allowed to
modify these files.
The 'tool' directory
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/tool
This directory contains information for the Step-Command execution.
For each Step-Command Tool that this SubSystem runs a sub-directory of the Tool-name is required.
Else that particular Step-Command Tool will not run for this SubSystem.
All files and directories in these directories reside under the responsibility of the GBS Administrator
in co-ordination with the architect(s) responsible for the SubSystem. They are the only ones allowed to
modify these files.
The 'comp' directory
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/comp Full GBS only.
This directory contains all and only Component directories. The name is reserved and is used only for Full GBS SubSystems.
The only directories it contains are the Component directories that are to be recognised as under control
of GBS.
The 'app' directory
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/app Non-Full GBS only.
This directory contains the top of the Non-GBS projects/applications directories. The name is reserved and is used only for Non-Full GBS SubSystems.
The Component directories (Full GBS only)
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/comp/GBS_COMPONENT
These directories contain the Component-Subdirectories. No other directories than the Sub-Directories
specified below are allowed here.
As far as GBS is concerned, Component names are free, except for ALL, EXPORT and RES.
The project however, will impose rules on names here.
You can have as many Components as you wish.
They also contain a number of files that give information on Component level:
A scope file (scope.gbs).
To define the scope of the various Components. The file shows for this Component,
which Components may be accessed (included).
Export-file (export.gbs). To define the items in the Sub-Directories to be copied to the 'export' and/or 'res'
directories.
Please bear in mind that a GBS Component is not necessarily an architectural Component.
The 'src' sub-directory
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/comp/GBS_COMPONENT/src
It contains all files that will lead to the generation of corresponding files in a 'bld'
Build-directory.
Files in this directory form the basis of the generation process. This means that the presence of a file
in the src directory indicates that a step of the build-process must be executed with that file as main
input.
As a result of this all files that have to be compiled (or processed) must reside in this directory. If a
file is not placed in this directory it will not be a part of the build process (compiled).
Note that header-files are not compiled. They are included.
Rules:
Only files in this directory will generate files in the 'bld' Build-directory.
Any file in this directory must generate at least one file with the same name in the 'bld'
Build-directory. (File-extensions may differ)
Any file in this directory is a candidate for a 'make-dependency' script.
No Subdirectories are allowed.
The 'inc' sub-directory
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/comp/GBS_COMPONENT/inc
It contains the files that are needed in the generation process but do not belong in the 'src'
directory because their presence does not lead to the invocation of a processor (compiler, linker) in the
build-process (and do not lead to a file with the same name in the 'bld' Sub-Directories).
Files in this directory will be accessible from other Components. (#include)
This means that all 'included' files like global header-files or API header-files must be placed in this
directory.
Rules:
This directory will be included in the search-path for a compile or link.
Any file in this directory is a candidate for the 'make-dependency' script.
No Subdirectories are allowed.
The 'loc' sub-directory
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/comp/GBS_COMPONENT/loc
It contains the files that are needed in the generation process but do not belong in the 'src' directory
because their presence does not lead to the invocation of a processor (compiler, linker) in the
build-process (and do not lead to a file with the same name in the 'bld' Sub-Directories).
Files in this directory will not be accessible from other Components
This means that all 'included' files like local header-files must be placed in this directory.
Rules:
This directory will be included in the search-path for a compile or link, but only for the
current Component.
Any file in this directory is a candidate for the 'make-dependency' script.
No Subdirectories are allowed.
The 'aud' sub-directory with Autit/Build-directories
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/comp/GBS_COMPONENT/aud
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/comp/GBS_COMPONENT/aud/GBS_AUDIT/GBS_BUILD
The 'aud' directory acts a placeholder for the Audit-directories.
The Audit/Build-directories contain the resulting files of Audits triggered by files in the 'src'
directory.
This means that these directories will contain any derived files.
Rules for Audit/Build-directories:
These directories may only contain files generated from the 'src' directory.
All files generated from the 'src' directory are placed in each of these directories.
Each file in each of these directories has a counterpart in the 'src' directory by the same name.
(file-extension may differ).
The presence of a Audit/Build directory indicates that all files in the 'src' directory must be
Audited for that Audit and Build.
The 'opt' sub-directory with optional Build-directories
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/comp/GBS_COMPONENT/opt
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/comp/GBS_COMPONENT/opt/GBS_BUILD
This directory contains information for the generation of the Component.
For each BuildStream that this Component generates a sub-directory of the Build-name can be present to
specify exceptions.
These directories contain a number of files that give information on Component level:
Option-files. To define compile / link options per platform / language / variant.
External-ref files. To specify directory-paths for external software (outside any SubSystem)
The 'dat' sub-directory
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/comp/GBS_COMPONENT/dat
It contains all other (developer) files that do not fit in any of the Sub-directories mentioned before.
Examples are:
GBS_SYSTEM_PATH/dev/GBS_SUBSYS/comp/GBS_COMPONENT/sav
Contains files that in no way perform a role in the build process, but still have to be kept (saved).
This is the place to keep obsolete files like test-files that are not maintained anymore.