]> xenbits.xensource.com Git - libvirt.git/commit
build: check correct protocol.o file
authorEric Blake <eblake@redhat.com>
Fri, 5 Apr 2013 17:09:32 +0000 (11:09 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 5 Apr 2013 17:23:18 +0000 (11:23 -0600)
commit5899e09e6112ff739cc4b9b9198d904fc88b698c
tree00975478287c6d9ab85b0e0acf5453b99487ce78
parent00d69b4af1215695ebfc8f1dbfa77804c2b293fd
build: check correct protocol.o file

By default, libtool builds two .o files for every .lo rule:
src/foo.o - static builds
src/.libs/foo.o - shared library builds

But since commit ad42b34b disabled static builds, src/foo.o is
no longer built by default.  On a fresh checkout, this means our
protocol check rules using pdwtags were testing a missing file,
and thanks to a lousy behavior of pdwtags happily giving no output
and 0 exit status (http://bugzilla.redhat.com/949034), we were
merely claiming that "dwarves is too old" and skipping the test.

However, if you swap between branches and do incremental builds,
such as building v0.10.2-maint and then switching back to master,
you end up with src/foo.o being leftover from its 0.10.2 state,
and then 'make check' fails because the .o file does not match
the protocol-structs file due to API additions in the meantime.

A simpler fix would be to always look in .libs for the .o to
be parsed; but since it is possible to pass ./configure options
to tell libtool to do a static-only build with no shared .o,
I went with the approach of finding the newest of the two files,
whenever both exist.

* src/Makefile.am (PDWTAGS): Ensure we test just-built file.
src/Makefile.am