# Ways to suppress Circularity

**URL:** <https://fortran-lang.discourse.group/t/ways-to-suppress-circularity/8620>\
**Category:** Uncategorized\
**Created:** [September 18, 2024, 4:34pm UTC](https://fortran-lang.discourse.group/t/ways-to-suppress-circularity/8620 "2024-09-18T16:34:27Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ivanpribec](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/ivanpribec/32/3290_2.png) [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)\
**Post date:** [September 18, 2024, 8:23pm UTC](https://fortran-lang.discourse.group/t/ways-to-suppress-circularity/8620/5 "2024-09-18T20:23:37Z")

</div>

If your Makefile doesn’t capture the module dependencies across files correctly, it’s always at risk of breaking, especially in parallel builds with `-jN`.

The introduction of modules forces builds to follow a particular order, in contrast to the “flat” compilation model of F77 where [suffix rules](https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html) like `.f.o` (obsolete) or [pattern rules](https://www.gnu.org/software/make/manual/html_node/Pattern-Rules.html) `%.o : %.f` are sufficient. Unfortunately these rules can’t distinguish if a file actually contains modules or just a bunch of external procedures.

People started to tackle this problem as soon as Fortran 90 modules became available. There are numerous threads about this issue at comp.lang.fortran:

- 1994:
  - [Getting make To Recognize .f90 Suffixes](https://groups.google.com/g/comp.lang.fortran/c/PIszSVyWDMg/m/7RAV7phA8AgJ)
  - [Fortran 90 makedepend](https://groups.google.com/g/comp.lang.fortran/c/B4BBQvng6rM/m/zP1mrIWNTMwJ)

- 1995:
  - [Fortran 90, modules and makefiles](https://groups.google.com/g/comp.lang.fortran/c/HCBBnVtrTQ4/m/YxW1Cq3ytfcJ)
  - [F90 Modules](https://groups.google.com/g/comp.lang.fortran/c/kshmiBl7EOE/m/qCKOlV6IwxwJ)
  - [F90 just a toy? Newbie’s Q](https://groups.google.com/g/comp.lang.fortran/c/l_OLzJxtCXA/m/Icr6W4KrNHgJ)
  - [f90 Makefile dependencies?](https://groups.google.com/g/comp.lang.fortran/c/iLKGdArmAI0/m/H_upm5ChIjIJ)

- 1996:
  - [Help with (g)make and f90 files wanted](https://groups.google.com/g/comp.lang.fortran/c/7rDLKy8wizM/m/ObKC_AcLvXMJ)
  - [make file utility](https://groups.google.com/g/comp.lang.fortran/c/9yjGw3mWXS0/m/Z3f_jrRMrNYJ)
  - [f90 modules and makefile dependencies](https://groups.google.com/g/comp.lang.fortran/c/YcZZKAOIYsg/m/WfVGanH1sOEJ)

- 1997:
  - [f90 modules compilation](https://groups.google.com/g/comp.lang.fortran/c/Wqy4yIScmr0/m/CXdpWSfJL2wJ)
  - [Modules and Make Dependencies](https://groups.google.com/g/comp.lang.fortran/c/C_Do-5DAt9E/m/RUA_NRwV5VkJ)

- 1998:
  - [Makefile that avoids extra compilations when USEing MODULES](https://groups.google.com/g/comp.lang.fortran/c/5W2Woyaw4bk/m/goIc3hvbpwQJ)
  - [Treatment of modules by Fortran 90 compilers - differences ?](https://groups.google.com/g/comp.lang.fortran/c/QwOunxxdQzs/m/p3ujeRSDJ-gJ)
  - [modules and make files](https://groups.google.com/g/comp.lang.fortran/c/P-6eeOP96VA/m/QFzIJyp8xKwJ)
  - [An unhelpful error message](https://groups.google.com/g/comp.lang.fortran/c/4WBAvrbyGZ8/m/3Nevvf5XzxgJ)

- 1999:
  - [Compiling large Fortran projects](https://groups.google.com/g/comp.lang.fortran/c/PczwJ-t41y4/m/ZHiWECrgeIYJ)
  - [Interface for functions](https://groups.google.com/g/comp.lang.fortran/c/rMyG7QmAmx4/m/ElTAiK6iDvkJ)

- 2000:
  - [makedepend for module dependency?](https://groups.google.com/g/comp.lang.fortran/c/TEi8UU8s0vk/m/5u7Us1acCyYJ)
  - [compilation dependencies](https://groups.google.com/g/comp.lang.fortran/c/c1WELIGDtuw/m/6jCa3Ay_nysJ)
  - [mod files](https://groups.google.com/g/comp.lang.fortran/c/QLSFBuvaKtw/m/JiwAF9l6KwkJ)
  - [Fortran90 static library and .mod files](https://groups.google.com/g/comp.lang.fortran/c/GcLlDhtD7Vs/m/nhvSd8YhXmAJ)

---

_[View the full topic](https://fortran-lang.discourse.group/t/ways-to-suppress-circularity/8620)._
