[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Why no dependency tracking with preprocessed Fortran?

From: Daily, Jeff A
Subject: RE: Why no dependency tracking with preprocessed Fortran?
Date: Fri, 25 Jun 2010 11:32:46 -0700

> So one complication with Fortran modules is that we don't know the
> order
> in which we need to compile files for the first time.  If you want to
> allow file edits to arbitrarily change where modules are defined in,
> then this is true for rebuilds as well.  So module dependency tracking
> needs to be done strictly prior to compilation, either automatically
> somehow, or triggered by the developer.  It will not be easy to do it
> in an automatic way without triggering the "eager" problem at "make
> clean" time (see History chapter).

I think if we want dependency tracking as a side-effect, then the user must 
list their sources in a dependent order (which only they would know).  This is 
what I've had to do in my projects.  The downside is that -j can't be used 
safely.  But I can't see how -j could ever be used safely with Fortran sources 
unless dependency information was generated strictly prior to compilation.  Let 
the onus be on the developer such that if they change where modules are 
defined, they must also update the order of their source files in the Makefiles.

If dependency tracking could be done someone strictly prior to compilation, 
then the source file order in the Makefiles is moot since make will compile 
them in the correct order regardless.  The -j option might even be viable at 
that point.  But the "eager" problem won't be easy to solve, then, right?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]