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

Sjoerd Mullender sjoerd at acm.org
Wed Jan 4 22:57:34 CET 2006


Barry Warsaw wrote:
> On Thu, 2006-01-05 at 02:38 +1100, Anthony Baxter wrote:
> 
>>On Wednesday 04 January 2006 20:29, Sjoerd Mullender wrote:
>>
>>>Neal Norwitz wrote:
>>>
>>>>This change broke on Solaris 10.
>>>>
>>>>http://www.python.org/dev/buildbot/sparc%20solaris10%20gcc%20trun
>>>>k/builds/48/step-compile/0
>>>>
>>>>make: Fatal error: Command failed for target `buildno'
>>>
>>>The program "type" is not portable: it's a bash-ism.
>>
>>/usr/bin/type exists, at least on Solaris 9.
>>
>>It seems to work the way the Makefile expects.
> 
> 
> I actually tested this on Solaris 9 (and Gentoo and MacOS 10.4) before
> checking it in, and it worked for me.  Verifying just now, I realized
> that's because I used GNU make instead of /usr/ccs/bin/make to do my
> test.  If I use the latter, it breaks.  GNU make works fine.
> 
> Unfortunately, /usr/bin/type doesn't seem to accept the -t flag for me
> on Solaris 9.  Okay, so what's the best (read: portable) way to do this?
> Maybe it's reasonable just to say that if you have a Subversion checkout
> of the tree, you better have svnversion on your $PATH?
> 
> The SF bug in question is #1395926.

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 ...

The program which is much more widely spread than type (it's much
older).  And if it doesn't exist, the test fails.

Or you could just try the program with the fallback strategy:

if test -d $(srcdir)/.svn && svnversion $(srcdir) > buildno 2>/dev/null
then	echo OK
elif ...




-- 
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/20060104/02d85034/attachment.pgp 


More information about the Python-checkins mailing list