From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: Re: Re: [PATCH] ioemu: Fixes for build/install system Date: Fri, 8 May 2009 11:29:25 +0200 Message-ID: <200905081129.26174.Christoph.Egger@amd.com> References: <200903311422.14692.Christoph.Egger@amd.com> <200905051725.16326.Christoph.Egger@amd.com> <18944.30162.700713.779267@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_2t/AK6pwxVrINT/" Return-path: In-Reply-To: <18944.30162.700713.779267@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" , Keir Fraser List-Id: xen-devel@lists.xenproject.org --Boundary-00=_2t/AK6pwxVrINT/ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tuesday 05 May 2009 19:22:26 Ian Jackson wrote: > Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for build/install system"): > > No, this would end up in having different prefixes on NetBSD at least. > > xen tools go to /usr/pkg and ioemu goes to /usr/local - great! > > > > If you don't know a way how to make xen-setup to read the PREFIX > > make variable from xen's build system, > > It might be possible to have the generated makefiles (eg, the various > xen-*.mak) contrive to use the value from the Xen build system > regardless. > > > then my patch is the only way to go. > > I'm afraid that that patch is not suitable because it breaks the > output locations when you run xen-setup by hand. Why do you want to have ioemu separately? It's part of xen tools and useless on its own. That's my understanding at least. > It's essential to allow people to run xen-setup by hand as that's the > only way to reliably rerun from scratch just the qemu-xen-unstable > part of the build system. I attached a new version of xen_build_ioemu.diff which sets PREFIX to /usr if empty - the default prefix it uses now. Keir: Please apply attached xen_ioemu_prefix.diff to the xen tree. Both patches combined let xen-setup work in both modes: entangled in xen build system and separate as requested by Ian. Signed-off-by: Christoph Egger Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --Boundary-00=_2t/AK6pwxVrINT/ Content-Type: text/x-diff; charset="iso-8859-1"; name="xen_build_ioemu.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_build_ioemu.diff" diff --git a/Makefile b/Makefile index c395e77..d5941c7 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.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-setup b/xen-setup index 8ca0019..bdce4bc 100755 --- a/xen-setup +++ b/xen-setup @@ -9,7 +9,11 @@ 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 + +./configure --disable-gfx-check --disable-curses --disable-slirp "$@" --prefix=${PREFIX} target=i386-dm diff --git a/xen-setup-stubdom b/xen-setup-stubdom index 835e505..086c834 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,7 @@ ln -sf ../i386-dm/hookslib.mak $target/ #---------- cat <config-host.h.new -#define CONFIG_QEMU_SHAREDIR "/usr/share/xen/qemu" +#define CONFIG_QEMU_SHAREDIR "${SHAREDIR}/xen/qemu" #define HOST_I386 1 #define HOST_LONG_BITS 32 #define HAVE_BYTESWAP_H 1 @@ -46,11 +46,11 @@ mv -f config-host.h.new config-host.h #---------- cat <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 --Boundary-00=_2t/AK6pwxVrINT/ Content-Type: text/x-diff; charset="iso-8859-1"; name="xen_ioemu_prefix.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_ioemu_prefix.diff" diff -r f80cf52a4fb6 stubdom/Makefile --- a/stubdom/Makefile Thu Apr 30 14:34:15 2009 +0100 +++ b/stubdom/Makefile Mon May 04 11:35:03 2009 +0200 @@ -235,6 +235,8 @@ libxc-$(XEN_TARGET_ARCH)/libxenctrl.a li ioemu: cross-zlib cross-libpci libxc [ -f ioemu/config-host.mak ] || \ ( $(absolutify_xen_root); \ + PREFIX=$(PREFIX); \ + export PREFIX; \ cd ioemu ; \ LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) \ TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" \ diff -r f80cf52a4fb6 tools/Makefile --- a/tools/Makefile Thu Apr 30 14:34:15 2009 +0100 +++ b/tools/Makefile Mon May 04 11:35:03 2009 +0200 @@ -91,6 +94,8 @@ ioemu-dir-find: fi set -e; \ $(absolutify_xen_root); \ + PREFIX=$(PREFIX); \ + export PREFIX; \ cd ioemu-dir; \ ./xen-setup $(IOEMU_CONFIGURE_CROSS) --Boundary-00=_2t/AK6pwxVrINT/ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_2t/AK6pwxVrINT/--