[MITgcm-devel] missing dependence in Makefile

Jean-Michel Campin jmc at ocean.mit.edu
Fri Feb 18 15:58:52 EST 2011


Hi,

I think there is a problem with the default makedepend (on my laptop, FC.11)
with 2 levels of #include, i.e., a fortran source file that contains 
a first #include first_level.h file which itself has #include second_level.h.
In this case, second_level.h is not listed in the dependence rule
of the fortran (.f) file.
I also have the same problem with the MITgcm cyrus-makedepend, 

This happen e.g. with most of the pkg/land src files,
1rst level header: LAND_SIZE.h
2nd  level header: SIZE.h

The Makefile generated with default makedepend contains:
land_read_pickup.f: LAND_OPTIONS.h PACKAGES_CONFIG.h CPP_OPTIONS.h
land_read_pickup.f: CPP_EEOPTIONS.h CPP_EEMACROS.h LAND_SIZE.h EEPARAMS.h
land_read_pickup.f: PARAMS.h PARAMS_MACROS.h FCORI_MACROS.h LAND_PARAMS.h
land_read_pickup.f: LAND_VARS.h
and SIZE.h is missing

Note that this does not happen with included CPP options files
(several levels of included files are OK).

Now if I uses xmakedepend I got the right dependency:
land_read_pickup.f: CPP_EEMACROS.h CPP_EEOPTIONS.h CPP_OPTIONS.h EEPARAMS.h
land_read_pickup.f: FCORI_MACROS.h LAND_OPTIONS.h LAND_PARAMS.h LAND_SIZE.h
land_read_pickup.f: LAND_VARS.h PACKAGES_CONFIG.h PARAMS.h PARAMS_MACROS.h
land_read_pickup.f: SIZE.h

Does anyone remember why we don't use xmakedepend (instead of cyrus) ?

Cheers,
Jean-Michel




More information about the MITgcm-devel mailing list