[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] tools: use --docdir option from configure


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Wed, 13 Jun 2012 16:41:32 +0200
  • Delivery-date: Wed, 13 Jun 2012 14:42:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1339598410 -7200
# Node ID 3a8cd926cd23170cd9d2eb127ef1e1074b369c04
# Parent  9d6fb03ba8e9266bbfd7a8dc92eb540a7b0a42f7
tools: use --docdir option from configure

Use configure to set the docdir location. Up to now it was a Makefile
variable which had to be specified with each make invocation.
Move the DODCIR define from Config.mk to config/Tools.mk.
Adjust some Makefiles which use DOCDIR to source also config/Tools.mk.

Special care needs to be taken with qemu-xen-traditional. Internally it
uses the variable datadir to set the path to keymaps and ROM files. It
also makes use of tools/Rules.mk, which in turn sources config/Tools.mk.
This overwrites the initial value of datadir and keymaps and ROM files
will be installed into a wrong location. Fix this by specifying datadir
as make option.

datadir itself needs to be present in config/Tools.mk.in, without it
autoconf will print warnings and the newly added variables such as
@docdir@ will not be expanded properly.

This patch does not move SHAREDIR and MANDIR from Config.mk to
config/Tools.mk because qemu-xen-traditional is not prepared for that.
It has ${prefix}/share hardcoded. This has to be adressed in a separate
change.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 9d6fb03ba8e9 -r 3a8cd926cd23 Config.mk
--- a/Config.mk
+++ b/Config.mk
@@ -45,7 +45,6 @@ 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
 BASH_COMPLETION_DIR ?= $(CONFIG_DIR)/bash_completion.d
 
diff -r 9d6fb03ba8e9 -r 3a8cd926cd23 config/Tools.mk.in
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -1,6 +1,11 @@
 # Prefix and install folder
 PREFIX              := @prefix@
+prefix              := @prefix@
 LIBLEAFDIR_x86_64   := @LIB_PATH@
+PACKAGE_TARNAME     := @PACKAGE_TARNAME@
+datarootdir         := @datarootdir@
+datadir             := @datadir@
+DOCDIR              := @docdir@
 
 # A debug build of tools?
 debug               := @debug@
diff -r 9d6fb03ba8e9 -r 3a8cd926cd23 docs/Makefile
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -2,6 +2,7 @@
 
 XEN_ROOT=$(CURDIR)/..
 include $(XEN_ROOT)/Config.mk
+-include $(XEN_ROOT)/config/Tools.mk
 include $(XEN_ROOT)/docs/Docs.mk
 
 VERSION                = xen-unstable
diff -r 9d6fb03ba8e9 -r 3a8cd926cd23 docs/xen-api/Makefile
--- a/docs/xen-api/Makefile
+++ b/docs/xen-api/Makefile
@@ -2,6 +2,7 @@
 
 XEN_ROOT=$(CURDIR)/../..
 include $(XEN_ROOT)/Config.mk
+-include $(XEN_ROOT)/config/Tools.mk
 include $(XEN_ROOT)/docs/Docs.mk
 
 
diff -r 9d6fb03ba8e9 -r 3a8cd926cd23 stubdom/Makefile
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -6,6 +6,7 @@ export XEN_OS=MiniOS
 export stubdom=y
 export debug=y
 include $(XEN_ROOT)/Config.mk
+-include $(XEN_ROOT)/config/Tools.mk
 
 #ZLIB_URL?=http://www.zlib.net
 ZLIB_URL=$(XEN_EXTFILES_URL)
diff -r 9d6fb03ba8e9 -r 3a8cd926cd23 tools/Makefile
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -123,7 +123,8 @@ subdir-all-qemu-xen-traditional-dir: qem
                $(buildmakevars2shellvars); \
                cd qemu-xen-traditional-dir; \
                $(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS); \
-               $(MAKE) all
+               $(MAKE) all \
+                       datadir="$(SHAREDIR)/xen/qemu"
 
 subdir-install-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find
        set -e; \
@@ -132,11 +133,14 @@ subdir-install-qemu-xen-traditional-dir:
                $(QEMU_ROOT)/xen-setup \
                --extra-cflags="$(EXTRA_CFLAGS_QEMU_TRADITIONAL)" \
                $(IOEMU_CONFIGURE_CROSS); \
-               $(MAKE) install
+               $(MAKE) install \
+                       datadir="$(SHAREDIR)/xen/qemu"
 
 subdir-clean-qemu-xen-traditional-dir:
        set -e; if test -d qemu-xen-traditional-dir/.; then \
-               $(MAKE) -C qemu-xen-traditional-dir clean; \
+               $(MAKE) -C qemu-xen-traditional-dir clean \
+                       datadir="$(SHAREDIR)/xen/qemu" \
+               ; \
        fi
 
 .PHONY: qemu-xen-dir-force-update

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.