fpm_installer Module

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.



Derived Types

type, public ::  installer_t

Declaration of the installer type

Components

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

Type-Bound Procedures

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 :: 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


Subroutines

public subroutine new_installer(self, prefix, bindir, libdir, includedir, verbosity, copy, move)

Create a new instance of an installer

Arguments

Type IntentOptional 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