[MITgcm-devel] bug in genmake2

Jean-Michel Campin jmc at ocean.mit.edu
Wed Sep 14 12:08:39 EDT 2005


Hi,

I run testreport the 1rst time, with "timeave" in my_exp/code/packages.conf:
> testreport -dd -t my_exp

and then, I decide to remove pkg timeave from packages.conf
and do testreport again:
> testreport -dd -t my_exp

> make: stat:timeave_cumul_1k1t.F: Too many levels of symbolic links
> ln -s ./timeave_cumul_1k1t.F timeave_cumul_1k1t.F
> ln: `timeave_cumul_1k1t.F': File exists
> make: *** [timeave_cumul_1k1t.F] Error 1

localhost{build}% ll TIMEAV*
lrwxrwxrwx    1 jmc            19 Sep 13 22:52 TIMEAVE_OPTIONS.h -> ./TIMEAVE_OPTIONS.h
lrwxrwxrwx    1 jmc            17 Sep 13 22:52 TIMEAVE_STATV.h -> ./TIMEAVE_STATV.h

And if i try a 3rd time, it works !

The thing that is wrong in genmake2 (or how it's done in testreport:
genmake, make CLEAN, make depend, make <- in this order)
is that the 2nd time, it creates a list of files (that goes into Makefile)
based on (I guess) the files that are already there, including thoses that are
symbolic-links (e.g., all the timeave_*.F and TIMEAVE*.h),
but should not, since this package will not be compiled.
It should only consider files that are really there, excluding
the symbolic-links.

I don't know if this can be easily fixed, but it would be nice.

Jean-Michel



More information about the MITgcm-devel mailing list