[MITgcm-devel] make adall

Jean-Michel Campin jmc at ocean.mit.edu
Wed Jun 14 20:04:41 EDT 2006


Hi,

Would like to change genmake2 and Makefile, and since I don't know much
about those 2 beast, prefer to check before:

the command "make adall" always link again all the objets,
even when they are all up to date.
As a consequence, "testreport -quick"  always re-run the
test, since the executable has changed.

I think (and the test I've done confirms) that this is related to

> adall: ad_taf

and with ad_taf being defined later:
> mitgcmuv_ad: ad_taf_output.o $(OBJFILES)
>        $(LINK) -o mitgcmuv_ad $(FFLAGS) $(FOPTIM) $(OBJFILES) ad_taf_output.o $(LIBS)

The problem is that the make command looks for the file "ad_taf" to
see if it needs to link again all the objets, and since this file never
exist, always does it.

I propose to replace "ad_taf" by "mitgcmuv_ad":

> adall: mitgcmuv_ad
and then:
> mitgcmuv_ad: ad_taf_output.o $(OBJFILES)
>        $(LINK) -o mitgcmuv_ad $(FFLAGS) $(FOPTIM) $(OBJFILES) ad_taf_output.o $(LIBS)

Note that this will not change anything to the behavior of command:
> make ad_tamc
(and will not improve it)
but will fix the "testreport -quick" problem.

Jean-Michel



More information about the MITgcm-devel mailing list