[kde-solaris] GNU Makefiles should only use Bourne Shell Syntax - Not Bash.

Rolf Sponsel Rolf.Sponsel at kstr.lth.se
Mon Jan 31 23:34:01 CET 2005


Stefan Teleman, 2005-01-31 21:19 GMT +01:00, wrote:

> On Monday 31 January 2005 14:22, Rolf Sponsel wrote:
> 
>>Stefan, with all respect, I'd love to be able to retract it,
>>
>>but didn't you write:
>>
>>>It is not true that the FSF pages contain references to the
>>>Bourne shell. They contain references to /bin/sh, which on
>>>GNU/Linux means the Bourne Again Shell, i.e. bash.
>>
>>This statement, see link below, is - unfortunately - entirely
>>false, and lacks any kind of back up. Please prove me being wrong.
> 
> 
> my statement is true. i have not found a single reference to the 
> "Bourne Shell". the only references i see are to '/bin/sh'. i copied 
> and pasted here the symlink from /bin/sh to /bin/bash. There is *NO* 
> /bin/sh binary on Linux. Only /bin/bash. again: /bin/sh is a symlink 
> to /bin/bash.

Stefan, don't loose the focus here.
And remember, this is *not* about Solaris.

It's about whether one should, or should not,
use extensions to sh (a.k.a. 'Bourne Shell'),
e.g. found in bash, ksh etc. in conjunction
with Makefiles (or any other autoconf files).


First, let's agree on that either you are wrong, when
it comes to interpreting, or the GNU documentation is.

In case of the latter, you should file a bug report.


As far as I am concerned I have backed up my statements
with references to the GNU documentation, which you have not.
I don't even need to attempt to figure out how to interpret
the docs.

The documentation clearly states that one should *not*
use extensions to sh, like those found in ksh or bash,
when writing Makefiles,

http://www.gnu.org/software/make/manual/html_node/make_124.html#SEC128
GNU make: Utilities in Makefiles

Considering the "GNUs" have stated this in several places
in their documentation it's very unlikely that it's a bug.

>>http://lists.kde.org/?l=kde-solaris&m=110718905102403&w=2
>>MARC: msg 'Re: [kde-solaris] Re: Unhelpful error building dcop in
>>kdelibs'
>>
>>They, the GNU people, explicitly mention that they do *NOT*
>>mean bash when they refer to '/bin/sh'.
> 
> 
> which is a symlink to /bin/bash. you do remember me copying and 
> pasting the symlink on Linux yes ?
> 
> [steleman at darthvader][~][01/31/2005 15:15:08][7]>> ls -la /bin/sh
> lrwxrwxrwx    1 root     root            4 2003-12-27 23:33 /bin/sh -> 
> bash
> [steleman at darthvader][~][01/31/2005 15:15:12][8]>> 
> 
> "Write the Makefile commands (and any shell scripts, such as 
> configure) to run in sh, not in csh. Don't use any special features 
> of ksh or bash."
> 
> to be found at
>  
> http://www.gnu.org/software/make/manual/html_node/make_124.html#SEC128
> 
> well i have news for you. that is *not* the case. ./configure will 
> *NOT* run correctly with the Solaris /bin/sh.  it will only run
> correctly with /bin/bash, and with CONFIG_SHELL set to /bin/bash. you 
> can quote this sh-only syntax constraint on the FSF page all you 
> want. what matters here is reality, not recommendations, or 
> theoretcial points. and the reason ./configure will not run correctly 
> with the Solaris /bin/sh is because it is in fact written for 
> /bin/bash. there are also countless examples where common system 
> utilities like 'tar', 'rm' or 'diff' within ./configure generated 
> Makefiles are being passed GNU-specific command line options, which 
> are invalid with the Solaris distributed tar, rm, or diff. there are 
> also countless examples where ./configure generated Makefiles contain 
> directives or variables which are GNU make specific.

> you still have not shown which of my statements are "spreading FUD".
> 
> what exactly is it that you are trying to prove ? that documentation 
> found on URL's supersedes reality ?
> 
> --Stefan

But okay, let's examine your statement. It constitutes
of two sentences - right?

1'st sentence:

 > "It is not true that the FSF pages contain
 >  references to the Bourne shell."

http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_node/autoconf_114.html#SEC114
Autoconf: Portable Shell

2'nd sentence:

"They contain references to /bin/sh, which on
  GNU/Linux means the Bourne Again Shell, i.e. bash."

	Let's break this down in two parts:

	1'st:

	"They contain references to /bin/sh,"

		-> True, on the other hand I've so far not
		   found any single statement in the GNU
		   documentation that the GNU Autconf Tools
		   require bash e.g. by linking '/bin/sh'
		   to bash. True or False?

	"which on GNU/Linux means the Bourne Again Shell, i.e. bash."

		-> False: This is just a way of implementing
			  '/bin/sh' (a.k.a. Bourne Shell) on
			  the particular platform. It doesn't
			  mean less, nor more.

			  As I wrote in my earlier
			  mail in this thread:

 >> It only indicates that bash, which is the
 >> "Shell of the GNU operating system", is
 >> an sh-compatible shell. See bash, at:
 >>
 >> http://directory.fsf.org/GNU/bash.html
 >> Bash
 >>
 >> This is why it's perfectly legal to link '/bin/sh' to bash.

	I'm sure you *do* understand the difference.

-- 
----
------
--------

Rolf Sponsel

___________________________________________e_n_d___o_f___m_e_s_s_a_g_e_


More information about the kde-solaris mailing list