[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: BSD (+/bin/sh) vs. GNU make -- `make check'

From: Paul D. Smith <pausmith_at_nortelnetworks.com>
Date: 2001-06-19 22:20:31 CEST

Just a note on this subject (I just joined the list so hopefully this
hasn't already been mentioned).

The difference I believe you're alluding to is whether make invokes
/bin/sh with the -e option by default or not.

Many (most) versions of make do actually invoke with the -e option,
always. However, the POSIX.2 definition of make is very clear on this
point, that make should invoke "/bin/sh -c ...".

GNU make follows the POSIX standard in this, rather than tradition.
That's why GNU make doesn't fail immediately.

The simple way to ensure that all versions of make behave the same is to
tell the shell explicitly what to do with the e flag; for example if you
want to ignore errors in all versions of make you can use "set +e" to
disable the "e" flag if it's set:

            set +e; \
            echo "START: $$progbase" >> $$logfile ; \
                ...

I think that's pretty portable.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@gnu.org>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:32 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.