Ways to suppress Circularity

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 like .f.o (obsolete) or pattern rules %.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: