fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
Keeping a Directory Structure
The files in a large project may lie in a large and branching directory tree. We wish to preserve this organisation in the files output by fpt.
Suppose the original sources are in a directory structure rooted at /home/chris/helisim/original_source/
We will probably change some of the files by hand, perhaps to correct errors, so we make a parallel structure for these files at: /home/chris/helisim/modified_source/
Lastly we make a directory structure to receive the output from fpt at: /home/chris/helisim/fpt_output/
We set up a working directory for fpt at: /home/chris/helisim/fpt/
and our project file, helisim.fsp goes into this directory.
Suppose that we have modified a couple of files,
/home/chris/helisim/modified_source/initial/module_atm.f90
and
/home/chris/helisim/modified_source/dynamic/kinematic.f90
We now have, for example:
/home/chris/helisim/fpt/ helisim.fsp /home/chris/helisim/original_source/ initial/ heli_init.f90, atm_init.f90, module_atm.f90 dynamic/ kinematic.f90, module_rkrt2.f90, control.f90 terminal/ heli_term.f90 inc/ const.i90 /home/chris/helisim/modified_source/ initial/ module_atm.f90 dynamic/ kinematic.f90 /home/chris/helisim/fpt_output/ initial/ <Empty> dynamic/ <Empty> terminal/ <Empty> inc/ <Empty>
We want to search for the input files first in the modified_source/ directories, and then in the original_source/ directories, and to merge the output files into the fpt_output/ directories.
We set up the specifications to read the input files. For the dynamic/ sub-directory it is:
% primary input path: "../modified_source/dynamic/" "../original_source/dynamic/" kinematic.f90 module_rkrt2.f90 control.f90
fpt will then find kinematic.f90 in the modified_source/ directory. It will read module_rkrt2.f90 and control.f90 from the original_source/ directory.
We want to write the output files with the same directory organisation, but under the new base directory named fpt_output/. The output directory handling is therefore written:
% keep output directories % edit output file names: replace "modified_source" by "fpt_output" % edit output file names: replace "original_source" by "fpt_output" % keep file name extensions
The new output files are written to:
/home/chris/helisim/ fpt/ helisim.fpl fpt_output/ initial/ heli_init.f90, atm_init.f90, module_atm.f90 dynamic/ kinematic.f90, module_rkrt2.f90, control.f90 terminal/ heli_term.f90 inc/ const.i90
Copyright ©1995 to 2024 Software Validation Ltd. All rights reserved.