next up previous contents
Next: Building Applications Up: Makefiles Previous: Makefiles

Generic files

ASTERIX contains a number of generic ( .g) files. This is a Starlink format whereby almost identical subroutines, which differ only in terms of the types of their arguments and/or variables, can be compiled from a single source file.

The Starlink utility generic is normally used to convert from .g to .f files, however, due to its inflexibilty a simple shell script ( my_generic) has been written to replace it.

If the file filex.g contains generic code for REAL and INTEGER subroutines then the line

filex : i,r
needs to be added to the file adi/newsrc/generic.settings.

Due to a poorly written makefile any alteration to the generic file will not be spotted and hence the Fortran file will not be updated. This must be done by hand with the sequence,

rm filex.f
make filex.f



Asterix
Tue Jun 23 11:52:19 BST 1998