DH_FORTRAN_MOD(1)
π DH_FORTRAN_MOD π
okay bestie, sit down, hydrate, because we're talking about dh_fortran_mod β straight out of the dh-fortran-mod manual. she installs Fortran 90 .mod files and handles all the dependency paperwork so you don't have to. iconic behavior honestly π
β¨ NAME β¨
dh_fortran_mod β installs Fortran 90 .mod files and adds the dependency info. that's the whole job. no cap. π¦
πΈ SYNOPSIS πΈ
dh_fortran_mod [--sourcedir=dir] [$<debhelper options>]
like, that's it. she's lowkey simple on the outside. π
π«Ά DESCRIPTION π«Ά
so dh_fortran_mod is a debhelper program, and what she does is go find your Fortran module files and submodule files and then add the right dependencies on gfortran-$version β as required β to the package, using the variable ${fortran:Depends}. she's doing the dependency math for you. main character energy fr fr. β¨
and the way you're supposed to get her running is automatically, through the debhelper "addon" called fortran_mod. two ways to do that:
- automatically, by build-depending on
'dh-sequence-fortran-mod'π - or explicitly, like this:
dh $@ --with fortran_mod
then β and this is the part people miss β dh_fortran_mod searches the debian/ directory for files named debian/pkg.fortran-mod$, and those files list the module files to include. the syntax? same as debhelper install files. iykyk. π
π₯ OPTIONS π₯
--sourcedir=dirβ go look in the directory you name for the files that need installing. π typically the Fortran module files are hanging out in library development packages, so that's usually where you're pointing her. π
π TODO π
okay so this is the "coming soon" section and it's giving vision board. here's what's on the list:
- Add
dh-fortran-modsupport for generic fortran compilers (ifx, etc). π
and then, the big glow-up plans:
dh_fortran_modwill be expanded to find mod files automatically from thedebian/tmpdirectory. β¨- It will enable the installation of mod files in parallel for multiple compilers. π₯
- It will install
.smodfiles for Fortran 2018. π
now the file syntax tea:
- The
fortran-modfile syntax followsdh_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. π
ngl that last one is worded a little cursed in the source, but the meaning is the vibe: absolute path = used as-is, not-absolute = treated as a subdir of $fmoddir. π
compiler flavours, bestie, there are four right now:
gfortran-*('gfortran')flang-new-*('flang')flang-to-external-fc-*('flangext')lfortran('lfortran')
$compiler_mod_directory is based on the compiler module version. currently:
gfortran-mod-15forgfortran-14(and older) πflang-mod-15forflang-new-15+βlfortran-mod-0forlfortranπ¦
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. π« literally no mixing, we don't do that here.
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))
ate. π
π SEE ALSO π
debhelper(7)β go read her too, she's the blueprint. π«Ά
π AUTHORS π
- SΓ©bastien Villemot
<sebastien@debian.org>π - Alastair McKinstry
<mckinstry@debian.org>π
Lots of code stolen shamelessly from dh_install (Joey Hess <joeyh@debian.org>). and we respect the heist. ππ
and that's the whole page, bestie!! π this was dh_fortran_mod v0.43, dated 2025-02-24, living her best life in the dh-fortran-mod manual section 1. go install some mod files. slay. β¨ππ¦
π¦ where this page comes from
- debian trixie: dh-fortran-mod 0.43 Β· GPL-3.0-or-later
- ubuntu questing: dh-fortran-mod 0.43
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms