mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
build: use automake subdir-objects
Automake 2.0 will enable subdir-objects by default; in preparation for that change, automake 1.14 outputs LOADS of warnings: daemon/Makefile.am:38: warning: source file '../src/remote/remote_protocol.c' is in a subdirectory, daemon/Makefile.am:38: but option 'subdir-objects' is disabled automake-1.14: warning: possible forward-incompatibility. automake-1.14: At least a source file is in a subdirectory, but the 'subdir-objects' automake-1.14: automake option hasn't been enabled. For now, the corresponding output automake-1.14: object file(s) will be placed in the top-level directory. However, automake-1.14: this behaviour will change in future Automake versions: they will automake-1.14: unconditionally cause object files to be placed in the same subdirectory automake-1.14: of the corresponding sources. automake-1.14: You are advised to start using 'subdir-objects' option throughout your automake-1.14: project, to avoid future incompatibilities. daemon/Makefile.am:38: warning: source file '../src/remote/lxc_protocol.c' is in a subdirectory, daemon/Makefile.am:38: but option 'subdir-objects' is disabled ... As automake 1.9 also supported this option, and the previous patches fixed up the code base to work with it, it is safe to now turn it on unconditionally. * configure.ac (AM_INIT_AUTOMAKE): Enable subdir-objects. * .gitignore: Ignore .dirstamp directories. * src/Makefile.am (PDWTAGS, *-protocol-struct): Adjust to new subdir-object location of .lo files. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
e561951d84
commit
7f626e478d
1
.gitignore
vendored
1
.gitignore
vendored
@ -19,6 +19,7 @@
|
||||
*~
|
||||
.#*
|
||||
.deps
|
||||
.dirstamp
|
||||
.gdb_history
|
||||
.git
|
||||
.git-module-status
|
||||
|
@ -23,7 +23,7 @@ AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
dnl Make automake keep quiet about wildcards & other GNUmake-isms; also keep
|
||||
dnl quiet about the fact that we intentionally cater to automake 1.9
|
||||
AM_INIT_AUTOMAKE([-Wno-portability -Wno-obsolete tar-ustar])
|
||||
AM_INIT_AUTOMAKE([-Wno-portability -Wno-obsolete tar-ustar subdir-objects])
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
|
||||
# Maintainer note - comment this line out if you plan to rerun
|
||||
|
@ -367,12 +367,13 @@ r2 = /\* <[[:xdigit:]]+> \S+:\d+ \*/
|
||||
struct_prefix = (remote_|qemu_|lxc_|keepalive|vir(Net|LockSpace|LXCMonitor))
|
||||
|
||||
# Depending on configure options, libtool creates one or both of
|
||||
# {,.libs/}libvirt_driver_remote_la-remote_protocol.o. We want the
|
||||
# newest of the two, in case configure options changed and a stale
|
||||
# remote/{,.libs/}libvirt_driver_remote_la-remote_protocol.o. We want
|
||||
# the newest of the two, in case configure options changed and a stale
|
||||
# file is left around from an earlier build.
|
||||
PDWTAGS = \
|
||||
$(AM_V_GEN)if (pdwtags --help) > /dev/null 2>&1; then \
|
||||
o=`ls -t $(<:.lo=.$(OBJEXT)) .libs/$(<:.lo=.$(OBJEXT)) \
|
||||
o=`ls -t $(<:.lo=.$(OBJEXT)) \
|
||||
$(subst /,/.libs/,$(<:.lo=.$(OBJEXT))) \
|
||||
2>/dev/null | sed -n 1p`; \
|
||||
test -f "$$o" || { echo ".o for $< not found" >&2; exit 1; }; \
|
||||
pdwtags --verbose $$o > $(@F)-t1 2> $(@F)-t2; \
|
||||
@ -445,16 +446,16 @@ check-protocol: $(PROTOCOL_STRUCTS) $(PROTOCOL_STRUCTS:structs=struct)
|
||||
$(srcdir)/remote_protocol-struct \
|
||||
$(srcdir)/qemu_protocol-struct \
|
||||
$(srcdir)/lxc_protocol-struct: \
|
||||
$(srcdir)/%-struct: libvirt_driver_remote_la-%.lo
|
||||
$(srcdir)/%-struct: remote/libvirt_driver_remote_la-%.lo
|
||||
$(PDWTAGS)
|
||||
$(srcdir)/virnetprotocol-struct $(srcdir)/virkeepaliveprotocol-struct: \
|
||||
$(srcdir)/%-struct: libvirt_net_rpc_la-%.lo
|
||||
$(srcdir)/%-struct: rpc/libvirt_net_rpc_la-%.lo
|
||||
$(PDWTAGS)
|
||||
$(srcdir)/lxc_monitor_protocol-struct: \
|
||||
$(srcdir)/%-struct: libvirt_driver_lxc_impl_la-%.lo
|
||||
$(srcdir)/%-struct: lxc/libvirt_driver_lxc_impl_la-%.lo
|
||||
$(PDWTAGS)
|
||||
$(srcdir)/lock_protocol-struct: \
|
||||
$(srcdir)/%-struct: lockd_la-%.lo
|
||||
$(srcdir)/%-struct: locking/lockd_la-%.lo
|
||||
$(PDWTAGS)
|
||||
|
||||
else !WITH_REMOTE
|
||||
|
Loading…
Reference in New Issue
Block a user