Add dh-fortran-mod support for generic fortran compilers (ifx, etc).
dh_fortran_mod will be expanded to find mod files automatically from the debian/tmp directory. It
will enable the installation of mod files in parallel for multiple compilers. It will install .smod
files for Fortran 2018.
The fortran-mod file syntax follows dh_install: pairs of sources and optional target directories.
The default directory will be $fmoddir ( /usr/lib/$multiarch/fortran/$compiler_mod_directory/) If the
target directory is absolute (starts with a '/'), this directory is used in the target package. If
the target does not absolute, it will be treated as a subdirectory of $fmoddir.
Currently four flavours of Fortran compiler are supported: gfortran-* ('gfortran'), flang-new-*
('flang') , flang-to-external-fc-* ('flangext') and lfortran ('lfortran').
$compiler_mod_directory is based on the compiler module version: currently gfortran-mod-15 for
gfortran-14 (and older), flang-mod-15 for flang-new-15+ and lfortran-mod-0 for lfortran.
For flang-to-external-fc-* the version is flangext-mod-15 (assuming gfortran-14 as the external
compiler); in principle flang-to-external-fc ('flangext' flavour) and gfortran are intercompatible
but intermixing is avoided.
These will be updated for incompatible compiler versions.
Support for Makefiles and debian/rules is given in /usr/share/debhelper/dh-fortran/fortran-support.mk
This enables, for example:
/usr/share/debhelper/dh-fortran/fortran-support.mk
FMODDIR:= $(call get_fmoddir, gfortran)
FC_EXE:= $(call get_fc_exe, $(FC_DEFAULT))