[libvirt] [PATCH 2/2] build: fix python in VPATH build

Eric Blake eblake at redhat.com
Wed Apr 28 14:30:43 UTC 2010

On 04/28/2010 04:29 AM, Jim Meyering wrote:
> Eric Blake wrote:
>> Match the fact that docs/Makefile.am dumps libvirt-api.xml in the
>> build dir, not the source dir.
>> * python/Makefile.am (API_DESC): Point make to the builddir for .xml files.
>> * python/generator.py (buildStubs): Output in correct location.
> Hi Eric,
> Does this fix a failure or just ensure that we use more
> up to date .xml files?

It was an actual VPATH build failure.  <goes to look in scrollback

make[3]: Entering directory `/home/eblake/libvirt/build-rawhide/python'
make[3]: *** No rule to make target `../../docs/libvirt-api.xml', needed
by `generated.stamp'.  Stop.

> With just your cfg.mk patch, I ran a srcdir ./autogen.sh && make distclean
> followed by "make check syntax-check" from a non-srcdir build dir.
> It succeeded.
> The only potential down-side I see is that this requires running Python
> (though only in a VPATH build?), to recreate a distributed file that is
> available in $(srcdir).

That chunk of python/Makefile.am is guarded by WITH_PYTHON.  So before
the patch, the file libvirt-override-api.xml was only available in
$(srcdir) if python was present _and_ builddir=srcdir; after the patch,
it is only available in $(builddir) if python is present.  But since
docs/libvirt-api.xml was only available in $(builddir), we might as well
be consistent on the two .xml files.

Should we be distributing a pre-built libvirt-api.xml and
libvirt-override-api.xml?  If so, then we should ditch this patch and
instead do a patch to stick docs/libvirt-api.xml into $(srcdir) instead
of $(builddir).  If not, then I need to tweak this patch to remove
libvirt-override-api.xml from EXTRA_DIST.  Either way, I guess I need to
test 'make dist' before proposing v2 of this patch.  Thoughts?

Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100428/ee0564e5/attachment-0001.sig>

More information about the libvir-list mailing list