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 |
||
character(len=:), | public, | allocatable | :: | testdir |
Test program directory relative to the installation prefix |
||
integer, | public | :: | unit | = | output_unit |
Output unit for informative printout |
|
integer, | public | :: | verbosity | = | 1 |
Verbosity of the installer |
procedure, public :: install | ../../ Install a generic file into a subdirectory in the installation prefix |
procedure, public :: install_executable | ../../ Install an executable in its correct subdirectory |
procedure, public :: install_header | ../../ Install a header/module in its correct subdirectory |
procedure, public :: install_library | ../../ Install a library in its correct subdirectory |
procedure, public :: install_test | ../../ Install a test program in its correct subdirectory |
procedure, public :: make_dir | ../../ Create a new directory in the prefix, type-bound for unit testing purposes |
procedure, public :: run | ../../ 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 |
|
character(len=*), | intent(in), | optional | :: | testdir |
Test 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 |