-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Eric Blake on 4/9/2008 8:11 PM: > According to Ralf Wildenhues on 4/9/2008 12:27 PM: > |> * doc/autoconf.texi (The Make Macro SHELL): Stronger wording on > |> the importance of proper SHELL settings. > |> Reported by Bruno Haible, in > |> http://lists.gnu.org/archive/html/bug-libtool/2008-04/msg00029.html. > | > | These parts are probably ok, but the discussion will still take longer > | (I need to check a few things first), so I would appreciate if you could > | wait a little bit. > > No problem waiting. I'm also thinking about rewording the section a bit > more.
Ping. Meanwhile, I've updated the series, available now as: $ git pull git://repo.or.cz/autoconf/ericb.git make-shell or browseable at http://repo.or.cz/w/autoconf/ericb.git?a=shortlog;h=refs/heads/make-shell I'm not sure whether more rewording is necessary. Thoughts? Basically, there are multiple problems: > > if SHELL is not set explicitly in the Makefile, POSIX make is supposed to > provide a default containing the value of a POSIX-style sh; but some > makes, like Tru64, fail to set a default SHELL. Workaround - always set > SHELL explicitly > > if SHELL is explicitly set in the Makefile, POSIX make is supposed to use > it to invoke make commands, but some makes, like Tru64, blindly execute > /bin/sh. No direct workaround - commands written in make cannot assume > the fixes that would be available by using a better $SHELL; but the advice > of autoconf was to stick to simple commands in Makefile and factor out > complex ones into separate shell scripts anyway, then invoke those scripts > using $(SHELL) with [EMAIL PROTECTED]@ > > if make is run with set -e, POSIX make is supposed to ignore any SHELL in > the environment, but some makes, like Tru64, override an explicit setting. > ~ No direct workaround - merely document that users on Tru64 must not run > 'make -e' if SHELL is not a POSIX-style sh, or that they should upgrade to > gmake instead > > setting SHELL to /bin/sh is not portable; autoconf clients should use > @SHELL@ instead (and automake does this automatically) > > In the case of Bruno's problem, I think what happened is: > > configure ran, noticed /bin/sh was inadequate, and set @SHELL@ to /bin/ksh. > libtool subtitutes this as [EMAIL PROTECTED]@ at the start of the script. > But make ran $(SHELL) libtool, with SHELL hard-coded as /bin/sh by Bruno, > and ignored the #! line since it was invoked as an argument to SHELL > rather than as an independent program. > Finally, the generated libtool lacked the _AS_DETECT_BETTER_SHELL logic > that configure had used earlier when setting SHELL. > > Telling libtool clients who use autoconf to set 'SHELL = @SHELL@' in their > makefiles (manually, or via Automake) is one thing, but does libtool > intend to be used independently of autoconf, in which case @SHELL@ is not > available? How do we (or do we even try to) document that in autoconf? > - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkisF7wACgkQ84KuGfSFAYA3oQCdHN3oS0O95t2Y8NZkxylncsO5 B6wAn0yD75FFL7F3c6gfyZRMRGU2uzCD =T8hu -----END PGP SIGNATURE-----
