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 |
Install a generic file into a subdirectory in the installation prefix
Install a generic file into a subdirectory in the installation prefix
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(installer_t), | intent(inout) | :: | self |
Instance of the installer |
||
character(len=*), | intent(in) | :: | source |
Path to the original file |
||
character(len=*), | intent(in) | :: | destination |
Path to the destination inside the prefix |
||
type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Install an executable in its correct subdirectory
Install an executable in its correct subdirectory
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(installer_t), | intent(inout) | :: | self |
Instance of the installer |
||
character(len=*), | intent(in) | :: | executable |
Path to the executable |
||
type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Install a header/module in its correct subdirectory
Install a header/module in its correct subdirectory
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(installer_t), | intent(inout) | :: | self |
Instance of the installer |
||
character(len=*), | intent(in) | :: | header |
Path to the header |
||
type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Install a library in its correct subdirectory
Install a library in its correct subdirectory
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(installer_t), | intent(inout) | :: | self |
Instance of the installer |
||
character(len=*), | intent(in) | :: | library |
Path to the library |
||
type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Create a new directory in the prefix, type-bound for unit testing purposes
Create a new directory in the prefix
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(installer_t), | intent(inout) | :: | self |
Instance of the installer |
||
character(len=*), | intent(in) | :: | dir |
Directory to be created |
||
type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Run an installation command, type-bound for unit testing purposes
Run an installation command
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(installer_t), | intent(inout) | :: | self |
Instance of the installer |
||
character(len=*), | intent(in) | :: | command |
Command to be launched |
||
type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
type :: installer_t
!> Path to installation directory
character(len=:), allocatable :: prefix
!> Binary dir relative to the installation prefix
character(len=:), allocatable :: bindir
!> Library directory relative to the installation prefix
character(len=:), allocatable :: libdir
!> Include directory relative to the installation prefix
character(len=:), allocatable :: includedir
!> Output unit for informative printout
integer :: unit = output_unit
!> Verbosity of the installer
integer :: verbosity = 1
!> Command to copy objects into the installation prefix
character(len=:), allocatable :: copy
!> Command to move objects into the installation prefix
character(len=:), allocatable :: move
!> Cached operating system
integer :: os
contains
!> Install an executable in its correct subdirectory
procedure :: install_executable
!> Install a library in its correct subdirectory
procedure :: install_library
!> Install a header/module in its correct subdirectory
procedure :: install_header
!> Install a generic file into a subdirectory in the installation prefix
procedure :: install
!> Run an installation command, type-bound for unit testing purposes
procedure :: run
!> Create a new directory in the prefix, type-bound for unit testing purposes
procedure :: make_dir
end type installer_t