[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [qemu-xen-unstable] get rid of hardcoded paths
commit 05135013b164cab4240ff3589f4e7bd9a1e369c3 Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Date: Tue Jun 30 14:46:42 2009 +0100 get rid of hardcoded paths Attached patches get rid of hardcoded pathes in ioemu and in ioemu-stubdom. You need xen changeset 19841 or newer to have them working. Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx> --- Makefile | 9 +++++---- xen-config-host.h | 3 --- xen-config.mak | 2 +- xen-hooks.mak | 2 +- xen-setup | 11 ++++++++++- xen-setup-stubdom | 14 ++++++++------ 6 files changed, 25 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index c395e77..e37e069 100644 --- a/Makefile +++ b/Makefile @@ -46,10 +46,11 @@ $(filter %-user,$(SUBDIR_RULES)): libqemu_user.a recurse-all: $(SUBDIR_RULES) -tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/libxc -tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib -tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore -tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/include +CPPFLAGS += -I$(XEN_ROOT)/tools/libxc +CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib +CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore +CPPFLAGS += -I$(XEN_ROOT)/tools/include + tapdisk-ioemu: tapdisk-ioemu.c cutils.c block.c block-raw.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c block-qcow2.c hw/xen_blktap.c osdep.c $(CC) -DQEMU_TOOL $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) $(LDFLAGS) $(BASE_LDFLAGS) -o $@ $^ -lz $(LIBS) diff --git a/xen-config-host.h b/xen-config-host.h index 5b1f4d7..f34e76b 100644 --- a/xen-config-host.h +++ b/xen-config-host.h @@ -32,9 +32,6 @@ extern int xc_handle; extern int xen_pause_requested; extern int vcpus; -#define DEFAULT_NETWORK_SCRIPT "/etc/xen/qemu-ifup" -#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/xen/qemu-ifdown" - #ifdef CONFIG_STUBDOM #define bdrv_host_device bdrv_raw #endif diff --git a/xen-config.mak b/xen-config.mak index 6210619..40984bc 100644 --- a/xen-config.mak +++ b/xen-config.mak @@ -8,4 +8,4 @@ CONFIG_SOFTMMU=yes CFLAGS += -I$(QEMU_ROOT)/hw -bindir = ${prefix}/${LIBLEAFDIR}/xen/bin +bindir = ${LIBEXEC} diff --git a/xen-hooks.mak b/xen-hooks.mak index c6b4f8c..211416e 100644 --- a/xen-hooks.mak +++ b/xen-hooks.mak @@ -78,4 +78,4 @@ datadir := $(subst qemu,xen/qemu,$(datadir)) docdir := $(subst qemu,xen/qemu,$(docdir)) mandir := $(subst share/man,share/xen/man,$(mandir)) -configdir := /etc/xen +configdir := $(XEN_SCRIPT_DIR) diff --git a/xen-setup b/xen-setup index 8ca0019..fde1568 100755 --- a/xen-setup +++ b/xen-setup @@ -9,7 +9,14 @@ rm -f config-host.mak if test -f config-host.h; then mv config-host.h config-host.h~; fi -./configure --disable-gfx-check --disable-curses --disable-slirp "$@" --prefix=/usr +if test -z "${PREFIX}"; then + PREFIX="/usr" +fi +if test -z "${XEN_SCRIPT_DIR}"; then + XEN_SCRIPT_DIR="/etc/xen/scripts" +fi + +./configure --disable-gfx-check --disable-curses --disable-slirp "$@" --prefix=${PREFIX} target=i386-dm @@ -22,6 +29,8 @@ ln -sf ../xen-config.mak $target/config.mak cat xen-config-host.mak >>config-host.mak sed -e 's,qemu,xen/qemu,' config-host.h >config-host.h.new +echo "#define DEFAULT_NETWORK_SCRIPT \"${XEN_SCRIPT_DIR}/qemu-ifup\"" >>config-host.h.new +echo "#define DEFAULT_NETWORK_DOWN_SCRIPT \"${XEN_SCRIPT_DIR}/qemu-ifdown\"" >>config-host.h.new echo '#include "xen-config-host.h"' >>config-host.h.new if test -f config-host.h~; then mv config-host.h~ config-host.h; fi diff --git a/xen-setup-stubdom b/xen-setup-stubdom index 835e505..fcf60c3 100755 --- a/xen-setup-stubdom +++ b/xen-setup-stubdom @@ -21,7 +21,7 @@ TARGET_CPPFLAGS += $TARGET_CPPFLAGS -DCONFIG_STUBDOM -D__XEN_TOOLS__ TARGET_CFLAGS= $TARGET_CFLAGS TARGET_LDFLAGS= $TARGET_LDFLAGS -bindir = \${prefix}/\${LIBLEAFDIR}/xen/bin +bindir = \${LIBEXEC} END mv -f $target/config.mak.new $target/config.mak #---------- @@ -31,7 +31,9 @@ ln -sf ../i386-dm/hookslib.mak $target/ #---------- cat <<END >config-host.h.new -#define CONFIG_QEMU_SHAREDIR "/usr/share/xen/qemu" +#define DEFAULT_NETWORK_SCRIPT "${XEN_SCRIPT_DIR}/qemu-ifup" +#define DEFAULT_NETWORK_DOWN_SCRIPT "${XEN_SCRIPT_DIR}/qemu-ifdown" +#define CONFIG_QEMU_SHAREDIR "${SHAREDIR}/xen/qemu" #define HOST_I386 1 #define HOST_LONG_BITS 32 #define HAVE_BYTESWAP_H 1 @@ -46,11 +48,11 @@ mv -f config-host.h.new config-host.h #---------- cat <<END >config-host.mak.new CONFIG_STUBDOM=yes -prefix=/usr +prefix=$(PREFIX) bindir=\${prefix}/bin -mandir=\${prefix}/share/man -datadir=\${prefix}/share/qemu -docdir=\${prefix}/share/doc/qemu +mandir=\$(MANDIR) +datadir=\$(SHAREDIR)/qemu +docdir=\$(SHAREDIR)/doc/qemu MAKE=make INSTALL=install CC=gcc -- generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |