]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: use automake subdir-objects
authorEric Blake <eblake@redhat.com>
Sat, 7 Sep 2013 22:18:06 +0000 (16:18 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 9 Sep 2013 18:04:03 +0000 (12:04 -0600)
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>
.gitignore
configure.ac
src/Makefile.am

index 8a94748e090c19536adbecc3d2a2afde32e9482e..2b8652fcabe9dcd9857b79414748ea21a001be97 100644 (file)
@@ -19,6 +19,7 @@
 *~
 .#*
 .deps
+.dirstamp
 .gdb_history
 .git
 .git-module-status
index a639f5936a71b0bc3f00aa93f1608b04d894105c..a5d037317a1bd4e2132e3c82ee84ec72c71cca50 100644 (file)
@@ -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
index 90b75543a40e5d572ed95e42d56fd1fde52c1229..711da321b9881534c3f7e5c70660f9f43fc707bc 100644 (file)
@@ -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