[libvirt] [PATCH] build: fix 'make dist' on virgin checkout

Eric Blake eblake at redhat.com
Wed Jun 13 12:37:40 UTC 2012


On 06/12/2012 10:39 PM, Eric Blake wrote:
> 'make dist' was depending on *protocol-structs files, which are
> stored in git but in turn depended on generated files.  We still
> want to ship the protocol-structs files, but by renaming the
> tests to something not matching a file name, we separate 'make
> check' (which depends on the generated file) from 'make dist'
> (which only depends on the git files).  After all, the tarball
> should never depend on a generated file not stored in git.
> 
> I found one more case of a git file depending on a generated
> file, in a bogus virkeycode.c listing; but at least this one
> had no associated rules so it never broke 'make dist'.
> 
> Reported by Wen Congyang.  Latent bug has been present since
> commit 62dee6f, but only recently exposed by commit 7bff56a.
> 
> * src/Makefile.am ($(srcdir)/util/virkeycode.c): Drop useless
> dependency.
> (BUILT_SOURCES): ...and build virkeymaps.h sooner.
> (PROTOCOL_STRUCTS): Rather than depend on the struct file...
> (check-local): ...convert things into a phony target of...
> (check-protocol): ...a new check.
> ($(srcdir)/remote_protocol-struct): Rename to isolate the distributed
> file from the conditional test.
> (PDWTAGS): Deal with rename.  Swap to compare 'expected actual'.
> ---

On 06/12/2012 11:22 PM, Wen Congyang wrote:
>> I now have 'make dist' works; if it also passes the longer 'make
>> distcheck' on a virgin tree, then I will push my patch under the
>> build-breaker rule (patch in separate mail).  The bug was that we had a
>> file in the tarball that depended on a generated file, which is a no-no.
>>  We really need to ship remote_protocol-structs, and we also want 'make
>> check' to ensure that file is up-to-date (which includes a dependency on
>> a generated file), but a little bit of refactoring makes it so that
>> 'make check' need not interfere with 'make dist', by having the two
>> targets depend on different names.
>
> I apply your patch, and the problem does not exist.

It also passed my testing, so I'm now pushing.

-- 
Eric Blake   eblake at 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: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120613/f4f77f6f/attachment-0001.sig>


More information about the libvir-list mailing list