[commit: testsuite] master: Use python2 if it exists. Based on a patch from michalt. Fixes #7333. (e7a338e)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/e7a338e13825524c5b9ea0354e633983acee4baf

>---------------------------------------------------------------

commit e7a338e13825524c5b9ea0354e633983acee4baf
Author: Ian Lynagh <[email protected]>
Date:   Fri Nov 30 12:05:02 2012 +0000

    Use python2 if it exists. Based on a patch from michalt. Fixes #7333.

>---------------------------------------------------------------

 mk/boilerplate.mk |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/mk/boilerplate.mk b/mk/boilerplate.mk
index 56b0284..f1cd6c8 100644
--- a/mk/boilerplate.mk
+++ b/mk/boilerplate.mk
@@ -126,6 +126,9 @@ GS = gs
 CP = cp
 RM = rm -f
 PYTHON = python
+ifeq "$(shell $(SHELL) -c 'python2 -c 0' 2> /dev/null && echo exists)" "exists"
+PYTHON = python2
+endif
 
 # -----------------------------------------------------------------------------
 # configuration of TEST_HC
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.