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