[libvirt] [PATCH] Load CPU map from builddir when run uninstalled
Eric Blake
eblake at redhat.com
Mon Mar 10 18:31:00 UTC 2014
On 03/10/2014 09:26 AM, Jiri Denemark wrote:
> When libvirtd is run from a build directory without being installed, it
> should not depend on files from a libvirt package installed in the
> system. Not only because there may not be any libvirt installed at all.
> We already do a good job for plugins but cpu_map.xml was still loaded
> from the system.
>
> The Makefile.am change is necessary to make this all work from VPATH
> builds since libvirtd has no idea where to find libvirt sources. It only
> knows the path from which it was started, i.e, a builddir.
>
> +++ b/src/Makefile.am
> @@ -977,6 +977,10 @@ libvirt_la_BUILT_LIBADD += libvirt_cpu.la
> libvirt_cpu_la_CFLAGS = \
> -I$(top_srcdir)/src/conf $(AM_CFLAGS)
> libvirt_cpu_la_SOURCES = $(CPU_SOURCES)
> +libvirt_cpu_la_DEPENDENCIES = $(abs_builddir)/cpu/cpu_map.xml
> +
> +$(abs_builddir)/cpu/cpu_map.xml:
> + $(AM_V_GEN)ln -s $(srcdir)/cpu/cpu_map.xml $@
Does this really work in both VPATH (create the link) and in-tree builds
(you would be linking a file to itself, but then again the file is
already up-to-date so the ln doesn't get run)? Does it pass 'make
distcheck'? It looks a bit odd to me, but if it works, I'm okay ACKing it.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140310/f557ef3d/attachment-0001.sig>
More information about the libvir-list
mailing list