On Wed, Oct 8, 2008 at 4:13 PM, Steve Waltner <[EMAIL PROTECTED]> wrote: > I'm not following what your asking in your second paragraph. It sounds like > you're suspecting that our Solaris build of GNU make possibly has /bin/ksh > as the internal SHELL instead of /bin/sh. I don't believe that is true. In > the following output ictgrid004 is a Solaris box and ictgrid005 is the Linux > box...
For the record - though this seems to be a false trail - that's not _exactly_ what I'm saying. GNU make always[1] uses the "system shell" by default, and on Unix the system shell is always the binary found at /bin/sh. POSIX requires the system shell to have ksh-like semantics but compatibility requires it to have traditional Bourne-shell semantics. Thus, some Unices support two methods of installation: the traditional/compatible one which everyone uses and the POSIX-conformant one which nobody uses except when passing the POSIX test suite. The latter replaces the Bourne shell at /bin/sh with a POSIX version which is based on ksh. The shell in question is not actually /bin/ksh but /usr/xpg4/bin/sh since /usr/xpg4/bin is where POSIX-conformant-but-not-backward-compatible utilities are stored. However, /usr/xpg4/bin/sh is just a variant of /bin/ksh which has its own backward-compatibility issues. [1] Of course, since it's open source, there's always the possibility of making your own custom version but we will assume that didn't happen. Anyway, I was suggesting that your /bin/sh might be a link to /usr/xpg4/bin/sh which would have given you, inadvertently, ksh-like behavior from the system shell on Solaris. But that appears not to be the case. And I don't know for sure that Solaris supports the "POSIX install" anyway. Still, the ball is in your court to figure out how GNU make could possibly be skipping the shell when SHELL has been overridden since it just doesn't do that. My best guess is that you aren't really using GNU make on Solaris (I happen to know that Sun make is not as smart about SHELL overrides, having reported it as a bug years ago only to be ignored). Try "make --version" and see what it says. My money says the problem is a make-compatibility one. Another thing to consider is to just strip out the SHELL override on Linux (or everywhere if that works). Solaris /bin/sh is very old so there's a good chance SHELL was promoted to ksh only to work around a bug or limitation in it. Linux /bin/sh is really a link to bash which is 15-20 years newer and has a great deal of ksh compatibility built in [2], so it might "just work" without the override. [2] However, note that bash runs in a Bourne-compatible mode when used as /bin/sh which means some features are not available. One other thing: if you are really going wth GNU make across the board, as opposed to the native make, you should assign SHELL (and most other variables) with the := syntax e.g. "SHELL := /bin/ksh". This is more efficient but a GNU-only feature. David Boyce _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
