From: Samuel Martin <s.martin49@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] Makefile.in: add host python2 binary detection
Date: Tue, 8 May 2012 22:45:48 +0200 [thread overview]
Message-ID: <1336509949-19630-2-git-send-email-s.martin49@gmail.com> (raw)
In-Reply-To: <1336509949-19630-1-git-send-email-s.martin49@gmail.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
diff --git a/package/Makefile.in b/package/Makefile.in
index df7042c..84968da 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -151,6 +151,18 @@ FLEX:=$(shell which flex || type -p flex)
BISON:=$(shell which bison || type -p bison)
SED:=$(shell which sed || type -p sed) -i -e
+PYTHON2:=$(shell \
+ which python &>/dev/null && \
+ python --version 2>&1 | grep -qE 'Python 2\.[6-7]*' && \
+ which python || \
+ which python2 &>/dev/null && \
+ python2 --version 2>&1 | grep -qE 'Python 2\.[6-7]*' && \
+ which python2 || \
+ echo $(HOST_DIR)/usr/bin/python)
+HOST_PYTHON2:=$(shell \
+ test $(PYTHON2) != $(HOST_DIR)/usr/bin/python || \
+ echo host-python)
+
HOST_CFLAGS ?= -O2
HOST_CFLAGS += -I$(HOST_DIR)/include -I$(HOST_DIR)/usr/include
HOST_CXXFLAGS += -I$(HOST_DIR)/include -I$(HOST_DIR)/usr/include
--
1.7.10.1
next prev parent reply other threads:[~2012-05-08 20:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 20:45 [Buildroot] [PATCH 0/2] Ensure host python is python2 Samuel Martin
2012-05-08 20:45 ` Samuel Martin [this message]
2012-05-11 22:15 ` [Buildroot] [PATCH 1/2] Makefile.in: add host python2 binary detection Arnout Vandecappelle
2012-05-11 22:50 ` Samuel Martin
2012-05-13 10:43 ` [Buildroot] [PATCH v2 1/2] dependencies: build a host python2 if no suitable one can be found Samuel Martin
2012-05-13 10:43 ` [Buildroot] [PATCH v2 2/2] libglib2: fix install even if the host python binary refers to python3 Samuel Martin
2012-05-15 21:43 ` [Buildroot] [PATCH v2 1/2] dependencies: build a host python2 if no suitable one can be found Arnout Vandecappelle
2012-05-15 22:01 ` Samuel Martin
2012-05-08 20:45 ` [Buildroot] [PATCH 2/2] libglib2: fix install even if the host python binary refers to python3 Samuel Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1336509949-19630-2-git-send-email-s.martin49@gmail.com \
--to=s.martin49@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox