fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
%LIBRARY <file_1> <file_2> : : %END [OF] LIBRARY
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 command 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 *.f90
The %LIBRARY - %END OF LIBRARY commands may not be nested. An %END OF LIBRARY command terminates library processing, irrespective of the number of %LIBRARY commands 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 LIBRARYcommand.
The commands apply only to primary files. All INCLUDE files referenced in the code are always written.
Where to Use this Command
|Operating system command line||Yes|
|Configuration file, config.fsp||No|
|Specification (fsp) files, *.fsp||Yes|
|Interactively, to FPT> prompt||No|
|Interactive command files||No|
|Embedded in the Fortran code||Yes|
Files are not assumed to be library files by default.
! 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
Copyright ©1995 to 2023 Software Validation Ltd. All rights reserved.