All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools: use --docdir option from configure
@ 2012-06-13 14:41 Olaf Hering
  2012-06-26 16:24 ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2012-06-13 14:41 UTC (permalink / raw)
  To: xen-devel

# 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tools: use --docdir option from configure
  2012-06-13 14:41 [PATCH] tools: use --docdir option from configure Olaf Hering
@ 2012-06-26 16:24 ` Ian Campbell
  2012-06-29  7:54   ` Olaf Hering
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2012-06-26 16:24 UTC (permalink / raw)
  To: Olaf Hering; +Cc: xen-devel

On Wed, 2012-06-13 at 15:41 +0100, Olaf Hering wrote:
> # HG changeset patch
> # User Olaf Hering <olaf@aepfle.de>
> # Date 1339598410 -7200
> # Node ID 3a8cd926cd23170cd9d2eb127ef1e1074b369c04
> # Parent  9d6fb03ba8e9266bbfd7a8dc92eb540a7b0a42f7
> tools: use --docdir option from configure

Not just tools: but also docs: since one of the effects of this patch is
that some "make *doc*" commands now require one to run ./configure
first.

Are we happy with that?

Perhaps we should defer these sorts of build system changes to 4.3 at this point.

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

Ewww... But necessary I suppose.

> 
> 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 addressed 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
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tools: use --docdir option from configure
  2012-06-26 16:24 ` Ian Campbell
@ 2012-06-29  7:54   ` Olaf Hering
  2012-06-29  8:10     ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2012-06-29  7:54 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

On Tue, Jun 26, Ian Campbell wrote:

> On Wed, 2012-06-13 at 15:41 +0100, Olaf Hering wrote:
> > # HG changeset patch
> > # User Olaf Hering <olaf@aepfle.de>
> > # Date 1339598410 -7200
> > # Node ID 3a8cd926cd23170cd9d2eb127ef1e1074b369c04
> > # Parent  9d6fb03ba8e9266bbfd7a8dc92eb540a7b0a42f7
> > tools: use --docdir option from configure
> 
> Not just tools: but also docs: since one of the effects of this patch is
> that some "make *doc*" commands now require one to run ./configure
> first.
> 
> Are we happy with that?

I dont care.
Was it a common usage pattern to just run make docs?

Olaf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tools: use --docdir option from configure
  2012-06-29  7:54   ` Olaf Hering
@ 2012-06-29  8:10     ` Ian Campbell
  2012-07-02 11:15       ` Ian Jackson
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2012-06-29  8:10 UTC (permalink / raw)
  To: Olaf Hering; +Cc: xen-devel

On Fri, 2012-06-29 at 08:54 +0100, Olaf Hering wrote:
> On Tue, Jun 26, Ian Campbell wrote:
> 
> > On Wed, 2012-06-13 at 15:41 +0100, Olaf Hering wrote:
> > > # HG changeset patch
> > > # User Olaf Hering <olaf@aepfle.de>
> > > # Date 1339598410 -7200
> > > # Node ID 3a8cd926cd23170cd9d2eb127ef1e1074b369c04
> > > # Parent  9d6fb03ba8e9266bbfd7a8dc92eb540a7b0a42f7
> > > tools: use --docdir option from configure
> > 
> > Not just tools: but also docs: since one of the effects of this patch is
> > that some "make *doc*" commands now require one to run ./configure
> > first.
> > 
> > Are we happy with that?
> 
> I dont care.
> Was it a common usage pattern to just run make docs?

I don't know about common but e.g. the script which populates
http://xenbits.xen.org/docs/unstable/ does. I don't mind updating that
one but I just wanted to see if anyone else had an opinion.

Ian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tools: use --docdir option from configure
  2012-06-29  8:10     ` Ian Campbell
@ 2012-07-02 11:15       ` Ian Jackson
  2012-07-02 11:17         ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Jackson @ 2012-07-02 11:15 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Olaf Hering, xen-devel

Ian Campbell writes ("Re: [Xen-devel] [PATCH] tools: use --docdir option from configure"):
> I don't know about common but e.g. the script which populates
> http://xenbits.xen.org/docs/unstable/ does. I don't mind updating that
> one but I just wanted to see if anyone else had an opinion.

IMO this is certainly not 4.2 material.

Ian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tools: use --docdir option from configure
  2012-07-02 11:15       ` Ian Jackson
@ 2012-07-02 11:17         ` Ian Campbell
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Campbell @ 2012-07-02 11:17 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Olaf Hering, xen-devel

On Mon, 2012-07-02 at 12:15 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [Xen-devel] [PATCH] tools: use --docdir option from configure"):
> > I don't know about common but e.g. the script which populates
> > http://xenbits.xen.org/docs/unstable/ does. I don't mind updating that
> > one but I just wanted to see if anyone else had an opinion.
> 
> IMO this is certainly not 4.2 material.

I wondered about that in my original reply.

I agree, lets leave until 4.3.

Ian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-07-02 11:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-13 14:41 [PATCH] tools: use --docdir option from configure Olaf Hering
2012-06-26 16:24 ` 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

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.