aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/Rules.mk5
-rw-r--r--tools/misc/Makefile5
-rw-r--r--tools/pygrub/Makefile1
-rw-r--r--tools/pygrub/src/pygrub2
4 files changed, 7 insertions, 6 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 $@ $<
diff --git a/tools/misc/Makefile b/tools/misc/Makefile
index 07a09708fe..d609971813 100644
--- a/tools/misc/Makefile
+++ b/tools/misc/Makefile
@@ -26,11 +26,6 @@ INSTALL_SBIN-y := xm xen-bugtool xen-python-path xend xenperf xsview xenpm xen-t
INSTALL_SBIN-$(CONFIG_X86) += xen-hvmctx
INSTALL_SBIN := $(INSTALL_SBIN-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)
-
.PHONY: all
all: build
diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
index b8b64a7794..49abed06d1 100644
--- a/tools/pygrub/Makefile
+++ b/tools/pygrub/Makefile
@@ -12,6 +12,7 @@ build:
install: all
CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \
$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" --force
+ $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(BINDIR)/pygrub
$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
.PHONY: clean
diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
index f386e23036..dd35a18536 100644
--- a/tools/pygrub/src/pygrub
+++ b/tools/pygrub/src/pygrub
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#! /usr/bin/env python
#
# pygrub - simple python-based bootloader for Xen
#