mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
build: ensure 'make check' sees up-to-date config.h
Nehal J. Wani reported on IRC a rather interesting build failure: In file included from util/virnetdevbridge.c:53:0: /usr/include/linux/in6.h:30:8: error: redefinition of 'struct in6_addr' struct in6_addr { ^ I traced it to the fact that he ran 'git pull; make check' across commit e62e0094. What happened is that the configure changes result in a new variable that was set to be defined on his system, but config.h was not regenerated to contain the value of that variable. Running 'make' instead of 'make check' cleaned up the problem. A bit more investigation, and I see that in Makefile.am, automake sticks rules that rebuild config.h as part of 'make all', and that we also had a dependency 'check-local: all'; BUT the rule for check-local is run only at the point when the top-level directory is visited. Automake documents that SUBDIRS should contain an explicit '.' at the point the top-level should be visited (defaulting to last, if it doesn't appear). Sure enough, with this patch, 'make check' now does the top-level 'all' rules, which regenerates 'config.h' BEFORE compiling any code that might depend on changed content of that file. * Makefile.am (SUBDIRS): Put '.' first, not last. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
e4697b92ab
commit
b0d9207bc6
@ -19,7 +19,7 @@
|
||||
LCOV = lcov
|
||||
GENHTML = genhtml
|
||||
|
||||
SUBDIRS = gnulib/lib include src daemon tools docs gnulib/tests \
|
||||
SUBDIRS = . gnulib/lib include src daemon tools docs gnulib/tests \
|
||||
python tests po examples/domain-events/events-c examples/hellolibvirt \
|
||||
examples/dominfo examples/domsuspend examples/python examples/apparmor \
|
||||
examples/xml/nwfilter examples/openauth examples/systemtap
|
||||
|
Loading…
x
Reference in New Issue
Block a user