See /usr/share/doc/debhelper/PROGRAMMING.md on general design of debhelper.
This follows that design.

For convenience of Python code, dhfortran/debhelper.py implements Python equivalents of any Perl debhelper routines we use.

The scripts are written in Python for ease of development and testing. The package provides:
  * dh_fortran_mod: Move Fortran-module files to per-compiler directories
  * dh_fortan_lib: Ditto for libraries, but also change SONAMES
  * dh_fortran_pkgconf: rewrite pkgconfig files to match the above
  * dh_fortran: overall builder script

See manual pages for each.



Targets are called with FC, FCFLAGS, FMODDIR, FC_DEFAULT, FLIBDIR set as appropriate


Potential FPM Integration:
 * dh-fortran executes fpm where fpm.toml is present
 *  check fortran-fpm in environment
 *  fpm search plugin for Apt/dpkg integration
    fpm will use / install modules if they exist in Debian; alert missing modules


Multicompiler builds will be triggered by:
* Presence of FC_DEFAULT, FC_OPTIONAL in the environment
* presence of *.fortran-mod or *fortran-lib files in debian

ISSUES:
 * fpm only works with one builddirectory ./build
   This will be fixed in the next release
