Re: [PATCH] Load CPU map from builddir when run uninstalled

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

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]