dependencies

Janne Blomqvist Janne.Blomqvist@tkk.fi
Sun Sep 10 21:12:00 GMT 2006


Daniel Franke wrote:
> On Friday 08 September 2006 18:23, Warren Turkal wrote:
>> Is there a way to make gfortran generate make dependencies a la gcc -M?
> 
> I spent the last week to work around these issues and could no come up
> with something more reasonable than the scripts already mentioned.
> Since I usually use autotools, I strive(d) to include depency checking
> automagically into my project setup.
> 
> My knowledge of automake/autoconf is reasonable but far from wizardry.
> Could -by any chance- someone comment on the probability to get full 
> dependency tracking with gfortran and autotools working within a reasonable 
> amount of time? (I would have asked this at the official autoconf mailing 
> list, but it seems, that it was abandoned a couple of months ago?!)

What I've done with automake and makedepf90 is to define a "depend" 
target as well as include the generated dependency information in 
Makefile.am, which then gets included into the "real" Makefile. 
Something like:

include depend.mk

# Dependencies generated by "makedepf90" tool.
depend depend.mk:
         makedepf90 $(myprogram_SOURCES) >depend.mk

So then I can (re)generate the dependency information (in depend.mk) by 
running "make depend".


-- 
Janne Blomqvist



More information about the Fortran mailing list