The information on this page is not complete
Modifications to OpenIFS
There are several ways in which code changes to OpenIFS could be managed:
- Edit code in the
oifs/src
directory directly (not recommended).
Code changes can be hard to track and integrating new versions of the model becomes difficult. - Place OpenIFS source in a version control system (e.g. subversion or git) and edit the code in
oifs/src
. - Leave code in
oifs/src
'as-is' and place modified or new code in new directories (recommended)
This has the advantage that multiple code developments can be maintained in separate directories; code changes are easy to see and integrating new versions of the model source straightforward. A version control system can also be used.
We recommend maintaining all code changes outside the main oifs/src
directory. It makes use of a facility provided by the FCM build software called 'inherited builds'. This is explained below in a series of examples.
The example configuration files for FCM can be downloaded from....
Inherited builds
In essence an inherited build is where the build (i.e. compilation) settings for OpenIFS are not altered but are used or inherited by a new FCM configuration file placed in a separate directory. The new FCM configuration file only needs to specify what's different about the build, either the sources or compilation settings. The rest of the information is obtained by telling FCM to look at the OpenIFS configuration. A user may have a number of these separate configuration files each in separate directories for developing or testing independent code changes.
Example1: Modifying compilation options
HowTo customise compiling OpenIFS explains how environment variables and editing the configuration files can alter the compiler settings for OpenIFS. In this simple example, an inherited build is used to achieve the same effect by creating a separate configuration file.
Create directories for your own configuration files and source code. For example:
% cd oifs % mkdir mysrc mymake % ls COPYING ChangeLog INSTALL LICENSE NOTICE README html make src t21test
The source code is in 'src' with the compilation configurations files used by the FCM build software in 'make/fcmcfg
'.