GBS Logo HELP HOME Generic Build Support (GBS) - User Manual
Development 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

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

This section describes some basic development aspects of GBS.

Choice of Language Bottom Doc. Button Top Document Button Down Section Button Up Section Button Down Chapter Button Blank

GBS is written in Perl.
I needed a language that will execute exactly the same on various computers (at that time Windows and UNIX), without being depended on installed libraries.
When I started developing GBS in 2001 the best choice was Perl.
Should I start developing now I would probably chose Python.

Quality Assurance Bottom Doc. Button Top Document Button Down Section Button Up Section Button Down Chapter Button Up Chapter Button

perlcritic

Running perlcritic yields the following results for this version:
    ----
    
       335 files.
     5,603 subroutines/methods.
    80,795 statements.
    
    139,611 lines, consisting of:
        15,423 blank lines.
        36,049 comment lines.
    	68 data lines.
        85,725 lines of Perl code.
         2,346 lines of POD.
    
    Average McCabe score of subroutines was 3.25.
    
    0 violations.
    Violations per file was 0.000.
    Violations per statement was 0.000.
    Violations per line of code was 0.000.
    
    ----
    

I do use function prototypes, but only with $ and @. Never with \.

Checks

Some proprietary programs (perlxref and perlcheck) are used to detect:
  • Unused 'use' statements
  • Missing 'use' statements
  • Unused functions
  • Missing functions

  • Unused global variables
  • Active (Uncommented) trace/debug statements

Help

Command help (--help) and Help File All Commands are created directly from the code so there is no mismatch.

Design Considerations Bottom Doc. Button Top Document Button Blank Up Section Button Blank Up Chapter Button

  • It must be fast.
    Hence command-line interface and no frills.
    Some standard packages duplicated and reduced to cater only for Windows and Linux.
    The Perl code is 'compiled' replacing comment-lines by blank lines and removing leading white-space. This makes the files smaller and that reduces disk I/O and parsing.
  • Only dependent on plain Perl with standard packages.
    No extra CPAN installs. No separately installs of any utilities (except of course your compiler-suite).
  • Must run exactly the same on Windows and Linux.
  • Straight forward. No exceptions.
  • Keep it simple.
  • TBS

development.html