• E
    build: check correct protocol.o file · 5899e09e
    Eric Blake 提交于
    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.
    5899e09e
Makefile.am 67.4 KB