mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-06 09:21:49 +00:00
Heuristics for determining python2 for OKL4
This commit is contained in:
parent
5bf5aa5e32
commit
de2723c794
@ -12,6 +12,18 @@ OKL4_VERSION = okl4_2.1.1-patch.9
|
|||||||
OKL4_ARCHIVE = $(OKL4_VERSION).tar.gz
|
OKL4_ARCHIVE = $(OKL4_VERSION).tar.gz
|
||||||
OKL4_URI = http://wiki.ok-labs.com/downloads/release-2.1.1-patch.9/$(OKL4_ARCHIVE)
|
OKL4_URI = http://wiki.ok-labs.com/downloads/release-2.1.1-patch.9/$(OKL4_ARCHIVE)
|
||||||
PATCHES = $(shell find patches -name *.patch)
|
PATCHES = $(shell find patches -name *.patch)
|
||||||
|
SHELL = bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# Determine python version to use for OKL4's elfweaver
|
||||||
|
#
|
||||||
|
PYTHON2 := $(notdir $(lastword $(shell which python2 python2.{4,5,6,7,8})))
|
||||||
|
ifeq ($(PYTHON2),)
|
||||||
|
prepare: python_not_installed
|
||||||
|
python_not_installed:
|
||||||
|
$(ECHO) "Error: OKL4 needs Python 2 to be installed"
|
||||||
|
@false;
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Print help information by default
|
# Print help information by default
|
||||||
@ -39,6 +51,7 @@ $(CONTRIB_DIR): $(DOWNLOAD_DIR)/$(OKL4_ARCHIVE)
|
|||||||
$(VERBOSE)mv $(OKL4_VERSION) $@
|
$(VERBOSE)mv $(OKL4_VERSION) $@
|
||||||
$(ECHO) "applying patches to '$(CONTRIB_DIR)/'"
|
$(ECHO) "applying patches to '$(CONTRIB_DIR)/'"
|
||||||
$(VERBOSE)for i in $(PATCHES); do patch -d $@ -p1 < $$i; done
|
$(VERBOSE)for i in $(PATCHES); do patch -d $@ -p1 < $$i; done
|
||||||
|
$(VERBOSE)sed -i "s/env python/env $(PYTHON2)/" $(CONTRIB_DIR)/tools/pyelf/elfweaver
|
||||||
|
|
||||||
prepare: $(CONTRIB_DIR)
|
prepare: $(CONTRIB_DIR)
|
||||||
|
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
--- a/tools/pyelf/elfweaver 2012-02-12 15:35:22.347943742 +0100
|
|
||||||
+++ b/tools/pyelf/elfweaver 2012-02-12 15:35:26.444610504 +0100
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/usr/bin/env python
|
|
||||||
+#!/usr/bin/env python2
|
|
||||||
#
|
|
||||||
# Copyright (c) 2007 Open Kernel Labs, Inc. (Copyright Holder).
|
|
||||||
# All rights reserved.
|
|
Loading…
x
Reference in New Issue
Block a user