Procedures

ProcedureLocationProcedure TypeDescription
add_dependencyfpm_targetsSubroutine

Add pointer to dependeny in target%dependencies

add_executable_sourcesfpm_sourcesSubroutine

Add to sources using the executable and test entries in the manifest and applies any executable-specific overrides such as executable%name. Adds all sources (including modules) from each executable%source_dir

add_sources_from_dirfpm_sourcesSubroutine

Add to sources by looking for source files in directory

add_targetfpm_targetsSubroutine

Allocate a new target and append to target list

bad_name_errorfpm_errorFunction
basenamefpm_filesystemFunction

Extract filename from path with/without suffix

build_modelfpmSubroutine
build_packagefpm_backendSubroutine

Top-level routine to build package described by model

canon_pathfpm_filesystemFunction

Canonicalize path for comparison * Handles path string redundancies * Does not test existence of path

Read more…
change_directoryfpm_osSubroutine
charfpm_versioningInterface
check_compilerfpm_compilerFunction
check_modules_for_duplicatesfpmSubroutine
checkoutfpm_gitSubroutine
cmd_buildfpmSubroutine
cmd_installfpm_cmd_installSubroutine

Entry point for the fpm-install subcommand

cmd_newfpm_cmd_newSubroutine

TOP DIRECTORY NAME PROCESSING see if requested new directory already exists and process appropriately temporarily change to new directory as a test. NB: System dependent

cmd_runfpmSubroutine
cmd_updatefpm_cmd_updateSubroutine

Entry point for the update subcommand

compile_cfpm_compilerSubroutine

Compile a C object

compile_fortranfpm_compilerSubroutine

Compile a Fortran object

debugfpm_compilerInterface

Create debug printout

debug_archiverfpm_compilerFunction

String representation of an archiver object

debug_compilerfpm_compilerFunction

String representation of a compiler object

default_examplefpm_manifestSubroutine

Populate test in case we find the default example/ directory

default_executablefpm_manifestSubroutine

Populate executable in case we find the default app directory

default_libraryfpm_manifestSubroutine

Populate library in case we find the default src directory

default_testfpm_manifestSubroutine

Populate test in case we find the default test/ directory

delete_filefpm_filesystemSubroutine

delete a file by filename

dirnamefpm_filesystemFunction

Extract dirname from path

enumerate_librariesfpm_compilerFunction

Enumerate libraries, based on compiler and platform

env_variablefpm_filesystemSubroutine

return value of environment variable

existsfpm_filesystemFunction

test if pathname already exists

f_stringfpm_stringsFunction

return Fortran character variable when given a C-like array of single characters terminated with a C_NULL_CHAR character

fatal_errorfpm_errorSubroutine

Generic fatal runtime error

file_not_found_errorfpm_errorSubroutine

Error created when a file is missing or not found

file_parse_errorfpm_errorSubroutine

Error created when file parsing fails

fileclosefpm_filesystemSubroutine

simple close of a LUN. On error show message and stop (by default)

fileopenfpm_filesystemSubroutine

procedure to open filename as a sequential “text” file

filewritefpm_filesystemSubroutine

procedure to write filedata to file filename

filter_executable_targetsfpm_targetsSubroutine
filter_library_targetsfpm_targetsSubroutine
filter_modulesfpm_targetsSubroutine
fnv_1afpm_stringsInterface
fpm_stopfpm_errorSubroutine
get_command_arguments_quotedfpm_environmentFunction
get_command_line_settingsfpm_command_lineSubroutine

! canon_path is not converting “.”, etc. & ‘ unknown help topic “’//trim(unnamed(i)).’not found in:’,manual]

get_compiler_idfpm_compilerFunction
get_current_directoryfpm_osSubroutine
get_debug_compile_flagsfpm_compilerSubroutine
get_default_c_compilerfpm_compilerSubroutine
get_default_flagsfpm_compilerFunction
get_envfpm_environmentFunction

get named environment variable value. It it is blank or not set return the optional default value !print , NAME, ” is not defined in the environment. Strange…” !print , “This processor doesn’t support environment variables. Boooh!”

get_idfpm_compilerFunction
get_include_flagfpm_compilerFunction
get_listfpm_tomlSubroutine
get_module_flagfpm_compilerFunction
get_os_typefpm_environmentFunction

Determine the OS type

Read more…
get_package_datafpm_manifestSubroutine

Obtain package meta data from a configuation file

get_release_compile_flagsfpm_compilerSubroutine
get_temp_filenamefpm_filesystemFunction

Get a unused temporary filename Calls posix ‘tempnam’ - not recommended, but we have no security concerns for this application and use here is temporary. Works with MinGW

get_working_dirmainSubroutine

Save access to working directory in settings, in case setting have not been allocated

getlinefpm_filesystemSubroutine

read a line of arbitrary length into a CHARACTER variable from the specified LUN

git_revisionfpm_gitSubroutine
git_target_branchfpm_gitFunction

Target a branch in the git repository

git_target_defaultfpm_gitFunction

Default target

git_target_revisionfpm_gitFunction

Target a specific git revision

git_target_tagfpm_gitFunction

Target a git tag

globfpm_stringsFunction

glob(3f) compares given STRING for match to PATTERN which may contain wildcard characters.

Read more…
handle_errormainSubroutine
has_manifestmainFunction
infofpm_gitSubroutine

Show information on git target

is_dirfpm_filesystemFunction

test if a name matches an existing directory path

is_fortran_namefpm_stringsFunction
is_unknownfpm_compilerFunction
joinfpm_stringsFunction

JOIN(3f) appends the elements of a CHARACTER array into a single CHARACTER variable, with elements 1 to N joined from left to right. By default each element is trimmed of trailing spaces and the default separator is a null string.

Read more…
join_pathfpm_filesystemFunction

Construct path by joining strings with os file separator

len_trimfpm_stringsInterface
linkfpm_compilerSubroutine

Link an executable

list_filesfpm_filesystemSubroutine

Get file & directory names in directory dir using iso_c_binding.

Read more…
lowerfpm_stringsFunction

Changes a string to lowercase over optional specified column range

make_archivefpm_compilerSubroutine

Create an archive

mkdirfpm_filesystemSubroutine

Create a directory. Create subdirectories as needed

new_archiverfpm_compilerSubroutine

Create new archiver instance

new_build_configfpm_manifest_buildSubroutine

Construct a new build configuration from a TOML data structure

new_compilerfpm_compilerSubroutine

Create new compiler instance

new_dependenciesfpm_manifest_dependencySubroutine

Construct new dependency array from a TOML data structure

new_dependencyfpm_manifest_dependencySubroutine

Construct a new dependency configuration from a TOML data structure

new_dependency_nodefpm_dependencySubroutine

Create a new dependency node from a configuration

new_dependency_treefpm_dependencySubroutine

Create a new dependency tree

new_examplefpm_manifest_exampleSubroutine

Construct a new example configuration from a TOML data structure

new_executablefpm_manifest_executableSubroutine

Construct a new executable configuration from a TOML data structure

new_install_configfpm_manifest_installSubroutine

Create a new installation configuration from a TOML data structure

new_installerfpm_installerSubroutine

Create a new instance of an installer

new_libraryfpm_manifest_librarySubroutine

Construct a new library configuration from a TOML data structure

new_packagefpm_manifest_packageSubroutine

Construct a new package configuration from a TOML data structure

new_testfpm_manifest_testSubroutine

Construct a new test configuration from a TOML data structure

new_versionfpm_versioningInterface
notabsfpm_stringsSubroutine

notabs(3f) - [fpm_strings:NONALPHA] expand tab characters (LICENSE:PD)

Read more…
number_of_rowsfpm_filesystemFunction

Determine number or rows in a file given a LUN

operator(.in.)fpm_stringsInterface
os_is_unixfpm_environmentFunction

Compare the output of get_os_type or the optional passed INTEGER value to the value for OS_WINDOWS and return .TRUE. if they match and .FALSE. otherwise

parent_dirfpm_filesystemFunction

Extract dirname from path

parse_c_sourcefpm_source_parsingFunction

Parsing of c source files

Read more…
parse_f_sourcefpm_source_parsingFunction

Parsing of free-form fortran source files

Read more…
read_linesfpm_filesystemFunction

read lines into an array of TYPE(STRING_T) variables

read_lines_expandedfpm_filesystemFunction

read lines into an array of TYPE(STRING_T) variables expanding tabs

read_package_filefpm_tomlSubroutine

Process the configuration file to a TOML data structure

replacefpm_stringsFunction

Returns string with characters in charset replaced with target_char.

resizefpm_stringsInterface
resizefpm_dependencyInterface

Overloaded reallocation interface

resolve_module_dependenciesfpm_targetsSubroutine

Add dependencies to source-based targets (FPM_TARGET_OBJECT) based on any modules used by the corresponding source file.

Read more…
resolve_target_linkingfpm_targetsSubroutine

Construct the linker flags string for each target target%link_flags includes non-library objects and library flags

runfpm_environmentSubroutine

echo command string and pass it to the system for execution

schedule_targetsfpm_backendSubroutine

Construct a build schedule from the sorted targets.

Read more…
separatorfpm_environmentFunction

sample usage

Read more…
show_modelfpm_modelSubroutine
sort_targetfpm_backendSubroutine

Topologically sort a target for scheduling by recursing over its dependencies.

Read more…
splitfpm_stringsSubroutine

parse string on delimiter characters and store tokens into an allocatable array given a line of structure ” par1 par2 par3 … parn ” store each par(n) into a separate variable in array.

Read more…
strfpm_stringsInterface
str_ends_withfpm_stringsInterface
string_array_containsfpm_stringsFunction

Check if array of TYPE(STRING_T) matches a particular CHARACTER string

string_catfpm_stringsFunction

Concatenate an array of type(string_t) into a single CHARACTER variable

string_tfpm_stringsInterface
syntax_errorfpm_errorSubroutine
targets_from_sourcesfpm_targetsSubroutine

High-level wrapper to generate build target information

to_fortran_namefpm_stringsFunction

Returns string with special characters replaced with an underscore. For now, only a hyphen is treated as a special character, but this can be expanded to other characters if needed.

unix_pathfpm_filesystemFunction

Replace file system separators for 1

warnwritefpm_filesystemSubroutine

write trimmed character data to a file if it does not exist

whichfpm_filesystemFunction
windows_pathfpm_filesystemFunction

Replace file system separators for windows

write_response_filefpm_compilerSubroutine

Response files allow to read command line options from files. Whitespace is used to separate the arguments, we will use newlines as separator to create readable response files which can be inspected in case of errors.