aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLKedward <laurence.kedward@bristol.ac.uk>2020-12-07 14:55:36 +0000
committerLKedward <laurence.kedward@bristol.ac.uk>2020-12-07 14:55:36 +0000
commit2cb423844ad96aaeab427e017c05b7143648f096 (patch)
tree0a2dfef9fead809672abd98aa0a982be791bf857
parent9091cf5a7079c963c4f840c168705d22d9591a53 (diff)
downloadfpm-2cb423844ad96aaeab427e017c05b7143648f096.tar.gz
fpm-2cb423844ad96aaeab427e017c05b7143648f096.zip
Document fpm_model
-rw-r--r--fpm/src/fpm.f902
-rw-r--r--fpm/src/fpm_model.f9015
2 files changed, 15 insertions, 2 deletions
diff --git a/fpm/src/fpm.f90 b/fpm/src/fpm.f90
index b94d25f..98af95d 100644
--- a/fpm/src/fpm.f90
+++ b/fpm/src/fpm.f90
@@ -22,7 +22,7 @@ use,intrinsic :: iso_fortran_env, only : stdin=>input_unit, &
use fpm_manifest_dependency, only: dependency_config_t
implicit none
private
-public :: cmd_build, cmd_install, cmd_run
+public :: build_model, cmd_build, cmd_install, cmd_run
contains
diff --git a/fpm/src/fpm_model.f90 b/fpm/src/fpm_model.f90
index 9e495ee..f0c8a1e 100644
--- a/fpm/src/fpm_model.f90
+++ b/fpm/src/fpm_model.f90
@@ -1,5 +1,18 @@
+!># The fpm package model
+!>
+!> Defines the fpm model data types which encapsulate all information
+!> required to correctly build a package and its dependencies.
+!>
+!> The process (see `[[build_model(subroutine)]]`) for generating a valid `[[fpm_model]]` is as follows:
+!>
+!> 1. Source files are discovered ([[fpm_sources]]) and parsed ([[fpm_source_parsing]])
+!> 2. A list of build targets is generated (`[[targets_from_sources]]`) from the sources
+!> 3. Inter-target dependencies are resolved (`[[resolve_module_dependencies]]`) based on modules used and provided
+!> 4. Object link lists are generated for link targets (executables and libraries) (`[[resolve_target_linking]]`)
+!>
+!> Once a valid `[[fpm_model]]` has been constructed, it may be passed to `[[fpm_backend:build_package]]` to
+!> build the package.
module fpm_model
-! Definition and validation of the backend model
use iso_fortran_env, only: int64
use fpm_strings, only: string_t
implicit none