Hi,
 
It seams that our /bin/ksh is the Korn shell. ksh --version doesn't print 
'Korn' somewhere, so I was confused.
 
Dave Korn has acknowledged that it is a bug in the Korn shell. He fixed it and 
it will be available in the next ksh93 release.
 
-- 
Erwin Waterlander 
________________________________

From: Erwin Waterlander
Sent: Thu 6/21/2007 9:46
To: [EMAIL PROTECTED]
Cc: bug-make@gnu.org; Erwin Waterlander
Subject: RE: Problems with gmake and pipefail. make doesn't give up.


Hi,
 
/bin/ksh is not a Korn shell on our system. It is AT&T sh (version 1993-12-28 
p). This shell supports pipefail, but apparently not correctly. $? is set 
correctly, but somehow gnu-make doesn't catch it.
/bin/sh on our system is bash 2.05, this one doesn't support pipefail. The 
adminstrators installed it this way, probably for historic reasons. The system 
is RedHat Enterprise Linux 3. The default shell we work in is /bin/ksh.
 
I'm also not happy with this shell specific solution, but I have not found a 
better way to do it.
 
By the way, we found a workaround for our /bin/ksh. If we add
; exit $$?
at the end of the line in the makefile it works. 
 
-- 
Erwin Waterlander

________________________________

From: Paul Smith [mailto:[EMAIL PROTECTED]
Sent: Thu 6/21/2007 4:42
To: Erwin Waterlander
Cc: bug-make@gnu.org
Subject: RE: Problems with gmake and pipefail. make doesn't give up.



On Wed, 2007-06-20 at 17:32 +0200, Erwin Waterlander wrote:
> I compiled bash 3.2 locally. When I set
> SHELL=/home/waterlan/src/bash-3.2/bash -e -o pipefail   everything
> works as expected. So the problem must be in the AT&T sh.

As far as I know, ksh doesn't support pipefail.  If so, it's not a
"problem" in that shell; the problem is you're trying to use a
bash-specific extension (pipefail option) in a shell other than bash.

Personally, I would be very unhappy to run across a makefile that was
built to only work with bash and no other shell.  I realize it's messy
to handle errors from early commands in pipelines, but it IS possible to
do in standard sh without using extensions.

Regardless, at least if you set SHELL in the makefile to bash it will be
clear what's required so that's a good thing.


Cheers!

--
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org <http://www.gnu.org/>                       
http://make.paulandlesley.org <http://make.paulandlesley.org/> 
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to