Topic: makefile & dependencies

My program has a large common area in a separate file which is "included" in most of the routines in my program.  How do I alert SF's makefile generator that I have changed the common area so that it recompiles all the modules that include the common area?

Re: makefile & dependencies

Normally any files that are included via INCLUDE statements are marked as dependencies for each file that includes them as long as that included file is part of your project.  So, for example, if you have:

INCLUDE 'COMVARS.INC'

in a file called compute.f and comvars.inc is also in your project, compute.f should recompile anytime comvars.inc is changed.  However, if comvars.inc is not listed in your project, the above won't happen.

It can still be made a dependency by changing a single option, though.  In "Make Options," accessible from the Options menu, you can uncheck "Project-Only Fortran Include Dependencies" to force the same behavior regardless of whether comvars.inc is in your project.

If your code uses

#include "comvars.inc"

via the C preprocessor, Simply Fortran does not track this dependency.  You can instead, however, change the C preprocessor #include to a Fortran INCLUDE statement as they both work the same.

Jeff Armstrong
Approximatrix, LLC