GBS Logo HELP HOME Generic Build Support (GBS) - User Manual
The glk/glb/glt files 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


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

Description
Example of a glb file
Example of a glk file
Example of a glt file

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

The glkbt files (.glb, .glk, .glt and others) are located in the src, loc and/or inc directories and are used to specify the behaviour of builders that traditionally do not have 'source'-files, like Linkers and Archivers.

General Bottom Doc. Button Top Document Button Down Section Button Up Section Button Down Chapter Button Blank

General considerations:
  • Trailing white-space is ignored.
  • Empty lines are ignored
  • Lines starting with '#' are considered comments and are ignored.
  • The syntax is line-oriented.
  • Leading white-space is significant.
  • The .builds directive can be used to skip execution and generate a dummy-file

Syntax Bottom Doc. Button Top Document Button Down Section Button Up Section Button Down Chapter Button Up Chapter Button

[ special_char ] content [ build_line_selector ]
special_char := . | $ | % | - | / | ^ | + | =

Lines can be appended with a Build Selector enabling skipping of the line dependent on the current Build.
Refer to GBS-files: General for explanation of the build_line_selector mechanism. The first (special-)character on a line specifies it's function:

Lines starting with '.':
Directives for the glkbt pre-processor:
.include file | "file" | 'file' | <file>
Lines starting with '$' or '%'
Specify absolute files-specs via Environment Variables
Passed as-is
Lines starting with '-' or '/' (Windows only)
Specify options for the post-processor (builder)
Passed as-is
Words with a dot will be passed to gbsmakemake for dependencies
Lines starting with '^'
Are passed as-is without the leading '^'
No further actions
Lines starting with '+'
Specify libraries or files to be found via the incs_type.gbs search path
Passed without the '+'
Lines with a dot will be passed to gbsmakemake for dependencies
Lines starting with '='
Specify config-type files found via the .include search path
Passed without the '='
Words with a dot will be prefixed with the found relative path and will be passed to gbsmakemake for dependencies
Other lines:
Specify files from the Component-build-build directories:
Same Component: file-comma-list
Other Component: Component:file-comma-list

Any line can be appended with a Build selector enabling skipping of the line dependent on the current Build. Refer to GBS-files: General for explanation of the build-line-selection mechanism.

Semantics: Bottom Doc. Button Top Document Button Down Section Button Up Section Button Down Chapter Button Up Chapter Button

Include:
No path specification allowed
Files will be searched in inc and loc directories
File extensions:
During processing all the GBS_BLD_src_type environment variables for the current Build are set.
You should create generic glk/glb/glt files suitable for various Builds by using these variables instead of the fixed text.
i.e.:
file1$GBS_BLD_C → file1.o or file1.obj
file2$GBS_BLD_ASM → file2.o or file2.obj
file3$GBS_BLD_GLB → file3.a or file3.lib

Notes: Bottom Doc. Button Top Document Button Down Section Button Up Section Button Blank Up Chapter Button

None

Example of a glb file: Bottom Doc. Button Top Document Button Down Section Button Up Section Button

    #======================================
    #   Src-File:   software.glb
    #   Component:  software
    #   SubSys:     product_s
    #======================================
    main$GBS_BLD_C
    
    #======================================
    #   Other Components
    #======================================
    otv_arm:arm1$GBS_BLD_C
    otv_arm:arm2$GBS_BLD_C
    
    
    ###EOF###
    
    

Example of a glk file: Bottom Doc. Button Top Document Button Down Section Button Up Section Button

    #======================================
    #   Src-File:   total_cze.glk
    #   Component:  software
    #   SubSys:     product_s
    #======================================
    main$GBS_BLD_C
    main_country_cze$GBS_BLD_C
    rom_cze_gnu$GBS_BLD_C            = gnu
    rom_cze_arm$GBS_BLD_C            = arm
    
    software.lib
    
    #======================================
    #   Other Components
    #======================================
    obs:occ$GBS_BLD_C
    obs:saoc$GBS_BLD_GLK
    
    #======================================
    #   Externals
    #======================================
    .include total_libs.glk
    
    +rmgr_upc$GBS_BLD_GLB
    +country_czech$GBS_BLD_C
    +caxxconfiguration_cze$GBS_BLD_C
    +dvbst_stub$GBS_BLD_GLB
    
    ###EOF###
    

Example of a glt file: Bottom Doc. Button Top Document Button Blank Up Section Button

    #========================================
    #   File:       hello.glt
    #   Component:  test
    #   SubSystem:  superglo
    #   System:     SuperGlo_OK
    #========================================
    .builds=mingw,mingwd
    ^timeout=3
    hello$GBS_BLD_GLK
    -par1
    +PAR2
    
    ##EOF##
    
    

glkb.html