Subject: Re: CVS commit: pkgsrc/mk
To: Roland Illig <rillig@NetBSD.org>
From: Eric Haszlakiewicz <erh@netbsd.org>
List: pkgsrc-changes
Date: 11/17/2005 10:52:07
On Thu, Nov 17, 2005 at 10:07:41AM +0100, Roland Illig wrote:
> Eric Haszlakiewicz wrote:
> >	Well, that certainly makes the output look correct, but I don't
> >understand why you don't see any output without the patch.  The line
> >that calls check-vulnerable has a semicolon on the end:
> >        vul=`${MAKE} ${MAKEFLAGS} check-vulnerable`;        \
> >so the shell should keep processing the rest of the "command" that's been
> >fed to it, no?
> 
> No.
> 
> When invoked from make(1), the shell is always in "set -e" mode, that is 
> the first command giving an exitcode != 0 stops the whole program.

	eh? I tried this on two of my machines, and on mail.netbsd.org:
> cat Makefile
foo:
        echo foo; false; echo bar; set -o
> make foo
echo foo; false; echo bar; set -o
foo
bar
Current option settings
errexit         off
...rest of them are off also...

Is this something that has changed recently?  If it really is supposed to
work how you say it is, how can one ever use make to run a program that
doesn't return 0?  (e.g. even just a simple rv=`cmp -s a b` would cause
the script line to stop)

eric