r.make_exp - create a description file for the make utility.
USAGE
r.make_exp [-f] [-DEFINE =-Dtoken1[:-Dtoken2] ...] [-MALIB libname] [-COMPILE file_name] [-FFLAGS=flag[:flag] ...] [-CPPFLAGS=flag[:flag] ...] [-CFLAGS=flag[:flag] ...] [-ASFLAGS=flag[:flag} ...] [-LIBRAIRE] [-LONG] [-quick] [-+]DESCRIPTION
or
r.make_exp -h to obtain the calling sequence.
r.make_exp now does support .ftn90, .f90 and .cdk90 files. It also include a limited support for .h files, including them in the Makefile if they are found somewhere in the local directory or $RCSPATH. ftn90 and f90 files are assumed to be written in free source form. A ftn90 file is processed with r.ftnpp (the same way ftn files were). cdk90 files are reserved for modules. They are not intended to be used as #include as .cdk files are. When using r.make_exp, first it creates a list of all .cdk90 files and associate them to the modules they include. Then, when scanning for "use" statements in the code, it uses the previously created list to create the dependency between the code and the module.
Example:
c1.cdk90 contains
module constant
real(float) :: constant_pi =
3.1415927_float
end module constant
code.ftn90 contains:
program test
use constant
...
end program test
Makefile contains:
code.o:
code.f90 c1.o
An important think to remind is that using the same name for a file is really not a good idea (particularly for a .cdk90): using test.f90 and test.cdk90 in the same experience can create more or less funny effects.
The -LIBRAIRE option is to be used mainly by maintainers of a RCS. It will create in each RCS listed in the RCSPATH a directory called make_exp (thus requiring write permission). Files containing all the dependancies related to the specific RCS will be written in those directories. This option will note create a Makefile, it will stop after all RCS have been processed. This process has to be done every time the dependancies changed in a given RCS, otherwise a wrong Makefile could be generated. A warning is issued in this case. The advantage of using the -LIBRAIRE flag is to prevent all users of doing a bunch of grep over all the source code. The Makefile is generated much faster since this job is done only once.
The -LONG option will force r.make_exp to bypass all files created by the -LIBRAIRE option, doing the long process that creates all dependancies.
About the compilation default targets, they use r.compile as the compiler. They look like this:
The file mes_recettes is added in the Makefile as a "include", so there is no need to run r.make_exp after a modification to mes_recettes.
Updated by: Luc Corbeil, December 12 2001, 10h00