building dependancies

Janne Blomqvist jblomqvi@cc.hut.fi
Thu Aug 19 07:02:00 GMT 2004


On Wed, Aug 18, 2004 at 08:38:51PM -0700, Steve Kargl wrote:
> On Wed, Aug 18, 2004 at 07:43:25PM -0700, Jerry DeLisle wrote:
> > 
> > I have a fortran application developed by others consisting of about 50
> > .f90 files.  I want to build a list of dependancies so that I can clean
> > up the make file.  Can gcc do this?  Is there another tool that will do
> > this for me, or shall I roll my own?
> > 
> 
> I think you'll have to roll your own dependancies list.  Neither
> the Fortran 95 standard nor gfortran have the concept of 
> dependancies in the senses of Makefile files.

The situation is not quite that bad. I've been quite happy with the
sfmakedepend script which can be found at

http://people.arsc.edu/~kate/Perl/sfmakedepend

This Perl script reads source files and creates module dependecy lists
that are appended to the Makefile.

There are other tools that do essentially the same thing, but I
haven't used them so I can't comment on how good they are.

-- 
Janne Blomqvist



More information about the Fortran mailing list