FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference 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, perhaps to correct errors, so we make a parallel structure, /home/chris/helisim/modified_source/, and another parallel structure to receive the fpt output files, at /home/chris/helisim/fpt_output/. We also 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, initial/module_atm.f90 and dynamic/kinematic.f90 . We now have, for example:

/home/chris/helisim/fpt/
        helisim.fsp         The specification file for the project
/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         The listing file
/home/chris/helisim/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 2014 Software Validation Ltd. All rights reserved.