On Mon, 17 Jul 2000, Tom Tromey wrote:

> Could you submit a bug report to the automake Gnats?  Mark it
> "critical/high".  We need to fix this before the next release.
> There should be a link to Gnats from http://sourceware.cygnus.com/automake/
> Thanks.

Just sent it in. I just discovered that including AC_PROG_CC in
configure.in also "solves" the problem. 

> I think the goal here should be to have the Fortran compiler generate
> the include information -- it can list both the files included via
> #include and those included via INCLUDE.  This way you get complete
> dependency tracking as a side effect of compilation.
 
> Writing a patch to g77 to do this shouldn't be all that hard.

Well, well - perhaps not. I don't know if I can do it, though.
Will take some time in any case.
 
> Martin> - if yes, which solution we should go for ?
> 
> When possible, fix the compilers.  When not possible, maybe living
> with less than perfect information is the only approach.
> 
> Martin> P.S. This problem seems to be trivial compared to providing
> Martin>      dependency tracking support for Fortran 90 modules. But
> Martin>      that's a different issue...
> 
> This should also be solvable if the compiler is intelligent.

I have tested quite a few compilers recently, and for none I found an
option that would do what you suggest :-(

"The compiler" is a difficult term here, as every compiler treats modules
differently. They can't even agree whether module file names should
be generated from module names or source file names.

For example, from a file "foo.f90" containing

MODULE bar
END MODULE bar

one compiler would generate a module file "foo.M", the other "bar.mod",
yet another "BAR.mod", and again another two files, "bar.vo" and
"Vfoo.inc". (These are real examples).

If I understand the automake philosophy right, then it suffices to support
only a few compilers, generate the dependencies on the maintainer's site,
and include them into the distributed Makefiles. For Fortran 77, making
g77 report correct dependencies would therefore suffice. However, for
Fortran 90 we'd have two problems:

  1 - unfortunately, there is no available public domain F90/F95 compiler,
      so we can't assume one to be available for all maintainers.
  2 - As stated above, there is no compiler-independent way to associate
      modules with file names.

Problem 2) may probably be avoided by generating dependencies only for
object files (just thinking aloud :-)


Regards,
Martin

-- 
Martin Wilck <[EMAIL PROTECTED]> 
Inst. for Tropospheric Research, Permoserstr. 15, 04303 Leipzig, Germany

Reply via email to