[libvirt] [PATCH] build: silence warning from autoconf

Autoconf 2.60 and later insist on using ${datarootdir}, rather than the derived ${datadir} (although the latter defaults to the former, it is possible to set configure arguments so that they differ): config.status: creating libvirt.pc config.status: WARNING: 'libvirt.pc.in' seems to ignore the --datarootdir setting This patch follows the autoconf manual's suggestions for how to support 2.59 (RHEL 5) and newer simultaneously. * libvirt.pc.in (datarootdir): Define, so ${datadir} will not ignore datarootdir when using newer autoconf. --- https://www.gnu.org/software/autoconf/manual/autoconf.html#Changed-Directory... libvirt.pc.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libvirt.pc.in b/libvirt.pc.in index 3d999a8..616575d 100644 --- a/libvirt.pc.in +++ b/libvirt.pc.in @@ -2,6 +2,7 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ +datarootdir=@datarootdir@ libvirt_api=@datadir@/libvirt/api/libvirt-api.xml libvirt_qemu_api=@datadir@/libvirt/api/libvirt-qemu-api.xml -- 1.7.7.6

Without this fix, a VPATH build (such as used by ./autobuild.sh) fails with messages like: make[3]: Entering directory `/home/remote/eblake/libvirt-tmp2/build/daemon' ../../build-aux/augeas-gentest.pl libvirtd.conf ../../daemon/test_libvirtd.aug.in test_libvirtd.aug cannot read libvirtd.conf: No such file or directory at ../../build-aux/augeas-gentest.pl line 38. * daemon/Makefile.am (AUG_GENTEST): Factor out definition. (test_libvirtd.aug): Look for correct file. * src/Makefile.am (AUG_GENTEST): Use $(PERL). (qemu/test_libvirtd_qemu.aug, lxc/test_libvirtd_lxc.aug) (locking/test_libvirt_sanlock.aug): Rename to avoid subdirectories. (check-augeas-qemu, check-augeas-lxc, check-augeas-sanlock): Reflect location of built tests. --- Although this fixes a broken './autobuild.sh', I don't quite feel comfortable pushing it without a review. v2: fix 'make check', not just 'make' v1 was at: https://www.redhat.com/archives/libvir-list/2012-May/msg01297.html daemon/Makefile.am | 8 +++++--- src/Makefile.am | 32 ++++++++++++++++---------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index daf24ea..08e37a9 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -351,12 +351,14 @@ libvirtd.service: libvirtd.service.in $(top_builddir)/config.status check-local: check-augeas -test_libvirtd.aug: test_libvirtd.aug.in libvirtd.conf - $(AM_V_GEN)$(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl libvirtd.conf $< $@ +AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl + +test_libvirtd.aug: test_libvirtd.aug.in $(srcdir)/libvirtd.conf + $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/libvirtd.conf $< $@ check-augeas: test_libvirtd.aug $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ - '$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd.aug; \ + '$(AUGPARSE)' -I $(srcdir) test_libvirtd.aug; \ fi diff --git a/src/Makefile.am b/src/Makefile.am index c8efa5b..b0f54b2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1119,41 +1119,41 @@ check-local: check-augeas check-augeas: check-augeas-qemu check-augeas-lxc check-augeas-sanlock -AUG_GENTEST = $(top_srcdir)/build-aux/augeas-gentest.pl +AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl if WITH_QEMU -qemu/test_libvirtd_qemu.aug: qemu/test_libvirtd_qemu.aug.in qemu/qemu.conf $(AUG_GENTEST) - $(AM_V_GEN)$(AUG_GENTEST) qemu/qemu.conf $< $@ +test_libvirtd_qemu.aug: qemu/test_libvirtd_qemu.aug.in \ + $(srcdir)/qemu/qemu.conf $(AUG_GENTEST) + $(AUG_GENTEST) $(srcdir)/qemu/qemu.conf $< $@ -check-augeas-qemu: qemu/test_libvirtd_qemu.aug +check-augeas-qemu: test_libvirtd_qemu.aug $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ - '$(AUGPARSE)' -I $(srcdir)/qemu \ - $(srcdir)/qemu/test_libvirtd_qemu.aug; \ + '$(AUGPARSE)' -I $(srcdir)/qemu test_libvirtd_qemu.aug; \ fi else check-augeas-qemu: endif if WITH_LXC -lxc/test_libvirtd_lxc.aug: lxc/test_libvirtd_lxc.aug.in lxc/lxc.conf $(AUG_GENTEST) - $(AM_V_GEN)$(AUG_GENTEST) lxc/lxc.conf $< $@ +test_libvirtd_lxc.aug: lxc/test_libvirtd_lxc.aug.in \ + $(srcdir)/lxc/lxc.conf $(AUG_GENTEST) + $(AUG_GENTEST) $(srcdir)/lxc/lxc.conf $< $@ -check-augeas-lxc: lxc/test_libvirtd_lxc.aug +check-augeas-lxc: test_libvirtd_lxc.aug $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ - '$(AUGPARSE)' -I $(srcdir)/lxc \ - $(srcdir)/lxc/test_libvirtd_lxc.aug; \ + '$(AUGPARSE)' -I $(srcdir)/lxc test_libvirtd_lxc.aug; \ fi else check-augeas-lxc: endif -locking/test_libvirt_sanlock.aug: locking/test_libvirt_sanlock.aug.in locking/qemu-sanlock.conf $(AUG_GENTEST) - $(AM_V_GEN)$(AUG_GENTEST) locking/qemu-sanlock.conf $< $@ +test_libvirt_sanlock.aug: locking/test_libvirt_sanlock.aug.in \ + locking/qemu-sanlock.conf $(AUG_GENTEST) + $(AUG_GENTEST) locking/qemu-sanlock.conf $< $@ -check-augeas-sanlock: locking/test_libvirt_sanlock.aug +check-augeas-sanlock: test_libvirt_sanlock.aug $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ - '$(AUGPARSE)' -I $(srcdir)/locking \ - $(srcdir)/locking/test_libvirt_sanlock.aug; \ + '$(AUGPARSE)' -I $(srcdir)/locking test_libvirt_sanlock.aug; \ fi # -- 1.7.7.6

Some of our rules used $(PERL), while others used 'perl'. Always using the variable allows a developer to point to a different (often better) perl than the default one found on $PATH. * daemon/Makefile.am ($(srcdir)/remote_dispatch.h): s/perl/$(PERL). * src/Makefile.am ($(srcdir)/remote/remote_client_bodies.h) (PDWTAGS, %protocol.c, %_probes.stp): Likewise. --- Noticed this while working on the previous patch. daemon/Makefile.am | 4 ++-- src/Makefile.am | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 08e37a9..b1518c5 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -58,12 +58,12 @@ QEMU_PROTOCOL = $(top_srcdir)/src/remote/qemu_protocol.x $(srcdir)/remote_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \ $(REMOTE_PROTOCOL) - $(AM_V_GEN)perl -w $(srcdir)/../src/rpc/gendispatch.pl -b remote \ + $(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl -b remote \ $(REMOTE_PROTOCOL) > $@ $(srcdir)/qemu_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \ $(QEMU_PROTOCOL) - $(AM_V_GEN)perl -w $(srcdir)/../src/rpc/gendispatch.pl -b qemu \ + $(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl -b qemu \ $(QEMU_PROTOCOL) > $@ if WITH_LIBVIRTD diff --git a/src/Makefile.am b/src/Makefile.am index b0f54b2..ee4770b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -220,12 +220,12 @@ REMOTE_DRIVER_PROTOCOL = $(REMOTE_PROTOCOL) $(QEMU_PROTOCOL) $(srcdir)/remote/remote_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \ $(REMOTE_PROTOCOL) - $(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl \ + $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl \ -k remote $(REMOTE_PROTOCOL) > $@ $(srcdir)/remote/qemu_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \ $(QEMU_PROTOCOL) - $(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl \ + $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl \ -k qemu $(QEMU_PROTOCOL) > $@ REMOTE_DRIVER_SOURCES = \ @@ -265,7 +265,7 @@ PDWTAGS = \ rm -rf $(@F)-t?; \ echo 'WARNING: pdwtags appears broken; skipping the $@ test' >&2;\ else \ - perl -0777 -n \ + $(PERL) -0777 -n \ -e 'foreach my $$p (split m!\n*(?:$(r1)|$(r2))\n!) {' \ -e ' if ($$p =~ /^(struct|enum) $(struct_prefix)/ ||' \ -e ' $$p =~ /^enum {/) {' \ @@ -654,11 +654,11 @@ $(srcdir)/remote/remote_driver.c: $(REMOTE_DRIVER_GENERATED) endif WITH_REMOTE %protocol.c: %protocol.x %protocol.h $(srcdir)/rpc/genprotocol.pl - $(AM_V_GEN)perl -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -c \ + $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -c \ $< $@ %protocol.h: %protocol.x $(srcdir)/rpc/genprotocol.pl - $(AM_V_GEN)perl -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -h \ + $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -h \ $< $@ if WITH_XEN @@ -1321,10 +1321,10 @@ RPC_PROBE_FILES = $(srcdir)/rpc/virnetprotocol.x \ $(srcdir)/remote/qemu_protocol.x libvirt_functions.stp: $(RPC_PROBE_FILES) $(srcdir)/rpc/gensystemtap.pl - $(AM_V_GEN)perl -w $(srcdir)/rpc/gensystemtap.pl $(RPC_PROBE_FILES) > $@ + $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gensystemtap.pl $(RPC_PROBE_FILES) > $@ %_probes.stp: %_probes.d $(srcdir)/dtrace2systemtap.pl - $(AM_V_GEN)perl -w $(srcdir)/dtrace2systemtap.pl \ + $(AM_V_GEN)$(PERL) -w $(srcdir)/dtrace2systemtap.pl \ $(bindir) $(sbindir) $(libdir) $< > $@ CLEANFILES += libvirt_probes.h libvirt_probes.o libvirt_probes.lo \ -- 1.7.7.6

On 05/29/2012 04:03 PM, Eric Blake wrote:
Some of our rules used $(PERL), while others used 'perl'. Always using the variable allows a developer to point to a different (often better) perl than the default one found on $PATH.
* daemon/Makefile.am ($(srcdir)/remote_dispatch.h): s/perl/$(PERL). * src/Makefile.am ($(srcdir)/remote/remote_client_bodies.h) (PDWTAGS, %protocol.c, %_probes.stp): Likewise. ---
Noticed this while working on the previous patch.
daemon/Makefile.am | 4 ++-- src/Makefile.am | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-)
Needs this squashed in to work properly: diff --git i/configure.ac w/configure.ac index 59962c5..7d8d26b 100644 --- i/configure.ac +++ w/configure.ac @@ -2243,6 +2243,9 @@ AM_CONDITIONAL([WITH_PYTHON], [test "$with_python" = "yes"]) AC_SUBST([PYTHON_VERSION]) AC_SUBST([PYTHON_INCLUDES]) +dnl Allow perl overrides +AC_PATH_PROG([PERL], [perl]) + AC_ARG_ENABLE([with-test-suite], AC_HELP_STRING([--with-test-suite], [build test suite by default @<:@default=check@:>@]), [case "${withval}" in -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 05/30/2012 01:05 AM, Eric Blake wrote:
On 05/29/2012 04:03 PM, Eric Blake wrote:
Some of our rules used $(PERL), while others used 'perl'. Always using the variable allows a developer to point to a different (often better) perl than the default one found on $PATH.
* daemon/Makefile.am ($(srcdir)/remote_dispatch.h): s/perl/$(PERL). * src/Makefile.am ($(srcdir)/remote/remote_client_bodies.h) (PDWTAGS, %protocol.c, %_probes.stp): Likewise. ---
Noticed this while working on the previous patch.
daemon/Makefile.am | 4 ++-- src/Makefile.am | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-)
Needs this squashed in to work properly:
diff --git i/configure.ac w/configure.ac index 59962c5..7d8d26b 100644 --- i/configure.ac +++ w/configure.ac @@ -2243,6 +2243,9 @@ AM_CONDITIONAL([WITH_PYTHON], [test "$with_python" = "yes"]) AC_SUBST([PYTHON_VERSION]) AC_SUBST([PYTHON_INCLUDES])
+dnl Allow perl overrides +AC_PATH_PROG([PERL], [perl]) + AC_ARG_ENABLE([with-test-suite], AC_HELP_STRING([--with-test-suite], [build test suite by default @<:@default=check@:>@]), [case "${withval}" in
ACK of course when squashed with the previous PERL one. Martin

On 05/30/2012 12:03 AM, Eric Blake wrote:
Some of our rules used $(PERL), while others used 'perl'. Always using the variable allows a developer to point to a different (often better) perl than the default one found on $PATH.
* daemon/Makefile.am ($(srcdir)/remote_dispatch.h): s/perl/$(PERL). * src/Makefile.am ($(srcdir)/remote/remote_client_bodies.h) (PDWTAGS, %protocol.c, %_probes.stp): Likewise. ---
Noticed this while working on the previous patch.
daemon/Makefile.am | 4 ++-- src/Makefile.am | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 08e37a9..b1518c5 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -58,12 +58,12 @@ QEMU_PROTOCOL = $(top_srcdir)/src/remote/qemu_protocol.x
$(srcdir)/remote_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \ $(REMOTE_PROTOCOL) - $(AM_V_GEN)perl -w $(srcdir)/../src/rpc/gendispatch.pl -b remote \ + $(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl -b remote \ $(REMOTE_PROTOCOL) > $@
$(srcdir)/qemu_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \ $(QEMU_PROTOCOL) - $(AM_V_GEN)perl -w $(srcdir)/../src/rpc/gendispatch.pl -b qemu \ + $(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl -b qemu \ $(QEMU_PROTOCOL) > $@
if WITH_LIBVIRTD diff --git a/src/Makefile.am b/src/Makefile.am index b0f54b2..ee4770b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -220,12 +220,12 @@ REMOTE_DRIVER_PROTOCOL = $(REMOTE_PROTOCOL) $(QEMU_PROTOCOL)
$(srcdir)/remote/remote_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \ $(REMOTE_PROTOCOL) - $(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl \ + $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl \ -k remote $(REMOTE_PROTOCOL) > $@
$(srcdir)/remote/qemu_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \ $(QEMU_PROTOCOL) - $(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl \ + $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl \ -k qemu $(QEMU_PROTOCOL) > $@
REMOTE_DRIVER_SOURCES = \ @@ -265,7 +265,7 @@ PDWTAGS = \ rm -rf $(@F)-t?; \ echo 'WARNING: pdwtags appears broken; skipping the $@ test' >&2;\ else \ - perl -0777 -n \ + $(PERL) -0777 -n \ -e 'foreach my $$p (split m!\n*(?:$(r1)|$(r2))\n!) {' \ -e ' if ($$p =~ /^(struct|enum) $(struct_prefix)/ ||' \ -e ' $$p =~ /^enum {/) {' \ @@ -654,11 +654,11 @@ $(srcdir)/remote/remote_driver.c: $(REMOTE_DRIVER_GENERATED) endif WITH_REMOTE
%protocol.c: %protocol.x %protocol.h $(srcdir)/rpc/genprotocol.pl - $(AM_V_GEN)perl -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -c \ + $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -c \ $< $@
%protocol.h: %protocol.x $(srcdir)/rpc/genprotocol.pl - $(AM_V_GEN)perl -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -h \ + $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -h \ $< $@
if WITH_XEN @@ -1321,10 +1321,10 @@ RPC_PROBE_FILES = $(srcdir)/rpc/virnetprotocol.x \ $(srcdir)/remote/qemu_protocol.x
libvirt_functions.stp: $(RPC_PROBE_FILES) $(srcdir)/rpc/gensystemtap.pl - $(AM_V_GEN)perl -w $(srcdir)/rpc/gensystemtap.pl $(RPC_PROBE_FILES) > $@ + $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gensystemtap.pl $(RPC_PROBE_FILES) > $@
%_probes.stp: %_probes.d $(srcdir)/dtrace2systemtap.pl - $(AM_V_GEN)perl -w $(srcdir)/dtrace2systemtap.pl \ + $(AM_V_GEN)$(PERL) -w $(srcdir)/dtrace2systemtap.pl \ $(bindir) $(sbindir) $(libdir) $< > $@
CLEANFILES += libvirt_probes.h libvirt_probes.o libvirt_probes.lo \
Nice cleanup, ACK, Martin

On 05/30/2012 12:03 AM, Eric Blake wrote:
Without this fix, a VPATH build (such as used by ./autobuild.sh) fails with messages like:
make[3]: Entering directory `/home/remote/eblake/libvirt-tmp2/build/daemon' ../../build-aux/augeas-gentest.pl libvirtd.conf ../../daemon/test_libvirtd.aug.in test_libvirtd.aug cannot read libvirtd.conf: No such file or directory at ../../build-aux/augeas-gentest.pl line 38.
* daemon/Makefile.am (AUG_GENTEST): Factor out definition. (test_libvirtd.aug): Look for correct file. * src/Makefile.am (AUG_GENTEST): Use $(PERL). (qemu/test_libvirtd_qemu.aug, lxc/test_libvirtd_lxc.aug) (locking/test_libvirt_sanlock.aug): Rename to avoid subdirectories. (check-augeas-qemu, check-augeas-lxc, check-augeas-sanlock): Reflect location of built tests. ---
Although this fixes a broken './autobuild.sh', I don't quite feel comfortable pushing it without a review.
v2: fix 'make check', not just 'make' v1 was at: https://www.redhat.com/archives/libvir-list/2012-May/msg01297.html
daemon/Makefile.am | 8 +++++--- src/Makefile.am | 32 ++++++++++++++++---------------- 2 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/daemon/Makefile.am b/daemon/Makefile.am index daf24ea..08e37a9 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -351,12 +351,14 @@ libvirtd.service: libvirtd.service.in $(top_builddir)/config.status
check-local: check-augeas
-test_libvirtd.aug: test_libvirtd.aug.in libvirtd.conf - $(AM_V_GEN)$(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl libvirtd.conf $< $@ +AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl + +test_libvirtd.aug: test_libvirtd.aug.in $(srcdir)/libvirtd.conf + $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/libvirtd.conf $< $@
check-augeas: test_libvirtd.aug $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ - '$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd.aug; \ + '$(AUGPARSE)' -I $(srcdir) test_libvirtd.aug; \ fi
diff --git a/src/Makefile.am b/src/Makefile.am index c8efa5b..b0f54b2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1119,41 +1119,41 @@ check-local: check-augeas
check-augeas: check-augeas-qemu check-augeas-lxc check-augeas-sanlock
-AUG_GENTEST = $(top_srcdir)/build-aux/augeas-gentest.pl +AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl
if WITH_QEMU -qemu/test_libvirtd_qemu.aug: qemu/test_libvirtd_qemu.aug.in qemu/qemu.conf $(AUG_GENTEST) - $(AM_V_GEN)$(AUG_GENTEST) qemu/qemu.conf $< $@ +test_libvirtd_qemu.aug: qemu/test_libvirtd_qemu.aug.in \ + $(srcdir)/qemu/qemu.conf $(AUG_GENTEST) + $(AUG_GENTEST) $(srcdir)/qemu/qemu.conf $< $@
-check-augeas-qemu: qemu/test_libvirtd_qemu.aug +check-augeas-qemu: test_libvirtd_qemu.aug $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ - '$(AUGPARSE)' -I $(srcdir)/qemu \ - $(srcdir)/qemu/test_libvirtd_qemu.aug; \ + '$(AUGPARSE)' -I $(srcdir)/qemu test_libvirtd_qemu.aug; \ fi else check-augeas-qemu: endif
if WITH_LXC -lxc/test_libvirtd_lxc.aug: lxc/test_libvirtd_lxc.aug.in lxc/lxc.conf $(AUG_GENTEST) - $(AM_V_GEN)$(AUG_GENTEST) lxc/lxc.conf $< $@ +test_libvirtd_lxc.aug: lxc/test_libvirtd_lxc.aug.in \ + $(srcdir)/lxc/lxc.conf $(AUG_GENTEST) + $(AUG_GENTEST) $(srcdir)/lxc/lxc.conf $< $@
-check-augeas-lxc: lxc/test_libvirtd_lxc.aug +check-augeas-lxc: test_libvirtd_lxc.aug $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ - '$(AUGPARSE)' -I $(srcdir)/lxc \ - $(srcdir)/lxc/test_libvirtd_lxc.aug; \ + '$(AUGPARSE)' -I $(srcdir)/lxc test_libvirtd_lxc.aug; \ fi else check-augeas-lxc: endif
-locking/test_libvirt_sanlock.aug: locking/test_libvirt_sanlock.aug.in locking/qemu-sanlock.conf $(AUG_GENTEST) - $(AM_V_GEN)$(AUG_GENTEST) locking/qemu-sanlock.conf $< $@ +test_libvirt_sanlock.aug: locking/test_libvirt_sanlock.aug.in \ + locking/qemu-sanlock.conf $(AUG_GENTEST) + $(AUG_GENTEST) locking/qemu-sanlock.conf $< $@
-check-augeas-sanlock: locking/test_libvirt_sanlock.aug +check-augeas-sanlock: test_libvirt_sanlock.aug $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ - '$(AUGPARSE)' -I $(srcdir)/locking \ - $(srcdir)/locking/test_libvirt_sanlock.aug; \ + '$(AUGPARSE)' -I $(srcdir)/locking test_libvirt_sanlock.aug; \ fi
#
I'm not sure why you use "&& \" to join the lines when there is nothing to share between the processes, but it doesn't hurt. Otherwise it looks like nice cleanup, so ACK from me (if that's enough for you =) ). Martin

On 05/30/2012 08:39 AM, Martin Kletzander wrote:
On 05/30/2012 12:03 AM, Eric Blake wrote:
Without this fix, a VPATH build (such as used by ./autobuild.sh) fails with messages like:
make[3]: Entering directory `/home/remote/eblake/libvirt-tmp2/build/daemon' ../../build-aux/augeas-gentest.pl libvirtd.conf ../../daemon/test_libvirtd.aug.in test_libvirtd.aug cannot read libvirtd.conf: No such file or directory at ../../build-aux/augeas-gentest.pl line 38.
-check-augeas-sanlock: locking/test_libvirt_sanlock.aug +check-augeas-sanlock: test_libvirt_sanlock.aug $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ - '$(AUGPARSE)' -I $(srcdir)/locking \ - $(srcdir)/locking/test_libvirt_sanlock.aug; \ + '$(AUGPARSE)' -I $(srcdir)/locking test_libvirt_sanlock.aug; \ fi
#
I'm not sure why you use "&& \" to join the lines when there is nothing to share between the processes, but it doesn't hurt. Otherwise it looks like nice cleanup, so ACK from me (if that's enough for you =) ).
v1 used '&& \' because it did a mkdir in the first command, and the second command would fail if the first didn't succeed. Using '; \' to join lines ignores earlier failures. v2 doesn't use '&& \' for any line joining, so I'm not quite sure where your comment came from. At any rate, I've now pushed the series, with the configure.ac change floated into the second patch per your request. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 05/30/2012 05:34 PM, Eric Blake wrote:
On 05/30/2012 08:39 AM, Martin Kletzander wrote:
On 05/30/2012 12:03 AM, Eric Blake wrote:
Without this fix, a VPATH build (such as used by ./autobuild.sh) fails with messages like:
make[3]: Entering directory `/home/remote/eblake/libvirt-tmp2/build/daemon' ../../build-aux/augeas-gentest.pl libvirtd.conf ../../daemon/test_libvirtd.aug.in test_libvirtd.aug cannot read libvirtd.conf: No such file or directory at ../../build-aux/augeas-gentest.pl line 38.
-check-augeas-sanlock: locking/test_libvirt_sanlock.aug +check-augeas-sanlock: test_libvirt_sanlock.aug $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ - '$(AUGPARSE)' -I $(srcdir)/locking \ - $(srcdir)/locking/test_libvirt_sanlock.aug; \ + '$(AUGPARSE)' -I $(srcdir)/locking test_libvirt_sanlock.aug; \ fi
#
I'm not sure why you use "&& \" to join the lines when there is nothing to share between the processes, but it doesn't hurt. Otherwise it looks like nice cleanup, so ACK from me (if that's enough for you =) ).
v1 used '&& \' because it did a mkdir in the first command, and the second command would fail if the first didn't succeed. Using '; \' to join lines ignores earlier failures.
Oh, sorry, it must have been from the first one and I said that probably because it could have been split into two lines, but it doesn't matter now =)
v2 doesn't use '&& \' for any line joining, so I'm not quite sure where your comment came from.
At any rate, I've now pushed the series, with the configure.ac change floated into the second patch per your request.

On 05/29/2012 04:18 PM, Eric Blake wrote:
Autoconf 2.60 and later insist on using ${datarootdir}, rather than the derived ${datadir} (although the latter defaults to the former, it is possible to set configure arguments so that they differ):
config.status: creating libvirt.pc config.status: WARNING: 'libvirt.pc.in' seems to ignore the --datarootdir setting
This patch follows the autoconf manual's suggestions for how to support 2.59 (RHEL 5) and newer simultaneously.
* libvirt.pc.in (datarootdir): Define, so ${datadir} will not ignore datarootdir when using newer autoconf. ---
https://www.gnu.org/software/autoconf/manual/autoconf.html#Changed-Directory...
libvirt.pc.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libvirt.pc.in b/libvirt.pc.in index 3d999a8..616575d 100644 --- a/libvirt.pc.in +++ b/libvirt.pc.in @@ -2,6 +2,7 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ +datarootdir=@datarootdir@
libvirt_api=@datadir@/libvirt/api/libvirt-api.xml libvirt_qemu_api=@datadir@/libvirt/api/libvirt-qemu-api.xml
ACK, Martin
participants (2)
-
Eric Blake
-
Martin Kletzander