[Python-checkins] commit of r41907 - python/trunk/Makefile.pre.in

Sjoerd Mullender sjoerd at acm.org
Thu Jan 5 10:07:27 CET 2006


Neal Norwitz wrote:
> On 1/4/06, Sjoerd Mullender <sjoerd at acm.org> wrote:
> 
>>I assume the test is to see whether svnversion can be found in $PATH.
>>The test could be rewritten as
>>
>>if test -d $(srcdir)/.svn && which svnversion >/dev/null 2>&1; then ...
> 
> 
> I did something like this.  It works on Solaris 10, but Skip's OSX box
> is still not happy.  I'm not sure what I checked in is any more
> portable though.
> 
> n

Come to think of it, could the shell be the problem?

make normally tells the shell to exit after an error (-e flag).  More
modern shells don't take this to mean to exit if a program inside the
test of an if or while fails, but if I remember right, older shells (way
old) did exit.  In other words,

sh -ec 'if false; then echo no; else echo yes; fi'

should produce the text "yes", but if it doesn't, then the problem is in
the shell.

In contrast,

sh -ec 'false; echo yes'

should not produce "yes".

If this is the problem, the solution is to add an "-" to the start of
the command in the Makefile.

-- 
Sjoerd Mullender
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 369 bytes
Desc: OpenPGP digital signature
Url : http://mail.python.org/pipermail/python-checkins/attachments/20060105/ead95165/attachment.pgp 


More information about the Python-checkins mailing list