Next: GNU Public License, Previous: Tools Supporting Project Files, Up: Top [Contents][Index]
GPRbuild
is a generic build tool designed for the construction of
large multi-language systems organized into subsystems and libraries.
It is well-suited for compiled languages supporting separate compilation,
such as Ada, C, C++ and Fortran.
GPRbuild
manages a three step build process.
Each compilation unit of each subsystem is examined in turn, checked for consistency, and compiled or recompiled when necessary by the appropriate compiler. The recompilation decision is based on dependency information that is typically produced by a previous compilation.
Compiled units from a given language are passed to a language-specific post-compilation tool if any. Also during this phase objects are grouped into static or dynamic libraries as specified.
All units or libraries from all subsystems are passed to a linker tool specific to the set of toolchains being used.
The tool is generic in that it provides, when possible, equivalent build capabilities for all supported languages. For this, it uses a configuration file <file>.cgpr that has a syntax and structure very similar to a project file, but which defines the characteristics of the supported languages and toolchains. The configuration file contains information such as:
On the other hand, GPRbuild
is not a replacement for general-purpose
build tools such as make
or ant
which give the user a high
level of control over the build process itself. When building a system
requires complex actions that do not fit well in the three-phase process
described above, GPRbuild
might not be sufficient.
In such situations, GPRbuild
can still
be used to manage the appropriate part of the build. For
instance it can be called from within a Makefile.