[MITgcm-support] genmake2
Ed Hill
ed at eh3.com
Fri Jul 16 22:50:18 EDT 2004
On Fri, 2004-07-16 at 17:07, Gianmaria Sannino wrote:
> Hi!
>
> I'm trying to use MITgcm on an alpha (OSF1 v5.1 2650 alpha), but I
> have some problems to generate the makefile with the new genmake2.
> Below there are the command I use and the error message:
>
> /usr/bin/sh ../../../tools/genmake2 -mods ../code/ -of
> ../../../tools/build_options/osf1_alpha_f77
>
> GENMAKE :
>
> A program for GENerating MAKEfiles for the MITgcm project. For a
> quick list of options, use "genmake -h" or for more detail see:
>
> http://mitgcm.org/devel_HOWTO/
>
> === Processing options files and arguments ===
> getting local config information: none found
> ../../../tools/genmake2: Command usage error at line 787: `;'
> unexpected.
>
> can anyone help me?
Hi Gianmaria,
Thank you for taking the time to report this bug. After discussing it
with you and Patrick, its clear that genmake2 should have bash (not sh)
on its first line ("#!/usr/bin/env bash"). The logic is:
1) on Linux boxes it makes absolutely no difference since sh is
a soft-link to bash
2) on commercial Unixes, you have two situations:
a) bash is available and thus it should be preferred
b) bash is not available and you will have to specify a
shell manually -- if you are lucky then the local
sh and the local tools (test, awk, sed, etc.) are good
enough and it works
As you have helpfully reported, we should use "#!/usr/bin/env bash" in
case (2a). And in case (2b) it does little harm to use "#!/usr/bin/env
bash" since (as Patrick pointed out), our documentation clearly explains
how to manually specify the "sh" shell.
Also, I have yet to encounter a machine without bash [case 2b] where the
sh shell and supporting tools are sufficiently broken that genmake2
won't work. And, as you're reported, there clearly *are* systems (eg.
osf1 alpha) where a bash shell is available and the sh shell/environment
is inhospitable to current versions of genmake2.
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-support
mailing list