Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Feb 1998 20:23:26 -0800
From:      Mike Smith <mike@smith.net.au>
To:        hackers@FreeBSD.ORG
Subject:   Odd(?) sh/make behaviour.
Message-ID:  <199802250423.UAA17980@dingo.cdrom.com>

next in thread | raw e-mail | index | archive | help

I'm looking at a Makefile that does:

foo::
	(set -e; cd foo; unset BAR BAZ; ./something; make stuff)

Now, if I walk up to sh and say 'set -e; unset FOO' where foo doesn't 
exist, sh immediately exit.  At this point, make throws in the towel.

But GNU make doesn't, and for that matter, sh doesn't exit under GNU 
make either, despite the 'set -e'.

So who's right?  Is it correct behaviour for 'unset' to return nonzero 
if the requested variables weren't set in the first place?  It doesn't 
seem to be intended that this command should fail (the entire item 
fails to build if that's the case...)

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802250423.UAA17980>