Implementation of an installer object.
The installer provides a way to install objects to their respective directories in the installation prefix, a generic install command allows to install to any directory within the prefix.
Declaration of the installer type
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=:), | public, | allocatable | :: | bindir |
Binary dir relative to the installation prefix |
||
character(len=:), | public, | allocatable | :: | copy |
Command to copy objects into the installation prefix |
||
character(len=:), | public, | allocatable | :: | includedir |
Include directory relative to the installation prefix |
||
character(len=:), | public, | allocatable | :: | libdir |
Library directory relative to the installation prefix |
||
character(len=:), | public, | allocatable | :: | move |
Command to move objects into the installation prefix |
||
integer, | public | :: | os |
Cached operating system |
|||
character(len=:), | public, | allocatable | :: | prefix |
Path to installation directory |
||
integer, | public | :: | unit | = | output_unit |
Output unit for informative printout |
|
integer, | public | :: | verbosity | = | 1 |
Verbosity of the installer |
procedure , public , :: install Subroutine | Install a generic file into a subdirectory in the installation prefix |
procedure , public , :: install_executable Subroutine | Install an executable in its correct subdirectory |
procedure , public , :: install_header Subroutine | Install a header/module in its correct subdirectory |
procedure , public , :: install_library Subroutine | Install a library in its correct subdirectory |
procedure , public , :: make_dir Subroutine | Create a new directory in the prefix, type-bound for unit testing purposes |
procedure , public , :: run Subroutine | Run an installation command, type-bound for unit testing purposes |
Create a new instance of an installer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(installer_t), | intent(out) | :: | self |
Instance of the installer |
||
character(len=*), | intent(in), | optional | :: | prefix |
Path to installation directory |
|
character(len=*), | intent(in), | optional | :: | bindir |
Binary dir relative to the installation prefix |
|
character(len=*), | intent(in), | optional | :: | libdir |
Library directory relative to the installation prefix |
|
character(len=*), | intent(in), | optional | :: | includedir |
Include directory relative to the installation prefix |
|
integer, | intent(in), | optional | :: | verbosity |
Verbosity of the installer |
|
character(len=*), | intent(in), | optional | :: | copy |
Copy command |
|
character(len=*), | intent(in), | optional | :: | move |
Move command |