[MITgcm-devel] genmake2 problem
Jean-Michel Campin
jmc at ocean.mit.edu
Thu Apr 6 17:51:47 EDT 2006
Hi Patrick,
I propose to try to stop the genmake2 process
only if #define ALLOW_{PKG} is found in CPP_OPTIONS.h
(instead of #define ALLOW_{PKG}* as it is now).
Will it solve your problem ?
Jean-Michel
On Thu, Apr 06, 2006 at 01:12:03PM -0400, Ed Hill wrote:
> 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
>
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel
More information about the MITgcm-devel
mailing list