diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-08-25 14:57:45 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-08-25 14:57:45 +0100 |
commit | 6c6b085beced4251777c753389dedeacdeced75e (patch) | |
tree | 1cf3677433e3be85f5cc868b2f31aeec0248d39d /tools/Rules.mk | |
parent | 1b14383998f80e4108167ef224a402a28e13f5bd (diff) | |
download | xen-6c6b085beced4251777c753389dedeacdeced75e.tar.gz xen-6c6b085beced4251777c753389dedeacdeced75e.tar.bz2 xen-6c6b085beced4251777c753389dedeacdeced75e.zip |
pygrub: Set path in #! line of pygrub, too
pygrub currently has a hardcoded path of /usr/bin/python which is not
correct if the version of python at install time is not the same as
that at build time. This patch uses the existing install-wrap and
python/get-path machinery.
(It does not address the currently-existing bug that the get-path
machinery works by assuming that `python' is a symlink, rather than
querying the python interpreter for its version.)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/Rules.mk')
-rw-r--r-- | tools/Rules.mk | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/Rules.mk b/tools/Rules.mk index 53434d51fc..ae7bf0e316 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -49,6 +49,11 @@ check-$(CONFIG_X86) = $(call cc-ver-check,CC,0x030400,\ "Xen requires at least gcc-3.4") $(eval $(check-y)) +DEFAULT_PYTHON_PATH := $(shell $(XEN_ROOT)/tools/python/get-path) +PYTHON_PATH ?= $(DEFAULT_PYTHON_PATH) +INSTALL_PYTHON_PROG = \ + $(XEN_ROOT)/tools/python/install-wrap "$(PYTHON_PATH)" $(INSTALL_PROG) + %.opic: %.c $(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $< |