mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-19 11:16:57 +00:00
Pistachio: fix usage of wrong python version
The CML2 configuration system calls 'evn python' and expects version 2.x. So we check if python2 is installed when preparing Pistachio and use the found version instead. Fixes #264.
This commit is contained in:
parent
b8ee4bda81
commit
d9d22fbf75
@ -22,6 +22,17 @@ $(call check_tool,sed)
|
||||
$(call check_tool,autoheader)
|
||||
$(call check_tool,autoconf)
|
||||
|
||||
#
|
||||
# Determine python version to use for CML2
|
||||
#
|
||||
PYTHON2 := $(notdir $(lastword $(shell which python2 python2.{4,5,6,7,8})))
|
||||
ifeq ($(PYTHON2),)
|
||||
prepare: python_not_installed
|
||||
python_not_installed:
|
||||
$(ECHO) "Error: CML2 Configuration System needs Python 2 to be installed"
|
||||
@false;
|
||||
endif
|
||||
|
||||
#
|
||||
# Print help information by default
|
||||
#
|
||||
@ -45,6 +56,8 @@ prepare: $(CONTRIB_DIR)
|
||||
$(VERBOSE)sed -i "/LD=/s/^.*$$/LD=\$$(CC)/" $(CONTRIB_DIR)/user/config.mk.in
|
||||
$(ECHO) "applying patches to '$(CONTRIB_DIR)/'"
|
||||
$(VERBOSE)for i in $(PATCHES); do patch -d $(CONTRIB_DIR) -p1 < $$i; done
|
||||
$(VERBOSE)for i in cmlcompile.py cmlconfigure.py configtrans.py; do \
|
||||
sed -i "s/env python/env $(PYTHON2)/" $(CONTRIB_DIR)/contrib/cml2/$$i; done
|
||||
$(VERBOSE)cd $(CONTRIB_DIR)/user; autoheader; autoconf;
|
||||
|
||||
clean::
|
||||
|
Loading…
Reference in New Issue
Block a user