Tonto | ||
---|---|---|
<< Previous | Next >> |
A problem with the current use of modules in Fortran90 is the unnecessary recompilation of dependent files when the interface has not changed.
If the interface to a module is not changed, and there are no inter-module optimisations, then there is no logical reason why other modules that depend on this module need recompiling. Compilers of today however do not allow for this, as they replace a module information file even if it's contents have not changed. To make matters worse, some compilers insert the compilation date into the module information file, and often this can be the only change made to that file.
The make command uses file time stamps to determine whether dependencies need recompiling.
To solve the problem of unchanging, or hardly changing module files, what we need to do is use the old time stamp if an updated module information file is the same as the old one. In this way, make will determine that the module file has not been changed and will not recompile any dependents.