Skip to contentSkip to conversation

Fixes for build/install system

PATCH In review Christoph Egger 2 participants 17 messages Mar 31, 2009 – May 8, 2009 2 messages not in the archive Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fixes for build/install system

Hi,

Attached patches get rid of hardcoded install path,
fixes wrong install paths and replaces mkdir -p with $(INSTALL_DIR). All in all, a command like PREFIX="/usr/local" gmake dist now installs everything into dist/install/usr/local instead of dist/install/usr

The xen_build.diff is for xen tree,
xen_build_ioemu.diff is for ioemu git tree.

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
Makefile +13 -12
index c395e77..c3c6f33 100644
@@ -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)
 
@@ -230,28 +231,28 @@ BLOBS=
 endif
 
 install-doc: $(DOCS)
-	mkdir -p "$(DESTDIR)$(docdir)"
+	$(INSTALL_DIR) "$(DESTDIR)$(docdir)"
 	$(INSTALL) -m 644 qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
 ifndef CONFIG_WIN32
-	mkdir -p "$(DESTDIR)$(mandir)/man1"
-	$(INSTALL) -m 644 qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
-	mkdir -p "$(DESTDIR)$(mandir)/man8"
-	$(INSTALL) -m 644 qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
+	$(INSTALL_DIR) "$(DESTDIR)$(MAN1DIR)"
+	$(INSTALL) -m 644 qemu.1 qemu-img.1 "$(DESTDIR)$(MAN1DIR)"
+	$(INSTALL_DIR) "$(DESTDIR)$(MAN8DIR)"
+	$(INSTALL) -m 644 qemu-nbd.8 "$(DESTDIR)$(MAN8DIR)"
 endif
 
 install: all $(if $(BUILD_DOCS),install-doc)
-	mkdir -p "$(DESTDIR)$(bindir)"
+	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
 ifneq ($(TOOLS),)
 	$(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
 endif
 ifneq ($(BLOBS),)
-	mkdir -p "$(DESTDIR)$(datadir)"
+	$(INSTALL_DIR) "$(DESTDIR)$(datadir)"
 	set -e; for x in $(BLOBS); do \
 		$(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
 	done
 endif
 ifndef CONFIG_WIN32
-	mkdir -p "$(DESTDIR)$(datadir)/keymaps"
+	$(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
 	set -e; for x in $(KEYMAPS); do \
 		$(INSTALL) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
 	done
xen-config.mak +1 -1
index 6210619..40984bc 100644
@@ -8,4 +8,4 @@ CONFIG_SOFTMMU=yes
 
 CFLAGS += -I$(QEMU_ROOT)/hw
 
-bindir = ${prefix}/${LIBLEAFDIR}/xen/bin
+bindir = ${LIBEXEC}
xen-setup +1 -1
index 8ca0019..76b1f02 100755
@@ -9,7 +9,7 @@ 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
+./configure --disable-gfx-check --disable-curses --disable-slirp "$@" --prefix=$(PREFIX)
 
 target=i386-dm
 
xen-setup-stubdom +5 -5
index 835e505..eb62ed5 100755
@@ -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 <<END >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
@@ -48,9 +48,9 @@ cat <<END >config-host.mak.new
 CONFIG_STUBDOM=yes
 prefix=/usr
 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
Config.mk +4 -2
diff -r f2cf89a4e762 Config.mk
@@ -19,8 +19,6 @@ HOSTCFLAGS += -fno-strict-aliasing
 
 DISTDIR     ?= $(XEN_ROOT)/dist
 DESTDIR     ?= /
-DOCDIR      ?= /usr/share/doc/xen
-MANDIR      ?= /usr/share/man
 
 # Allow phony attribute to be listed as dependency rather than fake target
 .PHONY: .phony
@@ -28,6 +26,10 @@ MANDIR      ?= /usr/share/man
 include $(XEN_ROOT)/config/$(XEN_OS).mk
 include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
 
+SHAREDIR    ?= $(PREFIX)/share
+DOCDIR      ?= $(SHAREDIR)/doc/xen
+MANDIR      ?= $(SHAREDIR)/man
+
 ifneq ($(EXTRA_PREFIX),)
 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBLEAFDIR)
config/StdGNU.mk +2 -1
diff -r f2cf89a4e762 config/StdGNU.mk
@@ -31,7 +31,8 @@ LIBDIR = $(PREFIX)/$(LIBLEAFDIR)
 LIBDIR_x86_32 = $(PREFIX)/$(LIBLEAFDIR_x86_32)
 LIBDIR_x86_64 = $(PREFIX)/$(LIBLEAFDIR_x86_64)
 LIBEXEC = $(LIBDIR_x86_32)/xen/bin
-MANDIR = $(PREFIX)/share/man
+SHAREDIR = $(PREFIX)/share
+MANDIR = $(SHAREDIR)/man
 MAN1DIR = $(MANDIR)/man1
 MAN8DIR = $(MANDIR)/man8
 SBINDIR = $(PREFIX)/sbin
tools/pygrub/Makefile +1 -1
diff -r f2cf89a4e762 tools/pygrub/Makefile
@@ -12,7 +12,7 @@ build:
 ifndef XEN_PYTHON_NATIVE_INSTALL
 install: LIBPATH=$(shell PYTHONPATH=../python/xen/util python -c "import auxbin; print auxbin.libpath()")
 install: all
-	CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --install-lib="$(DESTDIR)$(LIBPATH)/python"
+	CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)$(PREFIX)" --prefix="" --install-lib="$(DESTDIR)$(LIBDIR)/python"
 	$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
 else
 install: all
tools/python/Makefile +5 -5
diff -r f2cf89a4e762 tools/python/Makefile
@@ -12,7 +12,7 @@ PODIR := xen/xm/messages
 POTFILE := $(PODIR)/xen-xm.pot
 I18NSRCFILES = $(shell find xen/xm/ -name '*.py')
 CATALOGS = $(patsubst %,xen/xm/messages/%.mo,$(LINGUAS))
-NLSDIR = /usr/share/locale
+NLSDIR = $(SHAREDIR)/locale
 
 .PHONY: build buildpy
 buildpy: 
@@ -57,19 +57,19 @@ refresh-po: $(POTFILE)
 ifndef XEN_PYTHON_NATIVE_INSTALL
 install: LIBPATH=$(shell PYTHONPATH=xen/util python -c "import auxbin; print auxbin.libpath()")
 install: install-messages install-dtd
-	CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force --install-lib="$(DESTDIR)$(LIBPATH)/python"
+	CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)$(PREFIX)" --prefix="" --force --install-lib="$(DESTDIR)$(LIBDIR)/python"
 else
 install: install-messages install-dtd
 	CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
 endif
 
 install-dtd: all
-	$(INSTALL_DIR) $(DESTDIR)/usr/share/xen
-	$(INSTALL_DATA) xen/xm/create.dtd $(DESTDIR)/usr/share/xen
+	$(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
+	$(INSTALL_DATA) xen/xm/create.dtd $(DESTDIR)$(DOCDIR)
 
 install-messages: all
 	set -e; if which $(MSGFMT) >/dev/null ; then \
-		mkdir -p $(DESTDIR)$(NLSDIR); \
+		$(INSTALL_DIR) $(DESTDIR)$(NLSDIR); \
 		for l in $(LINGUAS); do \
 			$(INSTALL_DIR) $(DESTDIR)$(NLSDIR)/$$l; \
 			$(INSTALL_DIR) $(DESTDIR)$(NLSDIR)/$$l/LC_MESSAGES; \

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

Christoph Egger writes ("[PATCH] Fixes for build/install system"):

Quoted 5 lines

Attached patches get rid of hardcoded install path,
fixes wrong install paths and replaces mkdir -p with $(INSTALL_DIR). All in all, a command like PREFIX="/usr/local" gmake dist now installs everything into dist/install/usr/local instead of dist/install/usr

This is all very nice but

Makefile BLOBS= · line 235

Quoted 4 lines

install-doc: $(DOCS)

Makefile +1 -1
-	mkdir -p "$(DESTDIR)$(docdir)"
+	$(INSTALL_DIR) "$(DESTDIR)$(docdir)"
 	$(INSTALL) -m 644 qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"

these are parts of the Makefile which come from upstream qemu. I definitely don't want to modify those parts. Everything which is done in the makefiles in qemu-xen-unstable is aimed at avoiding large textual changes which make merging difficult. We don't want changes in our versions of the upstream makefiles which are not absolutely necessary to make things work.

It's not clear to me by inspection whether I can safely apply the other parts of your qemu patch on their own. Can you confirm ?

Ian.

#2 lore raw
Quoted 21 lines · On Tuesday 31 March 2009 18:11:45 Ian Jackson wrote:

Christoph Egger writes ("[PATCH] Fixes for build/install system"):

Quoted 5 lines

Attached patches get rid of hardcoded install path,
fixes wrong install paths and replaces mkdir -p with $(INSTALL_DIR). All in all, a command like PREFIX="/usr/local" gmake dist now installs everything into dist/install/usr/local instead of dist/install/usr

This is all very nice but

Makefile BLOBS= · line 235

Quoted 4 lines

install-doc: $(DOCS)

Makefile +1 -1
-	mkdir -p "$(DESTDIR)$(docdir)"
+	$(INSTALL_DIR) "$(DESTDIR)$(docdir)"
 	$(INSTALL) -m 644 qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"

these are parts of the Makefile which come from upstream qemu. I definitely don't want to modify those parts. Everything which is done in the makefiles in qemu-xen-unstable is aimed at avoiding large textual changes which make merging difficult. We don't want changes in our versions of the upstream makefiles which are not absolutely necessary to make things work.

Quoted 2 lines

It's not clear to me by inspection whether I can safely apply the other parts of your qemu patch on their own. Can you confirm ?

Yes, I can confirm. It is just less consistent throughout the whole xen build/install system.

Christoph

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
#5 lore raw

Re: [PATCH] ioemu: Fixes for build/install system

In reply to a message not in the archive

Hi,

Attached patch has some fixes for the build/install system which allows to use qemu-dm
when the whole xen tree is build with a different PREFIX.

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
Makefile +17 -16
index c395e77..d5941c7 100644
@@ -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)
 
@@ -230,30 +231,30 @@ BLOBS=
 endif
 
 install-doc: $(DOCS)
-	mkdir -p "$(DESTDIR)$(docdir)"
-	$(INSTALL) -m 644 qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
+	$(INSTALL_DIR) "$(DESTDIR)$(docdir)"
+	$(INSTALL_DATA) qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
 ifndef CONFIG_WIN32
-	mkdir -p "$(DESTDIR)$(mandir)/man1"
-	$(INSTALL) -m 644 qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
-	mkdir -p "$(DESTDIR)$(mandir)/man8"
-	$(INSTALL) -m 644 qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
+	$(INSTALL_DIR) "$(DESTDIR)$(MAN1DIR)"
+	$(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(MAN1DIR)"
+	$(INSTALL_DIR) "$(DESTDIR)$(MAN8DIR)"
+	$(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(MAN8DIR)"
 endif
 
 install: all $(if $(BUILD_DOCS),install-doc)
-	mkdir -p "$(DESTDIR)$(bindir)"
+	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
 ifneq ($(TOOLS),)
-	$(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
+	$(INSTALL_PROG) -s $(TOOLS) "$(DESTDIR)$(bindir)"
 endif
 ifneq ($(BLOBS),)
-	mkdir -p "$(DESTDIR)$(datadir)"
+	$(INSTALL_DIR) "$(DESTDIR)$(datadir)"
 	set -e; for x in $(BLOBS); do \
-		$(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
+		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
 	done
 endif
 ifndef CONFIG_WIN32
-	mkdir -p "$(DESTDIR)$(datadir)/keymaps"
+	$(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
 	set -e; for x in $(KEYMAPS); do \
-		$(INSTALL) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
+		$(INSTALL_DATA) $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
 	done
 endif
 	for d in $(TARGET_DIRS); do \
configure +3 -0
index 920dd1e..eb60a72 100755
@@ -1215,6 +1215,9 @@ echo "docdir=\${prefix}$docsuffix" >> $config_mak
 echo "#define CONFIG_QEMU_SHAREDIR \"$prefix$datasuffix\"" >> $config_h
 echo "MAKE=$make" >> $config_mak
 echo "INSTALL=$install" >> $config_mak
+echo "INSTALL_DIR=$install -d -m0755 -p" >> $config_mak
+echo "INSTALL_DATA=$install -m0644 -p" >> $config_mak
+echo "INSTALL_PROG=$install -m0755 -p" >> $config_mak
 echo "CC=$cc" >> $config_mak
 echo "HOST_CC=$host_cc" >> $config_mak
 echo "AR=$ar" >> $config_mak
xen-config.mak +1 -1
index 6210619..40984bc 100644
@@ -8,4 +8,4 @@ CONFIG_SOFTMMU=yes
 
 CFLAGS += -I$(QEMU_ROOT)/hw
 
-bindir = ${prefix}/${LIBLEAFDIR}/xen/bin
+bindir = ${LIBEXEC}
xen-setup +1 -1
index 8ca0019..946dfc0 100755
@@ -9,7 +9,7 @@ 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
+./configure --disable-gfx-check --disable-curses --disable-slirp "$@" --prefix=${PREFIX}
 
 target=i386-dm
 
xen-setup-stubdom +6 -6
index 835e505..086c834 100755
@@ -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 <<END >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 <<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

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#6 lore raw

Re: Re: [PATCH] ioemu: Fixes for build/install system

Christoph Egger writes ("[Xen-devel] Re: [PATCH] ioemu: Fixes for build/install system"):

Quoted 4 lines

install-doc: $(DOCS)

Makefile +1 -2
-	mkdir -p "$(DESTDIR)$(docdir)"
-	$(INSTALL) -m 644 qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
+	$(INSTALL_DIR) "$(DESTDIR)$(docdir)"

Makefile BLOBS= · line 240

Quoted 10 lines
Makefile +5 -4
+	$(INSTALL_DATA) qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
 ifndef CONFIG_WIN32
-	mkdir -p "$(DESTDIR)$(mandir)/man1"
-	$(INSTALL) -m 644 qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
-	mkdir -p "$(DESTDIR)$(mandir)/man8"
-	$(INSTALL) -m 644 qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
+	$(INSTALL_DIR) "$(DESTDIR)$(MAN1DIR)"
+	$(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(MAN1DIR)"
+	$(INSTALL_DIR) "$(DESTDIR)$(MAN8DIR)"
+	$(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(MAN8DIR)"

Once again, these are changes to code from upstream. I see that this change has been applied upstream. Please try to avoid submitting changes for inclusion both in upstream and in qemu-xen-unstable. That causes trouble when I pull. If there is a compelling reason why the change should be included in Xen before we get it via upstream in the usual course of events, then we might relax this rule but you should mention this fact and give an explanation.

In this case the upstream change comes too late to be included in 3.4
- it is (quite correctly) only on the upstream main branch, not on the upstream stable branch.

Ian.

#7 lore raw

Re: Re: [PATCH] ioemu: Fixes for build/install system

Quoted 1 line · On Thursday 23 April 2009 17:43:30 Ian Jackson wrote:

Christoph Egger writes ("[Xen-devel] Re: [PATCH] ioemu: Fixes for

build/install system"):

Quoted 23 lines
Quoted 4 lines

install-doc: $(DOCS)

(quoted diff) +1 -2
-	mkdir -p "$(DESTDIR)$(docdir)"
-	$(INSTALL) -m 644 qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
+	$(INSTALL_DIR) "$(DESTDIR)$(docdir)"

Review

Quoted 10 lines
(quoted diff) +5 -4
+	$(INSTALL_DATA) qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
 ifndef CONFIG_WIN32
-	mkdir -p "$(DESTDIR)$(mandir)/man1"
-	$(INSTALL) -m 644 qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
-	mkdir -p "$(DESTDIR)$(mandir)/man8"
-	$(INSTALL) -m 644 qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
+	$(INSTALL_DIR) "$(DESTDIR)$(MAN1DIR)"
+	$(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(MAN1DIR)"
+	$(INSTALL_DIR) "$(DESTDIR)$(MAN8DIR)"
+	$(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(MAN8DIR)"

Once again, these are changes to code from upstream. I see that this change has been applied upstream. Please try to avoid submitting changes for inclusion both in upstream and in qemu-xen-unstable. That causes trouble when I pull. If there is a compelling reason why the change should be included in Xen before we get it via upstream in the usual course of events, then we might relax this rule but you should mention this fact and give an explanation.

Quoted 5 lines

In this case the upstream change comes too late to be included in 3.4
- it is (quite correctly) only on the upstream main branch, not on the upstream stable branch.

Ian.

Attached w/o qemu specific changes.

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
Makefile +5 -4
index c395e77..d5941c7 100644
@@ -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)
 
xen-config.mak +1 -1
index 6210619..40984bc 100644
@@ -8,4 +8,4 @@ CONFIG_SOFTMMU=yes
 
 CFLAGS += -I$(QEMU_ROOT)/hw
 
-bindir = ${prefix}/${LIBLEAFDIR}/xen/bin
+bindir = ${LIBEXEC}
xen-setup +1 -1
index 8ca0019..946dfc0 100755
@@ -9,7 +9,7 @@ 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
+./configure --disable-gfx-check --disable-curses --disable-slirp "$@" --prefix=${PREFIX}
 
 target=i386-dm
 
xen-setup-stubdom +6 -6
index 835e505..086c834 100755
@@ -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 <<END >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 <<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

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#8 lore raw

Re: Re: [PATCH] ioemu: Fixes for build/install system

Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for build/install system"):

Quoted 1 line

Attached w/o qemu specific changes.

Thanks. I did a clean test rebuild with these changes and the layout of the dist/install/ tree had changed substantially. I presume that wasn't intentional. If it was, it's not appropriate for 3.4 at this stage.

Did you do a similar test ?

Ian.

#9 lore raw

Re: Re: [PATCH] ioemu: Fixes for build/install system

Quoted 1 line · On Thursday 23 April 2009 19:19:14 Ian Jackson wrote:

Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for

build/install system"):

Quoted 6 lines
Quoted 1 line

Attached w/o qemu specific changes.

Thanks. I did a clean test rebuild with these changes and the layout of the dist/install/ tree had changed substantially. I presume that wasn't intentional. If it was, it's not appropriate for 3.4 at this stage.

Can you send me the output of
find dist/install ? Then I can tell you.

Did you set PREFIX explicitely or did you use the default values ?

Quoted 1 line

Did you do a similar test ?

I run my tests with clean rebuilds from the toplevel xen directory with gmake dist or PREFIX="/usr/local" gmake dist

Christoph

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
#10 lore raw

Re: Re: [PATCH] ioemu: Fixes for build/install system

Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for build/install system"):

Quoted 2 lines

Can you send me the output of
find dist/install ? Then I can tell you.

I don't have it to hand but stuff had moved into usr/local from usr, possibly amongst other changes.

Quoted 1 line

Did you set PREFIX explicitely or did you use the default values ?

I did not set PREFIX.

Quoted 4 lines
Quoted 1 line

Did you do a similar test ?

I run my tests with clean rebuilds from the toplevel xen directory with gmake dist or PREFIX="/usr/local" gmake dist

The purpose of your changes is to plumb PREFIX through to the qemu build system. But I think you should also test that a default build remains unchanged.

ccache is your friend here, along with rsync -a --delete.

Ian.

#11 lore raw

Re: Re: [PATCH] ioemu: Fixes for build/install system

Quoted 1 line · On Wednesday 29 April 2009 17:30:47 Ian Jackson wrote:

Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for

build/install system"):

Quoted 10 lines
Quoted 2 lines

Can you send me the output of
find dist/install ? Then I can tell you.

I don't have it to hand but stuff had moved into usr/local from usr, possibly amongst other changes.

Quoted 1 line

Did you set PREFIX explicitely or did you use the default values ?

I did not set PREFIX.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Did you do a similar test ?

I run my tests with clean rebuilds from the toplevel xen directory with gmake dist or PREFIX="/usr/local" gmake dist

The purpose of your changes is to plumb PREFIX through to the qemu build system. But I think you should also test that a default build remains unchanged.

I figured out why a default build installs ioemu into /usr/local with my patch: PREFIX is empty and ioemu's configure sets prefix to /usr/local if prefix is empty.

Attached patch fixes this (and applies to the xen-tree). It always passes PREFIX to xen-setup and xen-setup-stubdom.

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
stubdom/Makefile +2 -0
diff -r f80cf52a4fb6 stubdom/Makefile
@@ -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)" \
tools/Makefile +2 -0
diff -r f80cf52a4fb6 tools/Makefile
@@ -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)
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#12 lore raw

Re: Re: [PATCH] ioemu: Fixes for build/install system

Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for build/install system"):

Quoted 3 lines

I figured out why a default build installs ioemu into /usr/local with my patch: PREFIX is empty and ioemu's configure sets prefix to /usr/local if prefix is empty.

Thanks.

Quoted 2 lines

Attached patch fixes this (and applies to the xen-tree). It always passes PREFIX to xen-setup and xen-setup-stubdom.

Could you please do this in xen-setup-* instead, rather than in xen-unstable's Makefiles ? That (a) avoids coupling between the two repositories and (b) will mean that xen-setup will do the right thing when run by hand.

Ian.

#13 lore raw

Re: Re: [PATCH] ioemu: Fixes for build/install system

Quoted 1 line · On Tuesday 05 May 2009 16:00:12 Ian Jackson wrote:

Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for

build/install system"):

Quoted 6 lines
Quoted 3 lines

I figured out why a default build installs ioemu into /usr/local with my patch: PREFIX is empty and ioemu's configure sets prefix to /usr/local if prefix is empty.

Thanks.

Quoted 7 lines
Quoted 2 lines

Attached patch fixes this (and applies to the xen-tree). It always passes PREFIX to xen-setup and xen-setup-stubdom.

Could you please do this in xen-setup-* instead, rather than in xen-unstable's Makefiles ? That (a) avoids coupling between the two repositories and (b) will mean that xen-setup will do the right thing when run by hand.

I tried, but it doesn't work. It has to be set _before_ xen-setup* is called for the same reason XEN_ROOT is set in xen-unstable's Makefiles.

Christoph

Signature · 6 lines
---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
#14 lore raw

Re: Re: [PATCH] ioemu: Fixes for build/install system

Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for build/install system"):

Quoted 8 lines · On Tuesday 05 May 2009 16:00:12 Ian Jackson wrote:
Quoted 4 lines

Could you please do this in xen-setup-* instead, rather than in xen-unstable's Makefiles ? That (a) avoids coupling between the two repositories and (b) will mean that xen-setup will do the right thing when run by hand.

I tried, but it doesn't work. It has to be set _before_ xen-setup* is called for the same reason XEN_ROOT is set in xen-unstable's Makefiles.

I don't understand, I'm afraid.

XEN_ROOT needs to be handled the way it is because it's (a) available only as a make variable in the xen-unstable makefiles and (b) is a relative pathname so needs to be massaged for use by a sub-component. If you run xen-setup it guesses a value for XEN_ROOT which is right for at least one common case.

PREFIX could be set in the environment perfectly well and doesn't need any massaging. You could just have xen-setup invent a default PREFIX if none was found in its environment.

Ian.

#15 lore raw

Re: Re: [PATCH] ioemu: Fixes for build/install system

Quoted 1 line · On Tuesday 05 May 2009 16:28:23 Ian Jackson wrote:

Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for

build/install system"):

Quoted 9 lines
Quoted 8 lines · On Tuesday 05 May 2009 16:00:12 Ian Jackson wrote:
Quoted 4 lines

Could you please do this in xen-setup-* instead, rather than in xen-unstable's Makefiles ? That (a) avoids coupling between the two repositories and (b) will mean that xen-setup will do the right thing when run by hand.

I tried, but it doesn't work. It has to be set _before_ xen-setup* is called for the same reason XEN_ROOT is set in xen-unstable's Makefiles.

Quoted 7 lines

I don't understand, I'm afraid.

XEN_ROOT needs to be handled the way it is because it's (a) available only as a make variable in the xen-unstable makefiles and (b) is a relative pathname so needs to be massaged for use by a sub-component. If you run xen-setup it guesses a value for XEN_ROOT which is right for at least one common case.

PREFIX is defined by xen build system as a make variable. xen's build system runs some shell code to pass XEN_ROOT as a shell variable to xen-setup. My patch adds some shell code to pass PREFIX as a shell variable to xen-setup, too.

xen-setup can guess XEN_ROOT due to the directory structure relative to xen's toplevel source directory. But how should xen-setup guess an install directory ?

Quoted 3 lines

PREFIX could be set in the environment perfectly well and doesn't need any massaging. You could just have xen-setup invent a default PREFIX if none was found in its environment.

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, then my patch is the only way to go.

Christoph

Signature · 6 lines
---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
#16 lore raw

Re: Re: [PATCH] ioemu: Fixes for build/install system

Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for build/install system"):

Quoted 5 lines

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.

Quoted 1 line

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. 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.

Ian.

#17 lore raw

Re: Re: [PATCH] ioemu: Fixes for build/install system

Quoted 1 line · 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"):

Quoted 6 lines
Quoted 5 lines

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,

Quoted 8 lines

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.

Quoted 1 line

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.

Quoted 3 lines

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.

Christoph

Signature · 6 lines
---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
Makefile +5 -4
index c395e77..d5941c7 100644
@@ -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)
 
xen-config.mak +1 -1
index 6210619..40984bc 100644
@@ -8,4 +8,4 @@ CONFIG_SOFTMMU=yes
 
 CFLAGS += -I$(QEMU_ROOT)/hw
 
-bindir = ${prefix}/${LIBLEAFDIR}/xen/bin
+bindir = ${LIBEXEC}
xen-setup +5 -1
index 8ca0019..bdce4bc 100755
@@ -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
 
xen-setup-stubdom +6 -6
index 835e505..086c834 100755
@@ -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 <<END >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 <<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
stubdom/Makefile +2 -0
diff -r f80cf52a4fb6 stubdom/Makefile
@@ -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)" \
tools/Makefile +2 -0
diff -r f80cf52a4fb6 tools/Makefile
@@ -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)
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#18 lore raw

Re: Re: [PATCH] ioemu: Fixes for build/install system

Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for build/install system"):

Quoted 2 lines

I attached a new version of xen_build_ioemu.diff which sets PREFIX to /usr if empty - the default prefix it uses now.

Thanks.

Quoted 4 lines

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.

Then Xen part of this patch is fine and in any case needs to go in first, I think. Most of the qemu patch is good too. I'm a bit iffy about whether we should put this into 3.4 at this time, though.

But I had a question about this part:

Quoted 2 lines
xen-setup-stubdom +0 -0

....

xen-setup-stubdom TARGET_CPPFLAGS += $TARGET_CPPFLAGS -DCONFIG_STUBDOM -D__XEN_TOOLS__ · line 24

Quoted 2 lines
xen-setup-stubdom +1 -1
-bindir = \${prefix}/\${LIBLEAFDIR}/xen/bin
+bindir = \${LIBEXEC}

etc.

I think this stubdom stuff all refers to files as seen within the stubdom process, not in the external filesystem ?

The installation of the actual stubdom executable (which is actually a Xen PV guest kernel) is not controlled from the machinery run by xen-setup-stubdom, is it ?

So shouldn't this be fixed at /usr ?

Ian.