Makedepf90
Makedepf90 is a program for automatic creation of Makefile dependency lists for
Fortran source code. Makedepf90 supports MODULE:s,
INCLUDE:s, cpp #include:s, f90ppr $include:s and
coco ??include:s and set-files.
The original idea was to provide the same functionality for Fortran as
gcc -MM *.c
does for C. Nowadays Makedepf90 actually supersedes this
functionality, making me wonder if I should extend makedepf90 to support C
and C++ too ;-)
For a more thorough description, see the man
page
Bugs & Limitations
- The parser is a mess. In particular, it treats preprocessor directives
just like normal Fortran statements, which causes problems in some cases.
- Makedepf90's support for pre processor conditionals (#ifdef:s
etc) is still a bit weak, but it should work "well enough" for most
cases (one might get a few "extra" dependencies in some cases, but this
is seldom a problem).
- The include file search algorithm is broken. I may fix it some day. Perhaps.
Portability
Makedepf90 is written in C. It should work with little or no changes on most
Unix- and Unix-like systems (including MacOS X, according to reports I have
gotten) with most standard (ANSI C89) compliant C-compilers. (I have, however,
myself tested recent versions of Makedepf90 only on various GNU/Linux systems,
using various versions of gcc, because that is all I use myself nowadays.)
Some parts of makedepf90 are written with the help of flex and bison. You don't need
these tools unless you are going to make modifications to the source code.
Download
Latest version is 2.8.8, released at June 13, 2006.
See the NEWS-file for development history.
The source code can be down-loaded from here:
makedepf90-2.8.8.tar.gz
Pre-compiled binaries
(I might update them some day ...)
License
Makedepf90 is free software; it can be copied, used, modified and
(re)distributed under the terms of the GNU General Public License version 2,
also known as the GPL.
Future plans & ideas
I won't have time for active development of Makedepf90 for the foreseeable
future. When I do get time, I intend to rewrite the parser from the ground up
(the current parser is a fragile, unmaintainable mess of workarounds). I will
try to fix bugs as they appear, but don't expect any new features (unless you
implement them yourself, of course.)
Links
Other Fortran programming tools that I have found useful:
- The GNU make manual
- Exuberant Ctags --
a program for automatic creation of tags-files to be used together with
programming editors such as vi(m) or Emacs. Support for Fortran since
version 3
-
Convert.f90 -- Converts from fixed to free source format.
- coco -- the
standard Fortran preprocessor.
-
f90ppr -- another Fortran preprocessor (+ other software by
Michel Olagnon)
-
fpp -- a Fortran-aware variant of the cpp preprocessor.