ftndep, ftnincln, ftnincrm: managing Fortran include files

Overview

Include statements in Fortran source code present a couple of problems:

ftnincdep addresses the first problem. ftnincln works around the third by creating symbolic links in the current directory to the included files not in that directory. ftnincrm is provided as a way of removing the links created by ftnincln.


Invoking ftndep, ftnincln, ftnincrm

The command-line syntax for the three programs is

     ftndep [options including -Idir, -I, or --] [files]
     ftnincln [options including -Idir, -I, or --] [files]
     ftnincrm [options including -Idir, -I, or --] [files]

The options -Idir, -I, and -- have the following effects:

-Idir
Adds dir to the list of directories to search for include files. The search order is: the current directory, directories specified on the command-line in the order they appear on the command-line, and /usr/include unless -I has been specified.
-I
Removes /usr/include from the list of directories to search.
--
Terminates option processing. All remaining arguments are treated as files.

Other options are ignored (it is assumed that all options have their argument, if any, appended).

The listed files are scanned for the files they include using Fortran include statements (#include directives are not processed); nested include files are similarly processed. ftndep writes to standard output the dependencies for each file specified on the command line in a format usable by Make; ftndep assumes that the specified files have .f or .F extensions. For each included file which is not in the current directory, ftnincln generates a symbolic link with the same name in the current directory; if a symbolic link with that name already exists, it is removed and a new symbolic link is put in its place. For each included file which has a symbolic link with the same name in the current directory, ftnincrm removes the link.


modified $Date: 2003/12/09 05:24:24 $

Eric Branlund (eric@msg.ucsf.edu)
Macromolecular Structure Group, UCSF (http://www.msg.ucsf.edu)