From the gfortran 4.6 news:
Support the generation of Makefile dependencies via the `-M...` flags of GCC; you may need to specify additionally the -cpp option. The dependencies take modules, Fortran's include, and CPP's #include into account. Note: Using -M for the module path is no longer supported, use -J instead.
Any hope of seeing similar functionality in Intel Fortran compilers in the future (or in an additional tool packaged with the compiler)?
Parsing out the modules used and provided, along with the complexity of support for older language features like common blocks makes writing a robust, generic tool to do this a real nightmare. Resolving Fortran dependencies is a headache, even doing this manually with only a handful of source files if they are pathological enough, but writing an automated tool to handle all of the possible pathologies (like token continuation) is really a huge headache.
Since the compiler must already be parsing the source code, and is able to complain when missing .mod files are absent, it should be possible to leverage the source code parsing already in place for the compiler to implement this.
I know seeing this functionality added would make a lot of users happy. In the mean time I am asking my sysadmins to install gfortran 4.6 just so that I can stop writing tens or hundreds of absurd dependency resolution lines in my Makefiles. I'm still using ifort for the actual compilation though ;-p
Thanks in response for getting back to me! (And my appologies if this feature is already included; if it is, there is no evidence of it in the man page.)