!--- prog.f90 -----
program prog
use mymod
use yourmod
!......
end program prog
!--- mymod.f90 -----
module mymod
use hismod
!......
end module mymod
it would be nice if there is a command like
$ f90makedepend prog.f90
prog.o : prog.f90 mymod.mod yourmod.mod hismod.mod
$
When I was using the C preprocessor to include Fortran
77 source files, the command "makedepend" did the job.
Now that I've moved to F90, I prefer the module
mechanism very much to the inclusion of source files
using the C preprocessor. But, then I'm having trouble
that I have to write dependencies manually....
Thank you,
Ryo
Sent via Deja.com http://www.deja.com/
Before you buy.
| I'm wondering if there is a (Unix) tool to create
| Makefile dependencies from Fortran source files. For
There is a Perl-script called "makemake" at http://www.fortran.com
that can do this, very brute force though. It makes dep's for
all sourcefiles in a given directory, so manually editing the
resulting Makefile may be necessary.
--
Helge
There is also one at http://www.met.ed.ac.uk/~hcp/fmkmf.html . It is aimed
at Fortran 90 programs where all the subroutines are in modules, so it
won't help if your problem involves f77 and include lines etc. It is
quite good for users of F, however.
I re-wrote it in perl last week and it now goes much faster.
Enjoy
Hugh
--
==========================================================================
Hugh C. Pumphrey | Telephone 0131-650-6026
Department of Meteorology | FAX 0131-650-5780
The University of Edinburgh | Replace 0131 with +44-131 if outside U.K.
EDINBURGH EH9 3JZ, Scotland | Email h...@met.ed.ac.uk
OBDisclaimer: The views expressed herein are mine, not those of UofE.
==========================================================================
Also have a look at http://marine.rutgers.edu/po/perl.html
where sfmakedepend looks as if it might help (but I haven't tried it myself).
--
--
Clive Page,
Dept of Physics & Astronomy,
University of Leicester.
>I'm wondering if there is a (Unix) tool to create
>Makefile dependencies from Fortran source files. For
You could take a look at http://www.gfdl.gov/~vb/mkmf.html. Requires
perl 5.
--
Balaji 1 609.452.6516
SGI/GFDL Princeton University
I wrote a simple tool that does the job. Sorry, no homepage, but drop
me a line and I'll send you source (Fortran90/F) and doc (together ca.
112 kB).
--
Henry