Oracle® Solaris Studio 12.4: Fortran User's Guide

Exit Print View

Updated: March 2015
 
 

3.4.48 –keepmod[={yes|no}]

If a module file exists and its content is not changed by the latest compilation, it will not be replaced even though the compilation is supposed to create a new module file with the same name. Since the content of the module file is unchanged by the compilation, the only effect is that the time stamp of the existing module file will be preserved.

The default, when -keepmod is not specified, is -keepmod=yes. Note that this default is different from previous releases of Oracle Solaris Studio Fortran.

This option is best used together with the dependencies generated by the -xM compilation option. By retaining the time stamp of a module file when its content is unchanged, this option prevents cascading compilation for the source files depending on this module file. This is very helpful in an incremental build and can significantly reduce the build time.

When this option is used with user-specified dependencies and the user has an explicit build rule on how to create the module with a dependency on the corresponding source file, the option can cause the source file to be recompiled multiple times even though the source file is modified only once because of the outdated time stamp of the module file.