From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xensource.com
Subject: [PATCH] tools: use --docdir option from configure
Date: Wed, 13 Jun 2012 16:41:32 +0200 [thread overview]
Message-ID: <3a8cd926cd23170cd9d2.1339598492@probook.site> (raw)
# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# 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@aepfle.de>
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
next reply other threads:[~2012-06-13 14:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-13 14:41 Olaf Hering [this message]
2012-06-26 16:24 ` [PATCH] tools: use --docdir option from configure Ian Campbell
2012-06-29 7:54 ` Olaf Hering
2012-06-29 8:10 ` Ian Campbell
2012-07-02 11:15 ` Ian Jackson
2012-07-02 11:17 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3a8cd926cd23170cd9d2.1339598492@probook.site \
--to=olaf@aepfle.de \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).