[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Use $(PYTHON) Makefile variable when building the hypervisor.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1247149584 -3600
# Node ID f964ec3043635aa4bcceb309c1c5e9bad478f870
# Parent  4b6e4bb7b7b4234a18bde167853d9cadb6172e5d
Use $(PYTHON) Makefile variable when building the hypervisor.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---
 xen/include/Makefile    |    5 +++--
 xen/tools/get-fields.sh |    9 ++++++++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff -r 4b6e4bb7b7b4 -r f964ec304363 xen/include/Makefile
--- a/xen/include/Makefile      Thu Jul 09 08:52:31 2009 +0100
+++ b/xen/include/Makefile      Thu Jul 09 15:26:24 2009 +0100
@@ -52,7 +52,7 @@ compat/%.h: compat/%.i Makefile
        $(if $(filter-out compat/arch-%.h,$@),echo "#include <$(patsubst 
compat/%,public/%,$@)>" >>$@.new;) \
        $(if $(prefix-y),echo "$(prefix-y)" >>$@.new;) \
        grep -v '^# [0-9]' $< | \
-       $(BASEDIR)/tools/compat-build-header.py | uniq >>$@.new; \
+       $(PYTHON) $(BASEDIR)/tools/compat-build-header.py | uniq >>$@.new; \
        $(if $(suffix-y),echo "$(suffix-y)" >>$@.new;) \
        echo "#endif /* $$id */" >>$@.new
        mv -f $@.new $@
@@ -63,10 +63,11 @@ compat/%.c: public/%.h xlat.lst Makefile
 compat/%.c: public/%.h xlat.lst Makefile
        mkdir -p $(@D)
        grep -v 'DEFINE_XEN_GUEST_HANDLE(long)' $< | \
-        $(BASEDIR)/tools/compat-build-source.py >$@.new
+       $(PYTHON) $(BASEDIR)/tools/compat-build-source.py >$@.new
        mv -f $@.new $@
 
 compat/xlat.h: xlat.lst $(filter-out compat/xlat.h,$(headers-y)) 
$(BASEDIR)/tools/get-fields.sh Makefile
+       export PYTHON=$(PYTHON); \
        grep -v '^[      ]*#' xlat.lst | \
        while read what name hdr; do \
                $(SHELL) $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name 
$$(echo compat/$$hdr | sed 's,@arch@,$(compat-arch-y),g') || exit $$?; \
diff -r 4b6e4bb7b7b4 -r f964ec304363 xen/tools/get-fields.sh
--- a/xen/tools/get-fields.sh   Thu Jul 09 08:52:31 2009 +0100
+++ b/xen/tools/get-fields.sh   Thu Jul 09 15:26:24 2009 +0100
@@ -4,6 +4,13 @@ SED=sed
 SED=sed
 if test -x /usr/xpg4/bin/sed; then
        SED=/usr/xpg4/bin/sed
+fi
+if test -z ${PYTHON}; then
+       PYTHON=`/usr/bin/env python`
+fi
+if test -z ${PYTHON}; then
+       echo "Python not found"
+       exit 1
 fi
 
 get_fields ()
@@ -129,7 +136,7 @@ handle_field ()
                fi
        elif [ -z "$(echo "$5" | $SED 's,[^{}],,g')" ]
        then
-               local tag=$(echo "$5" | python -c '
+               local tag=$(echo "$5" | ${PYTHON} -c '
 import re,sys
 for line in sys.stdin.readlines():
     print re.subn(r"\s*(struct|union)\s+(compat_)?(\w+)\s.*", r"\3", 
line)[0].rstrip()

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.