changeset 18604:39441c10d314

try to be more precise about python executable name
author Doug Simon <doug.simon@oracle.com>
date Wed, 03 Dec 2014 22:10:15 +0100
parents 43e2cc9a4fde
children 58eb9bbb60c4
files make/Makefile
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/make/Makefile	Wed Dec 03 18:53:22 2014 +0100
+++ b/make/Makefile	Wed Dec 03 22:10:15 2014 +0100
@@ -306,9 +306,20 @@
 			$(MAKE_ARGS) $(VM_TARGET) 
 
 
+
+ifeq (, $(shell python2.7 --version 2>/dev/null && echo ok))
+  ifeq (, $(shell python2.6 --version 2>/dev/null && echo ok))
+    PYTHON=python
+  else
+    PYTHON=python2.6
+  endif
+else
+  PYTHON=python2.7
+endif
+
 # Builds code that can be shared among different build flavors
 buildshared:
-	python2 -u $(GAMMADIR)/mxtool/mx.py build --no-native --export-dir $(SHARED_DIR)
+	$(PYTHON) -u $(GAMMADIR)/mxtool/mx.py build --no-native --export-dir $(SHARED_DIR)
 
 # Export file rule
 generic_export: $(EXPORT_LIST)