debuggers.hg

changeset 19954:f964ec304363

Use $(PYTHON) Makefile variable when building the hypervisor.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jul 09 15:26:24 2009 +0100 (2009-07-09)
parents 4b6e4bb7b7b4
children 885575267e2b
files xen/include/Makefile xen/tools/get-fields.sh
line diff
     1.1 --- a/xen/include/Makefile	Thu Jul 09 08:52:31 2009 +0100
     1.2 +++ b/xen/include/Makefile	Thu Jul 09 15:26:24 2009 +0100
     1.3 @@ -52,7 +52,7 @@ compat/%.h: compat/%.i Makefile
     1.4  	$(if $(filter-out compat/arch-%.h,$@),echo "#include <$(patsubst compat/%,public/%,$@)>" >>$@.new;) \
     1.5  	$(if $(prefix-y),echo "$(prefix-y)" >>$@.new;) \
     1.6  	grep -v '^# [0-9]' $< | \
     1.7 -	$(BASEDIR)/tools/compat-build-header.py | uniq >>$@.new; \
     1.8 +	$(PYTHON) $(BASEDIR)/tools/compat-build-header.py | uniq >>$@.new; \
     1.9  	$(if $(suffix-y),echo "$(suffix-y)" >>$@.new;) \
    1.10  	echo "#endif /* $$id */" >>$@.new
    1.11  	mv -f $@.new $@
    1.12 @@ -63,10 +63,11 @@ compat/%.i: compat/%.c Makefile
    1.13  compat/%.c: public/%.h xlat.lst Makefile
    1.14  	mkdir -p $(@D)
    1.15  	grep -v 'DEFINE_XEN_GUEST_HANDLE(long)' $< | \
    1.16 -        $(BASEDIR)/tools/compat-build-source.py >$@.new
    1.17 +	$(PYTHON) $(BASEDIR)/tools/compat-build-source.py >$@.new
    1.18  	mv -f $@.new $@
    1.19  
    1.20  compat/xlat.h: xlat.lst $(filter-out compat/xlat.h,$(headers-y)) $(BASEDIR)/tools/get-fields.sh Makefile
    1.21 +	export PYTHON=$(PYTHON); \
    1.22  	grep -v '^[	 ]*#' xlat.lst | \
    1.23  	while read what name hdr; do \
    1.24  		$(SHELL) $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name $$(echo compat/$$hdr | sed 's,@arch@,$(compat-arch-y),g') || exit $$?; \
     2.1 --- a/xen/tools/get-fields.sh	Thu Jul 09 08:52:31 2009 +0100
     2.2 +++ b/xen/tools/get-fields.sh	Thu Jul 09 15:26:24 2009 +0100
     2.3 @@ -5,6 +5,13 @@ SED=sed
     2.4  if test -x /usr/xpg4/bin/sed; then
     2.5  	SED=/usr/xpg4/bin/sed
     2.6  fi
     2.7 +if test -z ${PYTHON}; then
     2.8 +	PYTHON=`/usr/bin/env python`
     2.9 +fi
    2.10 +if test -z ${PYTHON}; then
    2.11 +	echo "Python not found"
    2.12 +	exit 1
    2.13 +fi
    2.14  
    2.15  get_fields ()
    2.16  {
    2.17 @@ -129,7 +136,7 @@ handle_field ()
    2.18  		fi
    2.19  	elif [ -z "$(echo "$5" | $SED 's,[^{}],,g')" ]
    2.20  	then
    2.21 -		local tag=$(echo "$5" | python -c '
    2.22 +		local tag=$(echo "$5" | ${PYTHON} -c '
    2.23  import re,sys
    2.24  for line in sys.stdin.readlines():
    2.25      print re.subn(r"\s*(struct|union)\s+(compat_)?(\w+)\s.*", r"\3", line)[0].rstrip()