Skip to content
Stefano Zaghi edited this page Feb 10, 2015 · 4 revisions

fobos: the FoBiS.py makefile

For dealing with (repetitive) buildings of complex projects, FoBiS.py execution can be driven by means of a configuration file placed into the current working directory and named fobos, FOrtran Building OptionS file.

The options defined into fobos file override or in the case of cflags, lflags and preproc overload, the CLI arguments.

fobos file is designed to act as a makefile, but with a very simple syntax (similar to INI files): its brevity is a design parameter!

fobos file has exactly the same options available for the command line, in particular the options names are identical to the extended switches names (the ones prefixed with --) or to the abbreviated ones (prefixed with -) in case they are the only defined. If an option is present it will overrides the default value of CLI. Options can be commented with "#" symbol.

Note that if the fobos file is placed into the current working directory it is automatically loaded for both build and clean executions of FoBiS.py, however if a fobos file is placed elsewhere and/or it is named differently from fobos it can still be specified by means of -f switch

FoBiS.py build -f /other_path/fobos.other_name

FoBiS.py clean -f /other_path/fobos.other_name

Using this feature it is simple to perform context-specific buildings accordingly to different goals, e.g. it is convenient to have concurrently more fobos files, one for debug building, one for release building, one for AIX architecture, one for MPI building and so on. Nevertheless, many programmers prefer to have only one "makefile" into which different building profiles (hereafter defined modes) are defined (they being selected by means of defined switches). For this reason two different kind of fobos file can be defined accordingly to the user modus operandi:

  • a fobos file with only one default building mode;
  • a fobos file with many different building modes.

For more details read:

Clone this wiki locally