DH_FORTRAN_MOD(1) | dh-fortran-mod | DH_FORTRAN_MOD(1) |
dh_fortran_mod - Install Fortran 90 .mod files and add dependency information.
dh_fortran_mod [--sourcedir=dir] [$<debhelper options>]
dh_fortran_mod is a debhelper program that finds Fortran module and submodule files and adds dependencies to gfortran-$version as required to the package using via the variable ${Fortran-Mod}.
dh_fortran_mod is expected to be automatically added using the debhelper "addon" fortran_mod ie. using the debian/rules line:
dh $@ --with fortran_mod
Typically Fortran module files are included in library development packages.
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.
$compiler_mod_directory is based on the
compiler module version: currently gfortran-mod-15 for gfortran-8, and
flang-mod-33 for flang-7. These will be updated for incompatible compiler
versions. There is a symlink in $libdir/fortran/ for
the 'canonical' compiler name, linking to this, e.g.
/usr/lib/$multiarch/fortran/x86_64-linux-gnu-gfortran-8 -> gfortran-mod-15
This enables makefile fragments to construct
$fmoddir as required from :
FC:=$(shell basename $(shell readlink -f /usr/bin/gfortran)) FMODDIR:=/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)/fortran/$(FC)
Its not clear what happens on module version changes in Flang/F18. While the version number signifies format changes, it appears the design is currently to be backward compatible and read previous versions. Hence symlinks for flang handling may be required.
Sebastien Villemot <sebastien@debian.org> Alastair McKinstry <mckinstry@debian.org>
Lots of code stolen shamelessly from dh_install (Joey Hess <joeyh@debian.org>).
2019-01-29 | dh-fortran-mod v0.12 |