Next: , Previous: Naming Schemes, Up: Building With Projects


5.2.10 Installation

After building an application or a library it is often required to install it into the development environment. For instance this step is required if the library is to be used by another application. The `gprinstall' tool provides an easy way to install libraries, executable or object code generated during the build. The `Install' package can be used to change the default locations.

The following attributes can be defined in package Install:

`Active'
Whether the project is to be installed, values are true (default) or false.

`Artifacts'

An array attribute to declare a set of files not part of the sources to be installed. The array discriminant is the directory where the file is to be installed. If a relative directory then Prefix (see below) is prepended.

`Prefix':

Root directory for the installation.

`Exec_Subdir'

Subdirectory of `Prefix' where executables are to be installed. Default is `bin'.

`Lib_Subdir'

Subdirectory of `Prefix' where directory with the library or object files is to be installed. Default is `lib'.

`Sources_Subdir'

Subdirectory of `Prefix' where directory with sources is to be installed. Default is `include'.

`Project_Subdir'

Subdirectory of `Prefix' where the generated project file is to be installed. Default is `share/gpr'.

`Mode'

The installation mode, it is either `dev' (default) or `usage'. See `gprbuild' user's guide for details.

`Install_Name'

Specify the name to use for recording the installation. The default is the project name without the extension.