[MITgcm-devel] genmake2 problem
Ed Hill
ed at eh3.com
Thu Apr 6 13:12:03 EDT 2006
On Thu, 2006-04-06 at 10:58 -0400, Patrick Heimbach wrote:
>
> there's a sublte problem with genmake2.
> We now ommit #define of packages in CPP_OPTIONS.h
> which is good.
> However, a funny thing happens when you have
> a CPP flag that's very similar to a package name,
> but is not a package name.
> For example, if you add the flag
> #define ALLOW_SEAICEFFF
> in lab_sea/code/CPP_OPTIONS.h
> genmake2 will choke
>
> Error: In ../code/CPP_OPTIONS.h there is an illegal line: #define
> ALLOW_SEAICEFFF
Hi Patrick,
I can think of at least three ways to fix that and here they are (in my
opinion) ordered from best to worst:
1) we all agree to use flags of the form ALLOW_${PKG_NAME}
only for packages -- or perhaps some other pattern such
as ENABLE_${PKG_NAME}
2) within genmake2, turn off the bit of code that tries to
dis-allow the manual setting of packages with #define
statements
3) I write a bit of code that is smart enough to enumerate
all the package names so that non-package ALLOW_* flags
won't get flagged as being an error -- and keep the
now-smarter error checking code [but I think this is a
really silly and fragile way to do things]
So, which approach do you and others want to use?
Ed
--
Edward H. Hill III, PhD
office: MIT Dept. of EAPS; Rm 54-1424; 77 Massachusetts Ave.
Cambridge, MA 02139-4307
emails: eh3 at mit.edu ed at eh3.com
URLs: http://web.mit.edu/eh3/ http://eh3.com/
phone: 617-253-0098
fax: 617-253-4464
More information about the MITgcm-devel
mailing list