* [PATCH] Fixes for build/install system
@ 2009-03-31 12:22 Christoph Egger
2009-03-31 16:11 ` Ian Jackson
[not found] ` <200904221037.00833.Christoph.Egger@amd.com>
0 siblings, 2 replies; 17+ messages in thread
From: Christoph Egger @ 2009-03-31 12:22 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Keir Fraser
[-- Attachment #1: Type: text/plain, Size: 701 bytes --]
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.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
---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
[-- Attachment #2: xen_build_ioemu.diff --]
[-- Type: text/x-diff, Size: 3836 bytes --]
diff --git a/Makefile b/Makefile
index c395e77..c3c6f33 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)
@@ -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
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..76b1f02 100755
--- a/xen-setup
+++ b/xen-setup
@@ -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
diff --git a/xen-setup-stubdom b/xen-setup-stubdom
index 835e505..eb62ed5 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 <<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
[-- Attachment #3: xen_build.diff --]
[-- Type: text/x-diff, Size: 3500 bytes --]
diff -r f2cf89a4e762 Config.mk
--- a/Config.mk Tue Mar 31 12:06:57 2009 +0100
+++ b/Config.mk Tue Mar 31 14:12:27 2009 +0200
@@ -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)
diff -r f2cf89a4e762 config/StdGNU.mk
--- a/config/StdGNU.mk Tue Mar 31 12:06:57 2009 +0100
+++ b/config/StdGNU.mk Tue Mar 31 14:12:27 2009 +0200
@@ -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
diff -r f2cf89a4e762 tools/pygrub/Makefile
--- a/tools/pygrub/Makefile Tue Mar 31 12:06:57 2009 +0100
+++ b/tools/pygrub/Makefile Tue Mar 31 14:12:27 2009 +0200
@@ -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
diff -r f2cf89a4e762 tools/python/Makefile
--- a/tools/python/Makefile Tue Mar 31 12:06:57 2009 +0100
+++ b/tools/python/Makefile Tue Mar 31 14:12:27 2009 +0200
@@ -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; \
[-- Attachment #4: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH] Fixes for build/install system
2009-03-31 12:22 [PATCH] Fixes for build/install system Christoph Egger
@ 2009-03-31 16:11 ` Ian Jackson
2009-04-01 7:44 ` Christoph Egger
[not found] ` <200904221037.00833.Christoph.Egger@amd.com>
1 sibling, 1 reply; 17+ messages in thread
From: Ian Jackson @ 2009-03-31 16:11 UTC (permalink / raw)
To: Christoph Egger; +Cc: xen-devel@lists.xensource.com, Keir Fraser
Christoph Egger writes ("[PATCH] Fixes for build/install system"):
> 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
> install-doc: $(DOCS)
> - 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.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] Fixes for build/install system
2009-03-31 16:11 ` Ian Jackson
@ 2009-04-01 7:44 ` Christoph Egger
0 siblings, 0 replies; 17+ messages in thread
From: Christoph Egger @ 2009-04-01 7:44 UTC (permalink / raw)
To: Ian Jackson; +Cc: xen-devel@lists.xensource.com, Keir Fraser
On Tuesday 31 March 2009 18:11:45 Ian Jackson wrote:
> Christoph Egger writes ("[PATCH] Fixes for build/install system"):
> > 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
>
> > install-doc: $(DOCS)
> > - 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 ?
Yes, I can confirm. It is just less consistent throughout the whole
xen build/install system.
Christoph
--
---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
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] ioemu: Fixes for build/install system
[not found] ` <18927.13912.58144.792099@mariner.uk.xensource.com>
@ 2009-04-22 15:46 ` Christoph Egger
2009-04-23 15:43 ` Ian Jackson
0 siblings, 1 reply; 17+ messages in thread
From: Christoph Egger @ 2009-04-22 15:46 UTC (permalink / raw)
To: Ian Jackson, xen-devel; +Cc: Keir Fraser
[-- Attachment #1: Type: text/plain, Size: 506 bytes --]
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.
Singed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
---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
[-- Attachment #2: xen_build_ioemu.diff --]
[-- Type: text/x-diff, Size: 4794 bytes --]
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)
@@ -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 \
diff --git a/configure b/configure
index 920dd1e..eb60a72 100755
--- a/configure
+++ b/configure
@@ -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
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..946dfc0 100755
--- a/xen-setup
+++ b/xen-setup
@@ -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
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 <<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
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: Re: [PATCH] ioemu: Fixes for build/install system
2009-04-22 15:46 ` [PATCH] ioemu: " Christoph Egger
@ 2009-04-23 15:43 ` Ian Jackson
2009-04-23 15:54 ` Christoph Egger
0 siblings, 1 reply; 17+ messages in thread
From: Ian Jackson @ 2009-04-23 15:43 UTC (permalink / raw)
To: Christoph Egger; +Cc: xen-devel, Keir Fraser
Christoph Egger writes ("[Xen-devel] Re: [PATCH] ioemu: Fixes for build/install system"):
> 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)"
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.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Re: [PATCH] ioemu: Fixes for build/install system
2009-04-23 15:43 ` Ian Jackson
@ 2009-04-23 15:54 ` Christoph Egger
2009-04-23 17:19 ` Ian Jackson
0 siblings, 1 reply; 17+ messages in thread
From: Christoph Egger @ 2009-04-23 15:54 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Keir Fraser
[-- Attachment #1: Type: text/plain, Size: 1900 bytes --]
On Thursday 23 April 2009 17:43:30 Ian Jackson wrote:
> Christoph Egger writes ("[Xen-devel] Re: [PATCH] ioemu: Fixes for
build/install system"):
> > 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)"
>
> 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.
Attached w/o qemu specific changes.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
---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
[-- Attachment #2: xen_build_ioemu.diff --]
[-- Type: text/x-diff, Size: 2637 bytes --]
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..946dfc0 100755
--- a/xen-setup
+++ b/xen-setup
@@ -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
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 <<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
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: Re: [PATCH] ioemu: Fixes for build/install system
2009-04-23 15:54 ` Christoph Egger
@ 2009-04-23 17:19 ` Ian Jackson
2009-04-24 6:34 ` Christoph Egger
0 siblings, 1 reply; 17+ messages in thread
From: Ian Jackson @ 2009-04-23 17:19 UTC (permalink / raw)
To: Christoph Egger; +Cc: xen-devel@lists.xensource.com, Keir Fraser
Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for build/install system"):
> 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.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Re: [PATCH] ioemu: Fixes for build/install system
2009-04-23 17:19 ` Ian Jackson
@ 2009-04-24 6:34 ` Christoph Egger
2009-04-29 15:30 ` Ian Jackson
0 siblings, 1 reply; 17+ messages in thread
From: Christoph Egger @ 2009-04-24 6:34 UTC (permalink / raw)
To: Ian Jackson; +Cc: xen-devel@lists.xensource.com, Keir Fraser
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"):
> > 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 ?
> 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
--
---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
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Re: [PATCH] ioemu: Fixes for build/install system
2009-04-24 6:34 ` Christoph Egger
@ 2009-04-29 15:30 ` Ian Jackson
2009-05-04 9:42 ` Christoph Egger
0 siblings, 1 reply; 17+ messages in thread
From: Ian Jackson @ 2009-04-29 15:30 UTC (permalink / raw)
To: Christoph Egger; +Cc: xen-devel@lists.xensource.com, Keir Fraser
Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for build/install system"):
> 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.
> Did you set PREFIX explicitely or did you use the default values ?
I did not set PREFIX.
> > 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.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Re: [PATCH] ioemu: Fixes for build/install system
2009-04-29 15:30 ` Ian Jackson
@ 2009-05-04 9:42 ` Christoph Egger
2009-05-05 14:00 ` Ian Jackson
0 siblings, 1 reply; 17+ messages in thread
From: Christoph Egger @ 2009-05-04 9:42 UTC (permalink / raw)
To: Ian Jackson; +Cc: xen-devel@lists.xensource.com, Keir Fraser
[-- Attachment #1: Type: text/plain, Size: 1405 bytes --]
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"):
> > 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.
>
> > Did you set PREFIX explicitely or did you use the default values ?
>
> I did not set PREFIX.
>
> > > 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.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
---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
[-- Attachment #2: xen_ioemu_prefix.diff --]
[-- Type: text/x-diff, Size: 800 bytes --]
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)
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Re: [PATCH] ioemu: Fixes for build/install system
2009-05-04 9:42 ` Christoph Egger
@ 2009-05-05 14:00 ` Ian Jackson
2009-05-05 14:15 ` Christoph Egger
0 siblings, 1 reply; 17+ messages in thread
From: Ian Jackson @ 2009-05-05 14:00 UTC (permalink / raw)
To: Christoph Egger; +Cc: xen-devel@lists.xensource.com, Keir Fraser
Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for build/install system"):
> 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.
> 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.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Re: [PATCH] ioemu: Fixes for build/install system
2009-05-05 14:00 ` Ian Jackson
@ 2009-05-05 14:15 ` Christoph Egger
2009-05-05 14:28 ` Ian Jackson
0 siblings, 1 reply; 17+ messages in thread
From: Christoph Egger @ 2009-05-05 14:15 UTC (permalink / raw)
To: Ian Jackson; +Cc: xen-devel@lists.xensource.com, Keir Fraser
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"):
> > 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.
>
> > 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
--
---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
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Re: [PATCH] ioemu: Fixes for build/install system
2009-05-05 14:15 ` Christoph Egger
@ 2009-05-05 14:28 ` Ian Jackson
2009-05-05 15:25 ` Christoph Egger
0 siblings, 1 reply; 17+ messages in thread
From: Ian Jackson @ 2009-05-05 14:28 UTC (permalink / raw)
To: Christoph Egger; +Cc: xen-devel@lists.xensource.com, Keir Fraser
Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for build/install system"):
> On Tuesday 05 May 2009 16:00:12 Ian Jackson wrote:
> > 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.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Re: [PATCH] ioemu: Fixes for build/install system
2009-05-05 14:28 ` Ian Jackson
@ 2009-05-05 15:25 ` Christoph Egger
2009-05-05 17:22 ` Ian Jackson
0 siblings, 1 reply; 17+ messages in thread
From: Christoph Egger @ 2009-05-05 15:25 UTC (permalink / raw)
To: Ian Jackson; +Cc: xen-devel@lists.xensource.com, Keir Fraser
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"):
> > On Tuesday 05 May 2009 16:00:12 Ian Jackson wrote:
> > > 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 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 ?
> 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
--
---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
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Re: [PATCH] ioemu: Fixes for build/install system
2009-05-05 15:25 ` Christoph Egger
@ 2009-05-05 17:22 ` Ian Jackson
2009-05-08 9:29 ` Christoph Egger
0 siblings, 1 reply; 17+ messages in thread
From: Ian Jackson @ 2009-05-05 17:22 UTC (permalink / raw)
To: Christoph Egger; +Cc: xen-devel@lists.xensource.com, Keir Fraser
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. 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.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Re: [PATCH] ioemu: Fixes for build/install system
2009-05-05 17:22 ` Ian Jackson
@ 2009-05-08 9:29 ` Christoph Egger
2009-05-08 16:13 ` Ian Jackson
0 siblings, 1 reply; 17+ messages in thread
From: Christoph Egger @ 2009-05-08 9:29 UTC (permalink / raw)
To: Ian Jackson; +Cc: xen-devel@lists.xensource.com, Keir Fraser
[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]
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.Egger@amd.com>
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
[-- Attachment #2: xen_build_ioemu.diff --]
[-- Type: text/x-diff, Size: 2690 bytes --]
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 <<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
[-- Attachment #3: xen_ioemu_prefix.diff --]
[-- Type: text/x-diff, Size: 800 bytes --]
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)
[-- Attachment #4: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: Re: [PATCH] ioemu: Fixes for build/install system
2009-05-08 9:29 ` Christoph Egger
@ 2009-05-08 16:13 ` Ian Jackson
0 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2009-05-08 16:13 UTC (permalink / raw)
To: Christoph Egger; +Cc: xen-devel@lists.xensource.com, Keir Fraser
Christoph Egger writes ("Re: [Xen-devel] Re: [PATCH] ioemu: Fixes for build/install system"):
> I attached a new version of xen_build_ioemu.diff which sets PREFIX
> to /usr if empty - the default prefix it uses now.
Thanks.
> 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:
> --- a/xen-setup-stubdom
> +++ b/xen-setup-stubdom
....
> -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.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2009-05-08 16:13 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-31 12:22 [PATCH] Fixes for build/install system Christoph Egger
2009-03-31 16:11 ` Ian Jackson
2009-04-01 7:44 ` Christoph Egger
[not found] ` <200904221037.00833.Christoph.Egger@amd.com>
[not found] ` <18927.13912.58144.792099@mariner.uk.xensource.com>
2009-04-22 15:46 ` [PATCH] ioemu: " Christoph Egger
2009-04-23 15:43 ` Ian Jackson
2009-04-23 15:54 ` Christoph Egger
2009-04-23 17:19 ` Ian Jackson
2009-04-24 6:34 ` Christoph Egger
2009-04-29 15:30 ` Ian Jackson
2009-05-04 9:42 ` Christoph Egger
2009-05-05 14:00 ` Ian Jackson
2009-05-05 14:15 ` Christoph Egger
2009-05-05 14:28 ` Ian Jackson
2009-05-05 15:25 ` Christoph Egger
2009-05-05 17:22 ` Ian Jackson
2009-05-08 9:29 ` Christoph Egger
2009-05-08 16:13 ` Ian Jackson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.