[MITgcm-devel] genmake2 setting sequence
Jean-Michel Campin
jmc at ocean.mit.edu
Fri Apr 16 15:31:07 EDT 2010
Hi Constantinos,
I am trying to make a short summary of how things are set
in genmake2:
for most flag/option/variables, the normal sequence is:
a) reset flag ;
b) execute "genmake_local" if it exists
c) parse the command line options.
d) execute the optfile
Some exceptions:
* FC, CC, CPP, LDADD, MAKEFILE, MAKEDEPEND, AWK and HAVE_SETRLSTK
are not reset (skip a)
* default INCLUDES is not empty (default: INCLUDES="-I. $INCLUDES")
I think there is a reason why genmake_local is run before the optfile,
since it might contains the optfile name (like the AD_OPTFILE).
I don't know why genmake_local is run before the command line
options (but does not seem too bad).
Regarding MAKEDEPEND, if you want to get the makedepend from
genmake_local to overwrite the default, you could pre-define
MAKEDEPEND in your environment (instead of in the optfile)
and if one specific makedepend is in genmake_local it will
be used instead of your default environment.
Cheers,
Jean-Michel
More information about the MITgcm-devel
mailing list