FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


LIBRARY
END OF LIBRARY

Syntax:

%LIBRARY
<file>
<file>
   :
   :
%END [OF] LIBRARY

Function:

The commands %LIBRARY and %END OF LIBRARY are written in specification (FSP) files to indicate lists of primary files which are to be treated as components of a library. The library files are read and analysed in the same way as standard Fortran input files, but they are written to the output directories only if they are needed to build the program or programs which are being processed. If none of the sub-programs in a file are called in the main call trees, the file is not output.

The commands allow FPT to be used to bring together components of a large program into a single build directory. FPT selects all and only those files required for the program to be built. FPT is run on the code, which is then built with commands of the form, for example:

$ gfortran -c *.f

The %LIBRARY - %END OF LIBRARY commands may not be nested. An %END OF LIBRARY command terminates library processing, irrespective of the number of %LIBRARY statements which have been encountered. The presence of two or more %LIBRARY or %END OF LIBRARY commands is not considered to be an error, and no check is made that every %LIBRARY command is followed by an %END OF LIBRARY command.

The commands apply only to primary files. All INCLUDE files are always written.

Where to use this command:

Operating system command line

No


Configuration file, config.fsp

No


Specification (FSP) files, *.fsp

Yes


Interactively, to FPT> prompt:

No


Interactive command files

No


Embedded in the Fortran code

No


Default:

Files are not assumed to be library files by default.

Example:

! basin.fsp
 
% input directory: ../source
drill.f
refract.f
reflect.f
scatter.f
basinip.f
basinop.f
 
% input directory: /usr/people/shared/matlib/source
% library
vecmat.f
matmul.f
invert1.f
invert2.f
simplex.f
polygon.f
func1.f
func2.f
func3.f
func4.f
ixdel.f
% end of library
 
! End of basin.fsp

See also:

SYSTEM LIBRARY


Copyright ©1995 to 2014 Software Validation Ltd. All rights reserved.